One-shot mode
Pass a directory or file and awesome-md-to-pdf will run once and exit. This is the mode you want for CI, Makefiles, and pre-commit hooks.
Table of contents
Usage
awesome-md-to-pdf <inputDir> [options]
If --mode is omitted you’ll be prompted interactively for light or
dark. Pass --mode light or --mode dark (or set the MD_TO_PDF_MODE
env var) in CI to skip the prompt.
Examples
Minimal
awesome-md-to-pdf docs
Recursive, with TOC and cover page, dark mode
awesome-md-to-pdf docs -r --toc --cover --mode dark
Merge everything into one report
awesome-md-to-pdf docs -s --toc --cover --mode light -o build
Theme with mode-specific designs
awesome-md-to-pdf docs \
--design-light designs/linear-light.md \
--design-dark designs/linear-dark.md \
--mode dark
Override just the accent
awesome-md-to-pdf docs --accent "#0ea5e9" --mode light
CI-friendly (no banner, no prompt)
awesome-md-to-pdf docs \
--mode light --no-banner \
--toc --cover \
-o artifacts
Watch mode (rebuild on change)
awesome-md-to-pdf docs --mode light -w
Exit codes
| Code | Meaning |
|---|---|
0 |
All files rendered successfully. |
1 |
One or more files failed. The error is printed to stderr. |
2 |
Invalid CLI flags. |
Flags
See the CLI reference for the full table.