Install the CLI
The mkp CLI lets you manage templates, check your credit balance, and generate PDFs directly from your terminal. It is written in Go and distributed via Homebrew.
Install
brew install mkpdfs/mkpdfs/mkpdfsVerify the installation:
mkp --versionLog in
mkp uses a device-flow login — your browser handles authentication so you never paste a password into the terminal.
mkp auth loginThe CLI prints a short code and opens mkpdfs.com/cli/authorize in your browser. Approve the request, and the CLI stores a token in ~/Library/Application Support/mkpdfs/config.json. From that point on every mkp command uses your account automatically.
Generate your first PDF
Once logged in, grab a template ID from the dashboard and create data.json with the following content:
{ "name": "World" }Then generate the PDF:
mkp pdf generate -t <your-template-id> -d data.jsonThe CLI prints the pre-signed URL to the generated PDF.
Working with templates
Pull a template from the cloud to your local filesystem:
mkp templates pull <template-id>Edit the .hbs file locally, then push it back:
mkp templates push <template-id> template.hbsNext steps
- CLI — Overview for the full list of commands and flags.
- CLI — Templates for the complete template management reference.
- CLI — Credits to check your balance and view usage from the terminal.