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/mkpdfs

Verify the installation:

mkp --version

Log in

mkp uses a device-flow login — your browser handles authentication so you never paste a password into the terminal.

mkp auth login

The 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.json

The 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.hbs

Next steps