# testingbetaversion/anikoto architecture

> Architecture diagram of the GitHub repository testingbetaversion/anikoto, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/testingbetaversion/anikoto
- Repository: https://github.com/testingbetaversion/anikoto

## Overview

Anikoto is a command-line anime episode downloader. The user supplies a series or episode URL and options; the application discovers episodes, selects requested episodes and sources, extracts stream information, then downloads media and subtitles to a local path. The runtime is concentrated in one module, so the nodes separate its domain responsibilities rather than implying separate packages. The excerpts show some calls and HTTP activity, but omit much of the implementation; edges reflect only visible calls or README-documented behavior.

Main entry points: [`anikoto/anikoto.py`](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py) (CLI options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Download workflow"]
  node_cli["CLI options<br/>[anikoto.py]"]
  node_discovery["Episode discovery<br/>[anikoto.py]"]
  node_selection["Episode selection<br/>[anikoto.py]"]
  node_source_extract["Source extraction<br/>[anikoto.py]"]
  node_stream_resolve["Stream resolution<br/>[anikoto.py]"]
end

subgraph group_media["Media handling"]
  node_subtitle_fetch["Subtitle fetching<br/>[anikoto.py]"]
  node_media_download["Media download<br/>[anikoto.py]"]
  node_local_files["Local output<br/>[anikoto.py]"]
end

subgraph group_integrations["External services"]
  node_anime_site(("Anime websites"))
  node_stream_sources(("Stream providers"))
  node_download_tools["Downloader tools"]
  node_catbox(("Catbox upload"))
end

node_user(("CLI user"))

node_user -->|"provides URL/options"| node_cli
node_cli -->|"discovers episodes"| node_discovery
node_cli -->|"requests page and list"| node_anime_site
node_cli -->|"selects episodes"| node_selection
node_cli -->|"extracts requested source"| node_source_extract
node_cli -->|"resolves stream URL"| node_stream_resolve
node_cli -->|"fetches subtitles"| node_subtitle_fetch
node_cli -->|"downloads selected audio"| node_media_download
node_source_extract -->|"requests provider data"| node_stream_sources
node_stream_resolve -->|"passes manifest URL"| node_media_download
node_media_download -->|"dispatches download"| node_download_tools
node_media_download -->|"writes media"| node_local_files
node_subtitle_fetch -->|"writes subtitle file"| node_local_files
node_stream_resolve -->|"uploads temporary playlist"| node_catbox

click node_cli "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_discovery "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_selection "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_source_extract "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_stream_resolve "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_subtitle_fetch "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_media_download "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"
click node_local_files "https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_discovery,node_selection,node_source_extract,node_stream_resolve,node_user toneBlue
class node_subtitle_fetch,node_media_download,node_local_files toneAmber
class node_anime_site,node_stream_sources,node_download_tools,node_catbox toneMint
```

## Components

### Download workflow

- [CLI options](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Episode discovery](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Episode selection](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Source extraction](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Stream resolution](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`

### Media handling

- [Subtitle fetching](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Media download](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`
- [Local output](https://github.com/testingbetaversion/anikoto/blob/main/anikoto/anikoto.py): `anikoto/anikoto.py`

### External services

- **Anime websites**
- **Stream providers**
- **Downloader tools**
- **Catbox upload**

### Other components

- **CLI user**

## Connections

- CLI user → CLI options: provides URL/options (evidence: `README.md`)
- CLI options → Episode discovery: discovers episodes (evidence: `anikoto/anikoto.py`)
- CLI options → Anime websites: requests page and list (evidence: `anikoto/anikoto.py`)
- CLI options → Episode selection: selects episodes (evidence: `README.md`)
- CLI options → Source extraction: extracts requested source (evidence: `anikoto/anikoto.py`)
- CLI options → Stream resolution: resolves stream URL (evidence: `anikoto/anikoto.py`)
- CLI options → Subtitle fetching: fetches subtitles (evidence: `anikoto/anikoto.py`)
- CLI options → Media download: downloads selected audio (evidence: `anikoto/anikoto.py`)
- Source extraction → Stream providers: requests provider data (evidence: `anikoto/anikoto.py`)
- Stream resolution → Media download: passes manifest URL (evidence: `anikoto/anikoto.py`)
- Media download → Downloader tools: dispatches download (evidence: `anikoto/anikoto.py`)
- Media download → Local output: writes media (evidence: `anikoto/anikoto.py`)
- Subtitle fetching → Local output: writes subtitle file (evidence: `anikoto/anikoto.py`)
- Stream resolution → Catbox upload: uploads temporary playlist (evidence: `anikoto/anikoto.py`)
