Repository navigation
v2.0.0
PDFMonkey CLI v2.0.0 Release Notes
The CLI is no longer just a local editor for your templates: you can now manage your whole PDFMonkey account from the terminal, from templates and folders to snippets and documents.
🚨 Upgrade Notes
- Node.js 22.12 or later is now required.
- The
--debugoption of thewatchcommands has been removed.
🌟 What's New
Templates & Folders
List, inspect, create, update, publish and delete templates, in code or builder mode:
pdfmonkey template list -w "My Workspace" -f Invoices
pdfmonkey template create -n "Invoice" -f Invoices --from ./invoice
pdfmonkey template update <template-id> --from ./invoice
pdfmonkey template publish <template-id>
Creating a template with --from links the local directory to it, so you can pdfmonkey watch it right away.
Template folders get their own commands too: pdfmonkey folder list|create|rename|delete.
Snippets
pdfmonkey snippet list -s header
pdfmonkey snippet create -n "Header" --from ./header
pdfmonkey snippet update <snippet-id> --from ./header
Documents
Generate documents and download them in one go:
pdfmonkey document create -t <template-id> --payload @data.json -o ./invoices/
The payload and meta data can be given inline, as @file.json or through stdin (-). You can also list documents with filters (template, status, search, update date), show, update, download and delete them.
Workspaces
pdfmonkey workspace list lists your workspaces and pdfmonkey whoami shows which account your API key belongs to.
Commands working within a workspace accept -w, --workspace with an ID or a name. You can also set a default one with the PDFMONKEY_WORKSPACE environment variable.
Built for scripts and AI agents
Every command accepts --json to output raw JSON, errors exit with a non-zero code, and destructive commands take -y, --yes to skip their confirmation:
pdfmonkey template list --json | jq '.[].id'
🐛 Fixes
template init <template-id>failing to fetch the template- The API key being displayed in the commands help
initcrashing after an API error, e.g. with an unknown IDwatchlooping when cancelling the "add another directory" prompt, and asking to resolve conflicts of several snippets at once- Directory names containing an ID being mistaken for an ID
Under the hood, the CLI now uses the official pdfmonkey SDK to talk to the API.
Happy PDFing! 📝✨