mangapy
Download manga chapters from the terminal as images or PDFs.
Getting started · CLI examples · YAML mode · Configuration · Development setup
mangapy is a command-line downloader for FanFox and
MangaDex. Download one chapter, a range, the latest
chapter, or an entire series—with one PDF per chapter when you want a portable
archive.
[!IMPORTANT] You need Python 3.14 or newer when installing from PyPI. The Homebrew formula installs its Python dependency for you.
Highlights
| Feature | What it gives you | |
|---|---|---|
| 📚 | Flexible chapter selection | Download one chapter, an inclusive range, the latest chapter, or everything available. |
| 🖼️ | Images or PDFs | Keep the original page images or create a separate PDF for every selected chapter. |
| 🧾 | Batch configuration | Describe downloads from multiple providers in one YAML file. |
| ⚡ | Provider-aware downloads | MangaDex downloads chapters and pages concurrently while respecting its request rate. |
| ♻️ | Safe reruns | Completed chapter images and PDFs are detected so repeat runs do not download them again. |
| 🖥️ | Terminal-friendly output | Interactive terminals get styled progress; redirected output and CI logs stay plain. |
Supported providers
| Provider | CLI name | Language filtering | Content ratings | Data-saver images |
|---|---|---|---|---|
| FanFox | fanfox |
— | — | — |
| MangaDex | mangadex |
✅ | ✅ | ✅ |
[!NOTE]
fanfoxis the default provider. MangaDex-specific filters are available in YAML mode.
Getting started
Install with pipx
pipx installs mangapy in an isolated environment
while making the command available globally:
pipx install mangapy
Install with Homebrew
On macOS:
brew install alemar11/tap/mangapy
Confirm the installation:
mangapy --version
mangapy --help
CLI examples
The shortest command downloads the latest available chapter from FanFox as
images into ~/Downloads/mangapy:
mangapy title bleach
Choose chapters
| Goal | Command |
|---|---|
| Download chapter 1 | mangapy title bleach --chapter 1 |
| Download chapters 0 through 10 | mangapy title bleach --chapter 0-10 |
| Download every chapter | mangapy title bleach --all |
| Use MangaDex | mangapy title bleach --chapter 1 --source mangadex |
| Choose an output directory | mangapy title bleach --chapter 1 --out ~/Downloads |
| Create one PDF per chapter | mangapy title bleach --all --pdf |
| Redownload an existing chapter | mangapy title bleach --chapter 1 --force |
Chapter ranges are inclusive. Open-ended ranges are supported too:
# Chapter 85 and every available chapter after it
mangapy title "tower of god" --chapter 85-
[!TIP] Quote titles containing spaces. Run
mangapy title --helpfor the complete command reference.
Control retries and progress
Disable network retries for benchmarking or fail-fast workflows:
mangapy title bleach --chapter 1 --no-retry
Disable the progress display for scripts and compact logs:
mangapy title bleach --chapter 1 --no-progress
Force a fresh download of the selected chapters while preserving the current files until each replacement has downloaded successfully:
mangapy title bleach --chapter 1 --force
Set NO_COLOR to disable terminal colors while
keeping progress output enabled:
NO_COLOR=1 mangapy title bleach --chapter 1
Use a proxy
Pass a JSON object with both http and https entries. Each URL must include
its scheme; the proxy is used for provider requests and chapter images.
mangapy title "one piece" \
--out ~/Downloads \
--proxy '{"http":"http://proxy.example:8080","https":"http://proxy.example:8080"}'
[!CAUTION] Treat proxy credentials as secrets. Avoid putting authenticated proxy URLs in shell history, shared YAML files, screenshots, or logs.
YAML mode
YAML mode is useful for repeatable downloads across multiple titles and providers:
mangapy yaml path/to/downloads.yaml
---
debug: false
force: false
no_retry: false
no_progress: false
output: "~/Downloads/mangapy"
downloads:
- source: fanfox
title: bleach
pdf: true
download_single_chapter: "10"
- source: fanfox
title: naruto
download_chapters: "10-13"
- source: mangadex
title: blue lock
translated_language: [en]
content_rating: [safe, suggestive, erotica]
data_saver: false
download_all_chapters: true
Global settings act as defaults. A download entry can override debug,
force, no_retry, no_progress, output, and proxy for that title.
Chapter selectors
Use at most one selector per download entry:
| YAML field | Example | Selects |
|---|---|---|
download_single_chapter |
"10" |
One chapter |
download_chapters |
"10-13" |
An inclusive range |
download_chapters |
"85-" |
A chapter and everything after it |
download_last_chapter |
true |
The latest downloadable chapter |
download_all_chapters |
true |
Every available chapter |
| No selector | — | The latest downloadable chapter |
MangaDex options
These fields are valid only when source: mangadex:
| YAML field | Default | Description |
|---|---|---|
translated_language |
[en] |
One language code or a list of language codes. |
content_rating |
[safe, suggestive, erotica] |
One rating or a list of ratings accepted by MangaDex. |
data_saver |
false |
Use MangaDex's smaller data-saver page images. |
[!NOTE] MangaDex output names include the immutable chapter UUID. This prevents corrected metadata, translations, and scanlations from overwriting one another. Legacy number-only outputs are kept but are not reused because they do not identify a translation.
All YAML fields
Global fields
| Field | Type | Purpose |
|---|---|---|
downloads |
list | Download entries to process. |
output |
string | Default output directory. |
proxy |
mapping | Default http and https proxy URLs. |
debug |
boolean | Enable debug logging. |
force |
boolean | Redownload and replace existing chapter files. |
no_retry |
boolean | Disable network retries. |
no_progress |
boolean | Disable progress output. |
Per-download fields
| Field | Type | Purpose |
|---|---|---|
source |
string | fanfox or mangadex; defaults to fanfox. |
title |
string | Manga title to find. Required. |
output |
string | Override the global output directory. |
pdf |
boolean | Create one PDF for each selected chapter. |
proxy |
mapping | Override the global proxy. |
debug |
boolean | Override global debug logging. |
force |
boolean | Override the global forced-download setting. |
no_retry |
boolean | Override the global retry setting. |
no_progress |
boolean | Override the global progress setting. |
download_single_chapter |
string or number | Select one chapter. |
download_chapters |
string | Select an inclusive or open-ended range. |
download_last_chapter |
boolean | Select the latest downloadable chapter. |
download_all_chapters |
boolean | Select every available chapter. |
translated_language |
string or list | MangaDex translation language filter. |
content_rating |
string or list | MangaDex content-rating filter. |
data_saver |
boolean | Use MangaDex data-saver images. |
More ready-to-run configurations are available in samples/. To
run one directly from a source checkout:
uv run python3 scripts/dev_run.py sample.yaml
Configuration
Output layout
Downloads are organized by provider and manga beneath the selected output
directory. Image mode stores page files under an images directory; PDF mode
creates one PDF per chapter.
Mangapy owns each completed chapter image directory. After a successful image download, stale regular files in that chapter directory are removed so the local pages match the provider response.
Exit codes
| Code | Meaning |
|---|---|
0 |
Every requested download completed successfully. |
1 |
An operational, configuration, search, or partial-download error occurred. |
2 |
The command line or input was rejected by the argument parser. |
130 |
The download was interrupted by the user. |
Development setup
Install mise and clone the repository:
git clone https://github.com/alemar11/mangapy.git
cd mangapy
mise install
mise run setup
mise install provides the required Python 3.14 and uv.
mise run setup creates the project-local .venv and installs the application
and development dependencies.
Verify the checkout:
mise run lint
mise run test
uv run mangapy --help
The default test command excludes live provider tests because they contact third-party services and may be affected by site changes or rate limits.
When opening the repository in VS Code, accept the recommended Python, Python
Environments, Python Debugger, and Ruff extensions. Select .venv as the Python
interpreter if VS Code does not detect it automatically.
See Development for the complete editor workflow and Tests for live-provider and targeted test commands.
License
Distributed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mangapy-4.1.1.tar.gz.
File metadata
- Download URL: mangapy-4.1.1.tar.gz
- Upload date:
- Size: 52.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a6d0b174b7f2c3eefedf477ec736f16d2be7d926f61ef6cfde030775ac2baa
|
|
| MD5 |
a0adc1219014671097225a742310e558
|
|
| BLAKE2b-256 |
347c4181de1d187d1fade69a3eabc1a317205d4b9ec779c9fab5299a94b1eaea
|
File details
Details for the file mangapy-4.1.1-py3-none-any.whl.
File metadata
- Download URL: mangapy-4.1.1-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
311758da8ad26a434573260e4082832441456d7361a72bbb13cdb3ce45d15e9b
|
|
| MD5 |
bebac306a9e58c564d0a179cfa689401
|
|
| BLAKE2b-256 |
5b01e9ffb1f933b8c46ddf5f3d1d01ef7a4a36123e42954652165597bfd79754
|