CLI overview
formfeed is the command line tool for working with templates as code and for everything you would otherwise click through in the app.
npx formfeed --help
It needs Node.js 22 or later. Installation covers installing it globally and logging in.
What it does
| Task | Commands | Needs the API |
|---|---|---|
| Log in and check the key | login, logout, whoami | yes |
| Read and write the user config | config list, config get, config set | no |
| Delete a workspace | workspaces delete | yes |
| Start a project, sync templates | init, templates list, templates pull, templates diff, templates push | yes |
| Preview with hot reload | dev | no (only the true render uses it) |
| Check and test | validate, test | no |
| Write the XML of an e-invoice from a data set | einvoice | no |
| Render a real PDF or image, or fill a Word or PowerPoint template | render | yes (free with a test key; the PDF of a Word or PowerPoint template needs the Starter plan) |
| Convert Word, Excel, PowerPoint and other office files to PDF | pdf convert | yes (Starter plan and above) |
| Sync the brand kit and shared partials | brand pull, partials list, partials pull, partials push | yes |
| Sync the file library | files list, files push, files pull, files delete | yes |
| Inspect and clean up renders | renders list, renders get, renders delete-outputs | yes |
| Reproduce a production render as a data set or test | renders pull | yes |
| Develop webhooks locally | listen, webhooks resend, trigger | yes |
| Preview changed templates in a pull request | ci preview | yes |
| Generate types for template data | types | only with --remote or --channel, or outside a project |
| Move release channels, promote and roll back | channels list, channels set, channels promote, channels rollback, channels delete | yes |
| Import from other services | import apitemplate, import pdfmonkey, import jsreport | no (PDFMonkey, and apitemplate.io with --key, are read through their own APIs) |
The offline commands run the same template engine as the Formfeed servers, so what validate accepts renders in production. That includes Word and PowerPoint templates: the CLI fills them on your machine, and only their conversion to PDF goes through the API.
The commands that need the API use the key from --api-key, FORMFEED_API_KEY or the stored login, in that order. The key alone decides which workspace they act on; see Configuration.
The five commands you will use most
formfeed dev invoice # live preview on http://localhost:4400
formfeed validate # check every template against its default data set
formfeed test # render every data set and compare with the approved snapshots
formfeed render invoice --out invoice.pdf # the PDF the API makes from your local files
formfeed templates push --publish # ship it
Scripting
Every command accepts --json: it prints one JSON document to stdout instead of the text lines. The CLI never asks a question, so it runs unattended as it is. --ci only keeps formfeed login from opening a browser; a set CI environment variable does the same and also turns off the progress line that long commands draw on a terminal. Without --json, errors go to stderr as error: …. Exit codes are stable and documented in Exit codes:
formfeed renders list --status failed --since 2026-09-01T00:00:00Z --all --json | jq -r '.data[].id'
Next
- Templates as code: the whole workflow, step by step.
- Commands: every command and flag.
- Configuration:
formfeed.json, environment variables, precedence. - CI usage: GitHub Actions and GitLab CI.