Use a configuration file
Save settings in JSON and pass --config to reuse them. This example uses an installed CopyManga extension.
Save default settings
Section titled “Save default settings”Create ./profiles/copymanga.json:
{ "version": 1, "source": "copymanga", "output": "./manga", "jobs": 2, "retries": 2}version must be the number 1. For source, use an ID from comic-dl sources. jobs controls chapter concurrency, and retries controls the number of additional attempts after a transient error. Extensions installed with add load automatically, so you don’t need to list them in this file.
Load the settings
Section titled “Load the settings”Run these commands from the parent directory of profiles/:
comic-dl l xiangkanbaitiantongxuederuanruobiaoqing --config ./profiles/copymanga.jsoncomic-dl d xiangkanbaitiantongxuederuanruobiaoqing --config ./profiles/copymanga.json -c 2-4The CLI does not look for a config file automatically; pass --config each time. A relative output path in JSON is resolved from the directory containing the config file, so this writes to ./profiles/manga/. With no output directory set in the CLI or config, download writes to the current working directory.
An output path like "~/manga" instead starts at your home directory.
Override settings for one command
Section titled “Override settings for one command”comic-dl d xiangkanbaitiantongxuederuanruobiaoqing --config ./profiles/copymanga.json -c 2-4 -o ./preview --jobs 1CLI options take precedence and do not rewrite the config file. Relative paths passed on the command line start at the current working directory, so this writes to ./preview/ instead of ./profiles/preview/. You can also override the default source with --source.
Keep separate config files for different sources or output directories. Set cookies and API keys as directed by the extension’s README. See configuration and environment variables for all supported settings.