Contributing to Marp CLI
August 9, 2025 · View on GitHub
Thank you for taking the time to read how to contribute to Marp CLI! This is the guideline for contributing to Marp CLI.
We are following the contributing guideline of Marp team projects. You have to read this before starting work.
Table of contents
Development
Installation
npm install
Build and watch
# Build (Bundle and minify)
npm run build
# Watch (Bundle only)
npm run watch
Use built version
Use ./marp-cli.js instead of marp command.
./marp-cli.js --help
Standalone binary
Standalone binaries created by pkg will output to ./bin directory.
# Build & create standalone binaries
npm run build:standalone
./bin/marp-cli-linux --help
Testing
# Run all tests
npm run test
# Run tests with code coverage
npm run test:coverage
# Run test for specific file(s)
npm run test -- ./test/marp-cli.ts
You need to install Google Chrome, Mozilla Firefox, and LibreOffice for running all tests.
Debug
If you have any trouble with Marp CLI, --debug (-d) option will help you to find the cause of the problem.
Enable debug logging
marp --debug=true slide.md
Filter debug log by namespace
# Show debug log about marp-cli:browser, except marp-cli:browser:finder
marp --debug "marp-cli:browser*,-marp-cli:browser:finder" slide.md
You can use DEBUG environment variable to enable debug log filter too: DEBUG="marp-cli:browser*,-marp-cli:browser:finder"
Full debug log including dependencies
marp --debug=all slide.md
It is equivalent to DEBUG="*" marp slide.md.
Note
--debug (-d) option is available only for CLI interface. If you are using API, you have to use DEBUG environment variable instead.