Generated from the command definitions in packages/cli by apps/docs/scripts/gen-cli.ts; do not edit by hand.
Global flags
| Flag | Description |
|---|
-V, --version | output the version number |
--api-key <key> | API key (overrides the stored login) |
--base-url <url> | API base URL, used instead of the region’s address |
--workspace <org/workspace> | workspace label shown by config list; the API key decides the workspace |
--region <region> | API region (default eu) |
--json | machine-readable output |
--ci | do not open a browser for login; implied by CI=1 |
--verbose | no effect; accepted so existing scripts keep working |
Flags beat environment variables (FORMFEED_API_KEY, FORMFEED_BASE_URL, FORMFEED_WORKSPACE, FORMFEED_REGION), which beat formfeed.json, which beats the user config; see Configuration.
Commands
| Command | Description |
|---|
formfeed login [key] | Sign in: opens the browser for device authorisation, or stores a key with --api-key |
formfeed logout | Remove the stored key |
formfeed whoami | Show the workspace, plan and usage of the current key |
formfeed init [dir] | Create formfeed.json and the folder layout; --from-workspace pulls the existing templates |
formfeed types [slugs] | Generate TypeScript or Python types for the data of templates |
formfeed validate [slug] | Compile locally and print diagnostics; exit 1 on errors |
formfeed einvoice <slug> | Write the e-invoice XML of a data set, offline: the XML a render embeds in the PDF |
formfeed render <slug> | True render through the API from the local files (test keys are free) |
formfeed dev [slug] | Local preview with hot reload (http://localhost:4400) |
formfeed test [slug] | Run every data set through compile and analysis and compare approved snapshots |
formfeed listen | Forward the workspace's webhook events to a local server, signed with a session secret |
formfeed trigger <event> | Make a real async render so a genuine event reaches formfeed listen (render.completed) |
| Flag | Description |
|---|
--no-browser | print the URL instead of opening a browser |
| Flag | Description |
|---|
--engine <id> | default engine for new templates (jinja2, liquid, handlebars) |
--workspace <org/workspace> | workspace label written to formfeed.json; the API key decides the workspace |
--from-workspace | pull every template of the workspace (published version, else the latest) and its shared partials after creating the layout |
| Flag | Description |
|---|
--lang <lang> | ts or python (default: formfeed.json types.lang, else ts) |
--out <file> | output file (default: formfeed.d.ts or formfeed_templates.py in the project root) |
--channel <name> | read the schemas of this channel from the API (default: published) |
--remote | read schemas from the API even inside a project |
--sdk-module <name> | module the TypeScript file augments (default @formfeed/sdk) |
--check | write nothing; exit 1 when the file differs from what would be generated |
| Flag | Description |
|---|
--data <name> | data set to check against (default: default) |
| Flag | Description |
|---|
--data <name-or-file> | data set name or a JSON file |
--out <file> | output file (default: <slug>.xml) |
--profile <profile> | basic or en16931 (default: the template's settings, else en16931) |
| Flag | Description |
|---|
--data <name-or-file> | data set name or a JSON file |
--out <file> | output file (default: <slug>.<ext>) |
--output <format> | pdf, png, jpg, webp, docx or pptx (default: the template's kind and settings) |
--remote | render the published remote version instead of local files |
| Flag | Description |
|---|
--port <n> | port (default 4400) |
--host <host> | bind address (default 127.0.0.1) |
--data <name> | initial data set |
--locale <tag> | initial locale |
--open | open the browser |
| Flag | Description |
|---|
--data <name> | only this data set |
-u, --update-snapshots | write the current output as the approved snapshot |
| Flag | Description |
|---|
--forward-to <url> | local URL that receives the deliveries (default http://localhost:3000/webhooks) |
--events <types> | comma-separated event types, e.g. render.completed,job.failed (default: all but the opt-in storage.delivered and storage.failed) |
--live | include live-environment events (needs the webhook:manage scope) |
--print-secret | start a session, print only its signing secret and end it again |
--skip-verify | accept a self-signed certificate of an https:// forward URL |
| Flag | Description |
|---|
--template <slug> | template to render |
--data <file> | JSON data (default: the local default data set, else the sample data of the published version) |
Workspaces of the key's organisation
| Command | Description |
|---|
formfeed workspaces delete <id> | Delete a workspace (needs the workspace:delete scope); its content is removed after 30 days |
| Flag | Description |
|---|
--yes | confirm the deletion; required, because the API has no undo |
Read or write the user config
| Command | Description |
|---|
formfeed config list | Show the effective settings and the config files they are read from |
formfeed config get <key> | Read a user config value (apiKey, baseUrl, workspace, region) |
formfeed config set <key> <value> | Write a user config value |
Templates of the workspace as files
| Command | Description |
|---|
formfeed templates list | Remote templates with published version and status |
formfeed templates pull [slug] | Download published versions into files (--draft for the latest drafts) |
formfeed templates push [slug] | Create draft versions from local files; --publish publishes them |
formfeed templates diff [slug] | Show local changes against the latest remote version |
| Flag | Description |
|---|
--draft | pull the latest version even when it is a draft |
| Flag | Description |
|---|
--publish | publish the new version |
--message <note> | change note |
--dry-run | show what would change without pushing |
--force | push even when the remote changed since the last pull |
--channel <name> | point this release channel at the new version (e.g. staging) |
--allow-breaking | publish or move the channel although the data schema breaks callers of the current version |
Release channels: which version a render with version=<channel> uses
| Command | Description |
|---|
formfeed channels list <slug> | Channels of a template with their versions, canaries and renders of the last 24 hours |
formfeed channels set <slug> <name> <version> | Create a channel or point it at a version; on published this publishes |
formfeed channels promote <slug> <name> | Make the canary the main version of the channel |
formfeed channels rollback <slug> <name> | Return the channel to the version before its last move |
formfeed channels delete <slug> <name> | Delete a channel; --force when renders of the last hour still used it |
| Flag | Description |
|---|
--canary <version> | a second version that receives --percent of the renders |
--percent <n> | share of the canary, 1 to 50 |
--allow-breaking | go ahead although the data schema breaks callers of the current version |
| Flag | Description |
|---|
--allow-breaking | go ahead although the data schema breaks callers of the current version |
| Flag | Description |
|---|
--allow-breaking | go ahead although the data schema breaks callers of the current version |
| Flag | Description |
|---|
--force | delete even when the channel was used in the last hour |
Commands for continuous integration
| Command | Description |
|---|
formfeed ci preview | Render the templates changed since a base ref and write a summary for the pull request |
| Flag | Description |
|---|
--base <ref> | git ref to compare against (default origin/main) |
--out <dir> | directory for the rendered files (default formfeed-preview) |
--summary <file> | markdown summary file (default formfeed-preview.md) |
--all | render every template instead of the changed ones |
The organisation's brand kit, for local previews and renders
| Command | Description |
|---|
formfeed brand pull | Download the brand kit into .formfeed/brand.json; dev, render, test and ci preview use it as brand |
Shared partials of the organisation, kept in the project's partials folder as <name>.html
| Command | Description |
|---|
formfeed partials list | Remote shared partials with version and local sync status |
formfeed partials pull [names] | Download shared partials (all when no name is given) and record their versions in .formfeed/state.json |
formfeed partials push [names] | Create or update shared partials from the partials folder (all recorded ones when no name is given) |
| Flag | Description |
|---|
--engine <id> | engine of new partials (default: the recorded engine, else the project engine) |
--dry-run | show what would be pushed |
--force | push even when the remote partial changed since the last pull |
The workspace file library, mirrored in the project's files folder
| Command | Description |
|---|
formfeed files list | Files in the workspace library |
formfeed files push [names] | Upload new and changed files from the files folder; the same name replaces the remote file |
formfeed files pull [names] | Download library files into the files folder |
formfeed files delete <name> | Remove a file from the workspace library (the local copy stays) |
| Flag | Description |
|---|
--prefix <prefix> | only names starting with this, e.g. brand/ |
| Flag | Description |
|---|
--dry-run | show what would be uploaded |
PDF tools through the API
| Command | Description |
|---|
formfeed pdf convert <source> | Convert a Word, Excel, PowerPoint, OpenDocument, RTF or HTML file to PDF (Starter plan and above); a render id (rnd_…) of a Word or PowerPoint template converts its output |
| Flag | Description |
|---|
--out <file> | output file (default: the file name with .pdf, or <render id>.pdf) |
--page-ranges <ranges> | pages to convert, e.g. 1-3,5 |
--landscape | landscape for spreadsheets and documents without their own page setup |
--single-page-sheets | each spreadsheet sheet on one page |
--no-download | create the PDF render without downloading it |
Inspect renders
| Command | Description |
|---|
formfeed renders get <id> | Show one render |
formfeed renders list | Recent renders of the workspace, newest first |
formfeed renders delete-outputs <id> | Remove the stored files of a render before they expire |
formfeed renders pull <id> | Save a render's stored request data as a data set of its template; --run reproduces it locally |
| Flag | Description |
|---|
--template <slug> | only renders of this template |
--status <status> | queued, rendering, succeeded or failed |
--environment <env> | live or test |
--since <iso> | only renders created at or after this time |
--until <iso> | only renders created at or before this time |
--limit <n> | page size (1-100) (default 20) |
--all | follow the cursor and list every match |
| Flag | Description |
|---|
--as <name> | data set name (default: render-<last 6 characters of the id>) |
--redact [paths...] | replace strings with same-shape placeholders; only these data paths when given (customer.*, items[].name) |
--no-redact | skip the redaction formfeed.json sets in pull.redact |
--run | render the data set locally and print diagnostics with template line and column |
--snapshot | write tests/snapshots/<name>.html from the local render (not for failed renders) |
--force | overwrite an existing data set of that name |
Webhook events and deliveries
| Command | Description |
|---|
formfeed webhooks resend <eventId> | Send a stored event (evt_…) again, to the running formfeed listen session or to --to |
| Flag | Description |
|---|
--to <id> | endpoint or listen session id (default: the session of a running formfeed listen with the same key) |
Import templates from other services (apitemplate.io, PDFMonkey, jsreport)
| Command | Description |
|---|
formfeed import apitemplate | Create local templates from apitemplate.io: read with an API key, or from exported files |
formfeed import pdfmonkey | Create local templates from PDFMonkey code templates, read through their API |
formfeed import jsreport <file> | Create local templates from a jsreport export (.jsrexport) |
| Flag | Description |
|---|
--key <key> | apitemplate.io API key (or APITEMPLATE_API_KEY) |
--template <ids...> | template ids to read with the key |
--all | read every PDF template of the account with the key |
--group <name> | read the PDF templates of this apitemplate.io group with the key |
--source-region <region> | apitemplate.io region of the account: default, de, us, au, alt, alt-de, alt-us (or APITEMPLATE_REGION) |
--html <file> | template body (HTML), instead of reading it with a key |
--css <file> | stylesheet (with --html) |
--settings <file> | settings JSON: paper, margins, header and footer (with --html) |
--sample <file> | sample data JSON (with --html) |
--name <name> | template name (with --html) |
--slug <slug> | folder and slug (default: from the name; with --html) |
| Flag | Description |
|---|
--key <key> | PDFMonkey secret API key (or PDFMONKEY_API_KEY) |
--template <ids...> | template ids to import |
--workspace-id <id> | import every code template of this PDFMonkey workspace |
--snippet <name=file...> | snippet code for templates that load_snippets (repeatable) |
--draft | import the unpublished drafts |
| Flag | Description |
|---|
--template <paths...> | templates to import by folder path or name (default: every Handlebars chrome-pdf/chrome-image template) |
Planned
Not in this release: pixel snapshots for formfeed test (the HTML snapshot works today), renders logs --follow, keys create|list|revoke, --local-chromium and --open-in-editor for dev.
Exit codes
See Exit codes.