Mangabind groups manga chapters into volumes. Give it a folder of chapter folders or CBZ files, and it creates one CBZ per volume, or a single archive for the whole series. Pages stay in chapter order, and their image contents are preserved.
Open the result in a CBZ reader, or convert it for your e-reader with mangapress or Kindle Comic Converter. For a desktop interface that combines grouping and conversion, see Mangabound.
Download · Get started · Contribute
Download and extract a package from GitHub Releases,
or use the install script below. Releases include binaries for Windows, macOS, and Linux on x64
and ARM64, plus checksums.txt for manual verification. Running a release does not require Go.
macOS / Linux:
curl -fsSL https://github.com/raw/gustavommcv/mangabind/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/gustavommcv/mangabind/main/install.ps1 | iexThe scripts install the latest release to ~/.local/bin on macOS/Linux or
%LOCALAPPDATA%\Programs\mangabind on Windows. On macOS/Linux, follow the printed instructions
if the folder is not on your PATH. On Windows, restart your terminal after installation.
They install an archive only if its SHA-256 matches the release's checksums.txt; otherwise they
stop and install nothing. To install a given version, or somewhere else:
curl -fsSL https://github.com/raw/gustavommcv/mangabind/main/install.sh | sh -s -- v0.6.1
curl -fsSL https://github.com/raw/gustavommcv/mangabind/main/install.sh | MANGABIND_INSTALL_DIR=/opt/bin sh$env:MANGABIND_VERSION = "v0.6.1"; irm https://raw.githubusercontent.com/gustavommcv/mangabind/main/install.ps1 | iexMANGABIND_VERSION, MANGABIND_INSTALL_DIR and, for a mirror, MANGABIND_BASE_URL work in both;
MANGABIND_NO_MODIFY_PATH=1 stops the Windows script from editing your user PATH.
With Go installed, you can also build and install the latest tagged version:
go install github.com/gustavommcv/mangabind/cmd/mangabind@latestRepeat the installation command you used. Check the installed version with mangabind --version.
Delete ~/.local/bin/mangabind on macOS/Linux, or %LOCALAPPDATA%\Programs\mangabind on Windows.
If you used go install, delete the executable from GOBIN, or from GOPATH/bin when GOBIN
is unset. You can remove the Windows install folder from your user Path in Environment Variables.
Point --input at a manga folder containing its chapters:
mangabind --input "Manga/Example Series"Chapter folders and chapter CBZ files can be mixed in the same folder. EPUB and PDF input are
not supported. Without --output, the archives go into a sibling folder named
Example Series (mangabind). To choose a destination:
mangabind --input "Manga/Example Series" --output "Books/Example Series"Use --dry-run to preview the grouping before writing archives. Read the report for unrecognized
names, missing volume assignments, gaps, or conflicting chapters.
mangabind --input "Manga/Example Series" --dry-runUse --input for the path and quote paths that contain spaces. Unexpected positional arguments
and unknown flags are rejected with exit code 2, so a trailing --dry-run cannot be silently
ignored. A mistyped flag may include a suggestion in the error message. Flags can be written with
one dash or two: -input and --input are the same.
What was or would be written (wrote ..., would write ..., the batch headings and tally) goes to
stdout, and so does the help. Warnings, errors, notices such as the output folder that was chosen,
and progress go to stderr, so mangabind ... | tee list.txt captures only the results. With
--json, stdout is one JSON report and nothing else.
| Exit code | Meaning |
|---|---|
| 0 | Done. A folder with nothing to bind is done too, with a warning, and so is a run with warnings. |
| 1 | Something could not be done: a volume that could not be written, a metadata file that could not be used, a folder that could not be read. The messages, or the report's issues, say which. |
| 2 | The command line could not be used: an unknown flag, a stray argument, no --input. |
| 130 | Interrupted with Ctrl-C (or SIGTERM). |
A volume is written under a temporary name (.<volume>.<random>.part) in the output folder and
moved into place only when it is complete, so a run that fails or is interrupted never leaves half a
volume, and never damages one that was there. Press Ctrl-C once to stop: the unfinished file is
removed; a second Ctrl-C ends the program at once. See
the decision.
With --batch, each immediate subfolder is treated as a separate manga. A failure in one manga
does not stop the others (Ctrl-C does).
mangabind --input "Manga" --batch--combine writes one CBZ for the whole manga, with volumes containing chapter folders inside
the archive. The chapter-to-volume assignments stay the same.
mangabind --input "Manga/Example Series" --combineTo convert that structure into an EPUB with volumes and chapters in its table of contents, use
mangapress's --nested-toc option.
-i, -o, and -n are shortcuts for --input, --output, and --dry-run.
Use --quiet (-q) to show only warnings and errors, or mangabind --help for all options.
Names such as Chapter 1 identify a chapter but not its volume. Mangabind reports and skips
chapters without a volume assignment. To supply the missing assignments, save a mangabind.json
file in the manga's input folder:
{
"schema_version": 1,
"volumes": [
{ "number": "1", "chapters": ["1-7"] },
{ "number": "2", "chapters": ["8-16", "8.5"] }
]
}Entries can be individual numbers ("8.5"), special chapters ("21x1"), or inclusive ranges
("1-7"). A volume number in a chapter's own name takes precedence over the file.
Volume numbers go from 0 to 100000, and a file may list at most 100,000 chapters (a range counts each chapter in it); a file outside that is refused with an error. A chapter listed under two different volumes gets one warning for the file, and the last listing is the one that applies.
Use --metadata-file "path/to/mapping.json" to select a different file. In batch mode, put a
mangabind.json in each manga folder; one shared --metadata-file is not supported.
Mangabind uses the volumes field for grouping and does not fetch metadata online. Other fields,
including manga and source, may be stored by tools such as Mangabound without affecting
grouping. An empty volumes list leaves filename-based grouping unchanged; schema_version: 1
is still required. See the metadata decision for the format.
Mangabind copies pages into new archives. It does not resize, crop, recompress, or choose a cover; the first page follows chapter and page ordering. Keep generated archives outside the input folder.
A page is an image file: .jpg, .jpeg, .png, .gif, .webp, .bmp, .avif, .jxl, .tif or
.tiff, by its name. Other files inside a chapter (a notes.txt, a credits.html) are left out
with one warning per chapter, and the leftovers of a file manager or downloader (.DS_Store,
Thumbs.db, desktop.ini, ComicInfo.xml, macOS's __MACOSX/ and ._ files) are left out without
one. See the page rule.
An entry of a .cbz chapter that declares it would expand to more than a page can be (over 256 MiB,
or over 1000 times its stored size and over 16 MiB) is left out with a warning, so that an archive
made to fill a disk cannot. See the limit.
A symbolic link is followed only if it points to a file inside the manga's input folder. Other
links are skipped with a warning. With --batch, a link to a manga folder in the library is not
followed either, and is reported the same way. See
the link policy.
--json writes one report to stdout. Add --progress-json for live progress on stderr:
mangabind --input "Manga/Example Series" --dry-run --json
mangabind --input "Manga/Example Series" --json --progress-json >report.json 2>progress.jsonlUse mangabind --protocol-version to check compatibility. The
protocol reference defines fields, capabilities, issues, and progress
events. Completion is determined by the final report and exit code, not progress alone.
For a bug report, include your version, command, example chapter names, and the expected grouping. Small examples are usually enough to reproduce a naming problem. See CONTRIBUTING.md for setup, tests, and adding a parser, or browse the architecture decisions. Report suspected vulnerabilities privately as described in SECURITY.md.
MIT.