A feature-rich, high-performance anime downloader for AnimePahe with both CLI and GUI interfaces. Built with Python, featuring concurrent downloads, resume support, and cross-platform compatibility.

Pre-built binaries are available for all major platforms:
| Platform | Method | Command |
|---|---|---|
| Windows | Download EXE | animepahe-dl-windows.exe |
| Linux | AppImage | ./animepahe-dl-x86_64.AppImage |
| Linux | Snap Store | sudo snap install animepahe-dl |
| Linux | Flatpak | flatpak install animepahe-dl.flatpak |
| Arch Linux | AUR | yay -S animepahe-dl |
📖 Complete Binary Installation Guide
Before installing, ensure you have the following dependencies on your system:
sudo apt update && sudo apt install ffmpeg (or use your distro's package manager).sudo apt update && sudo apt install fzf (or use your distro's package manager).~/.cache/ms-playwright and shared by every environment:
playwright install chromium
--play feature.
sudo apt install mpv (Linux), install via your package manager on macOS, or download from mpv.io# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install animepahe-dl
uv tool install animepahe-dl
pip install animepahe-dl
The package can be run directly from your terminal.
To run the CLI, use the animepahe-dl command:
# Search for an anime and select episodes interactively
animepahe-dl -n "Your Anime Name"
# Download specific episodes of an anime
animepahe-dl -n "Your Anime Name" -e 1 3 5
CLI Options:
| Flag | Alias | Description | Default |
|---|---|---|---|
--name | -n | Name of the anime to search for. | |
--episodes | -e | List or range of episode numbers (e.g., 1 2 5 or 1-10). | |
--quality | -q | Desired video quality (best, 1080, 720, 480, 360). | best |
--audio | -a | Desired audio language (eng or jpn). | jpn |
--threads | -t | Number of download threads for segments. | 100 |
--concurrent-downloads | -c | Number of episodes to download concurrently. | 2 |
--updates | Check for new episodes of anime in your personal list. | ||
--manage | Manage your personal anime list (add/remove anime). | ||
--run-once | Use with --updates to run the check once and exit. | ||
--insecure | Disable SSL certificate verification (not recommended). | ||
--m3u8-only | Fetch playlist only without downloading segments. | ||
--play | Play episode(s) directly using m3u8 stream (requires media player). | ||
--player | Specify media player to use (mpv, vlc, ffplay). Auto-detects if not specified. | ||
--daemon | Run in daemon mode (background service for continuous updates). | ||
--daemon-action | Daemon management (start, stop, restart, status). | ||
--single | Disable multi-selection mode (select only one anime at a time). | ||
--gui | Launch the Graphical User Interface. |
Examples:
# Search and select anime (multi-selection is default)
animepahe-dl -n "Naruto"
# (Use spacebar to select multiple items, Enter to confirm)
# Download episodes 1-10 with 720p quality
animepahe-dl -n "Naruto" -e 1-10 -q 720
# Download multiple episodes concurrently
animepahe-dl -n "Naruto" -e 1-20 -c 3 -t 150
# Download with English audio
animepahe-dl -n "Naruto" -e 1-5 -a eng
# Single selection mode (select only one anime)
animepahe-dl -n "Naruto" --single
# Fetch playlist only (no download)
animepahe-dl -n "Naruto" -e 1 --m3u8-only
# Play episodes directly without downloading
animepahe-dl -n "Naruto" -e 1-5 --play
# Play with specific media player
animepahe-dl -n "Naruto" -e 1 --play --player mpv
To launch the GUI, use the --gui flag:
animepahe-dl --gui
The GUI provides a user-friendly interface for searching, selecting, and downloading anime without using the command line.
Multi-Selection in GUI:
Ctrl (or Cmd on macOS) to select multiple animeShift to select a range of animeKeyboard Shortcuts:
Ctrl+F - Focus search barCtrl+A - Select all episodesCtrl+D - Deselect all episodesCtrl+P - Play selected episodesEnter - Download selected episodesF5 - Update anime cacheStream episodes instantly without downloading:
# Stream episodes directly
animepahe-dl -n "Your Anime Name" -e 1-5 --play
# Use specific media player
animepahe-dl -n "Your Anime Name" -e 1 --play --player mpv
# Stream with custom quality and audio
animepahe-dl -n "Your Anime Name" -e 1 --play -q 720 -a eng
Supported Media Players:
The application will auto-detect available players or you can specify one with --player.
Run the application as a background service to automatically monitor and download new episodes:
# Start daemon mode
animepahe-dl --daemon
# Daemon management
animepahe-dl --daemon-action start
animepahe-dl --daemon-action stop
animepahe-dl --daemon-action restart
animepahe-dl --daemon-action status
The GUI supports system tray functionality:
Install as a systemd service for automatic startup:
# Install service (run from project directory)
./scripts/install-service.sh
# Service management
sudo systemctl start animepahe-dl
sudo systemctl stop animepahe-dl
sudo systemctl status animepahe-dl
sudo journalctl -u animepahe-dl -f # View logs
Service Features:
The application's configuration (config.json) and data files (my_anime_list.txt, anime_list.cache, and optionally browser_state.json) are stored in ~/.config/animepahe-dl/ on every platform.
You can manually edit config.json to change defaults for quality, audio, threads, download directory, and notification settings.
Configuration Options:
{
"base_url": "https://animepahe.pw",
"quality": "best",
"audio": "jpn",
"threads": 100,
"download_directory": "/home/user/Videos/Anime",
"update_interval_hours": 1,
"allow_insecure_ssl": true,
"cf_clearance": "",
"user_agent": "",
"cookie_file": "",
"browser_session_persistence": "runtime",
"challenge_timeout": 180,
"challenge_attempts": 3
}
When a protected AnimePahe or file-host page is encountered, the downloader opens a visible Playwright browser window. Complete the challenge there; the download continues automatically once the page passes. The browser's cookies and User-Agent are then reused for that host, including redirected file-host requests.
challenge_timeout is how long to wait for you to finish a challenge.browser_session_persistence set to "persistent" saves the browser
session (cookies and storage) to the application data directory so you do
not have to solve the challenge on every run. Leave it as "runtime" to
keep the session in memory only.challenge_attempts caps how many times a host may prompt you in a single
run, since Cloudflare can re-challenge an otherwise valid session.
Stream and playlist hosts only answer requests that carry the correct
Referer. The downloader records it automatically (play page -> stream page
-> playlist), so a bare request to a file host is expected to be blocked even
though the download itself works.
A Cloudflare block page ("Sorry, you have been blocked") cannot be solved in a browser; it means the host rejected your IP, so use another mirror or network.
The downloader needs a Playwright browser, installed once per machine:
playwright install chromium
Cloudflare challenges on AnimePahe and its file hosts are now cleared in a real browser. Install Playwright's Chromium:
playwright install chromium
It downloads into ~/.cache/ms-playwright, which every environment shares, so
run it once per machine. Run it with the Playwright the tool actually uses: each
Playwright version pins its own Chromium build, so installing from a project
virtualenv does not satisfy a uv tool install of the same package. Packaged
builds must bundle the same browser.
--daemon, cron, systemd, and plain Docker runs cannot clear one.base_url is now https://animepahe.pw. A config still
pinning animepahe.si returns no results.challenge_timeout, challenge_attempts, and
browser_session_persistence. Existing configs inherit the defaults.cf_clearance and user_agent are legacy; sessions are stored in
browser_state.json when persistence is "persistent".Downloader moved to anime_downloader.api, and
AnimePaheAPI.close() releases the browser.Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or on Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Clone the repository:
git clone https://github.com/ayushjaipuriyar/animepahe-dl.git
cd animepahe-dl
Install dependencies with uv:
uv sync --all-extras
Or for development:
uv sync --dev
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=anime_downloader --cov-report=html
# Run specific test file
uv run pytest tests/test_cli.py -v
# Format code
uv run black anime_downloader tests
uv run isort anime_downloader tests
# Lint code
uv run ruff check anime_downloader tests
# Type checking
uv run mypy anime_downloader
# Security scan
uv run bandit -r anime_downloader
animepahe-dl/
├── anime_downloader/ # Main package
│ ├── api.py # AnimePahe API client
│ ├── async_downloader.py # Async download implementation
│ ├── cache.py # Caching system
│ ├── cli.py # Command-line interface
│ ├── config.py # Configuration management
│ ├── downloader.py # Download orchestration
│ ├── gui.py # PyQt6 GUI
│ ├── models.py # Data models
│ ├── utils.py # Utility functions
│ └── workers.py # Background workers
├── tests/ # Test suite
├── .github/workflows/ # CI/CD pipelines
└── pyproject.toml # Project configuration
We welcome contributions! Please follow these guidelines:
black and isort for formattingThis project uses Conventional Commits for automated releases:
feat: New features (minor version bump)fix: Bug fixes (patch version bump)docs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Test additions or modificationschore: Build process or auxiliary tool changesExample:
git commit -m "feat: add async download support for improved performance"
git commit -m "fix: handle network timeout errors gracefully"
Releases are automated via GitHub Actions:
main branch triggers semantic-release-t 100 or higher for faster downloads-c 3 to download multiple episodes simultaneously-q 720 instead of 1080)--updates for better performanceSSL Certificate Errors:
animepahe-dl --insecure -n "Anime Name"
FFmpeg not found:
FFMPEG environment variable to ffmpeg binary pathCache issues:
~/.config/animepahe-dl/anime_list.cache--updates flagExecutable doesn't exist at .../ms-playwright/chromium-XXXX/...
# uv tool install
~/.local/share/uv/tools/animepahe-dl/bin/playwright install chromium
# source checkout / virtualenv
uv run playwright install chromium
The error message prints the exact command (<python> -m playwright install chromium) for the environment that failed.A browser window keeps opening
challenge_timeout if you need longer than the default 180 seconds."Challenge was not completed" but I did solve it
Blocked on a file host ("Sorry, you have been blocked")
404 for the episode list
fetch_episode_data() resolves this automatically; if you
still see a 404, delete ~/.config/animepahe-dl/anime_list.cache and rerun.Permission errors:
This project is licensed under the MIT License - see the LICENSE file for details.
Run animepahe-dl in a container:
[!WARNING] Challenge verification needs a real browser window, so a plain headless container cannot clear a Cloudflare challenge. Mount a persistent
~/.config/animepahe-dlwithbrowser_session_persistenceset to"persistent"so an already-accepted session can be reused, or run with an X server attached.
# Build the image
docker build -t animepahe-dl .
# Run CLI
docker run -v ./downloads:/downloads animepahe-dl -n "Anime Name" -e 1-5
# Run with docker-compose
docker-compose up
See docker-compose.yml for configuration options.
from anime_downloader.api import AnimePaheAPI, Downloader
# Initialize
api = AnimePaheAPI(verify_ssl=False)
downloader = Downloader(api)
try:
# Search for anime
results = api.search("Naruto")
print(results[0]["title"])
# Download episodes
# See examples/ directory for complete examples
finally:
api.close() # releases the browser; also registered via atexit
Downloader moved to anime_downloader.api; anime_downloader.downloader no
longer exists.
Check for new episodes automatically:
# Edit crontab
crontab -e
# Add this line (check every 6 hours)
0 */6 * * * /usr/local/bin/animepahe-dl --updates --run-once
FFMPEG - Path to ffmpeg binaryXDG_CONFIG_HOME - Config directory locationDOWNLOAD_DIR - Default download directorySee CHANGELOG.md for complete version history.
This tool is for educational purposes only. Please respect copyright laws and support official releases when available. The developers are not responsible for any misuse of this software.
## v5.12.0 (2026-10-23) _This release is published under the MIT License._ ### Bug Fixes - Default to the live animepahe.pw mirror ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) - Report a missing Playwright browser instead of crashing ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) - Restore downloads behind Cloudflare challenges on AnimePahe and file hosts ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) ### Chores - Drop local assistant instructions from this branch ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) ### Documentation - Document the Cloudflare browser requirement ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) - Install the browser for the environment that runs the tool ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) ### Features - Add browser session handling for Cloudflare challenges ([#67](https://github.com/ayushjaipuriyar/animepahe-dl/pull/67), [`0842062`](https://github.com/ayushjaipuriyar/animepahe-dl/commit/08420628dbe821b229e3da1ddd350411b7fc7e04)) --- **Detailed Changes**: [v5.11.0...v5.12.0](https://github.com/ayushjaipuriyar/animepahe-dl/compare/v5.11.0...v5.12.0)