Zum Hauptinhalt springen

Commands

Generated page

Generated from the command definitions in packages/cli by apps/docs/scripts/gen-cli.ts; do not edit by hand.

Global flags​

FlagDescription
-V, --versionoutput 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)
--jsonmachine-readable output
--cido not open a browser for login; implied by CI=1
--verboseno 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​

CommandDescription
formfeed login [key]Sign in: opens the browser for device authorisation, or stores a key with --api-key
formfeed logoutRemove the stored key
formfeed whoamiShow 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 listenForward 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)

formfeed login [key]​

FlagDescription
--no-browserprint the URL instead of opening a browser

formfeed init [dir]​

FlagDescription
--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-workspacepull every template of the workspace (published version, else the latest) and its shared partials after creating the layout

formfeed types [slugs]​

FlagDescription
--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)
--remoteread schemas from the API even inside a project
--sdk-module <name>module the TypeScript file augments (default @formfeed/sdk)
--checkwrite nothing; exit 1 when the file differs from what would be generated

formfeed validate [slug]​

FlagDescription
--data <name>data set to check against (default: default)

formfeed einvoice <slug>​

FlagDescription
--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)

formfeed render <slug>​

FlagDescription
--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)
--remoterender the published remote version instead of local files

formfeed dev [slug]​

FlagDescription
--port <n>port (default 4400)
--host <host>bind address (default 127.0.0.1)
--data <name>initial data set
--locale <tag>initial locale
--openopen the browser

formfeed test [slug]​

FlagDescription
--data <name>only this data set
-u, --update-snapshotswrite the current output as the approved snapshot

formfeed listen​

FlagDescription
--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)
--liveinclude live-environment events (needs the webhook:manage scope)
--print-secretstart a session, print only its signing secret and end it again
--skip-verifyaccept a self-signed certificate of an https:// forward URL

formfeed trigger <event>​

FlagDescription
--template <slug>template to render
--data <file>JSON data (default: the local default data set, else the sample data of the published version)

formfeed workspaces​

Workspaces of the key's organisation

CommandDescription
formfeed workspaces delete <id>Delete a workspace (needs the workspace:delete scope); its content is removed after 30 days
formfeed workspaces delete <id>​
FlagDescription
--yesconfirm the deletion; required, because the API has no undo

formfeed config​

Read or write the user config

CommandDescription
formfeed config listShow 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

formfeed templates​

Templates of the workspace as files

CommandDescription
formfeed templates listRemote 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
formfeed templates pull [slug]​
FlagDescription
--draftpull the latest version even when it is a draft
formfeed templates push [slug]​
FlagDescription
--publishpublish the new version
--message <note>change note
--dry-runshow what would change without pushing
--forcepush even when the remote changed since the last pull
--channel <name>point this release channel at the new version (e.g. staging)
--allow-breakingpublish or move the channel although the data schema breaks callers of the current version

formfeed channels​

Release channels: which version a render with version=<channel> uses

CommandDescription
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
formfeed channels set <slug> <name> <version>​
FlagDescription
--canary <version>a second version that receives --percent of the renders
--percent <n>share of the canary, 1 to 50
--allow-breakinggo ahead although the data schema breaks callers of the current version
formfeed channels promote <slug> <name>​
FlagDescription
--allow-breakinggo ahead although the data schema breaks callers of the current version
formfeed channels rollback <slug> <name>​
FlagDescription
--allow-breakinggo ahead although the data schema breaks callers of the current version
formfeed channels delete <slug> <name>​
FlagDescription
--forcedelete even when the channel was used in the last hour

formfeed ci​

Commands for continuous integration

CommandDescription
formfeed ci previewRender the templates changed since a base ref and write a summary for the pull request
formfeed ci preview​
FlagDescription
--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)
--allrender every template instead of the changed ones

formfeed brand​

The organisation's brand kit, for local previews and renders

CommandDescription
formfeed brand pullDownload the brand kit into .formfeed/brand.json; dev, render, test and ci preview use it as brand

formfeed partials​

Shared partials of the organisation, kept in the project's partials folder as <name>.html

CommandDescription
formfeed partials listRemote 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)
formfeed partials push [names]​
FlagDescription
--engine <id>engine of new partials (default: the recorded engine, else the project engine)
--dry-runshow what would be pushed
--forcepush even when the remote partial changed since the last pull

formfeed files​

The workspace file library, mirrored in the project's files folder

CommandDescription
formfeed files listFiles 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)
formfeed files list​
FlagDescription
--prefix <prefix>only names starting with this, e.g. brand/
formfeed files push [names]​
FlagDescription
--dry-runshow what would be uploaded

formfeed pdf​

PDF tools through the API

CommandDescription
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
formfeed pdf convert <source>​
FlagDescription
--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
--landscapelandscape for spreadsheets and documents without their own page setup
--single-page-sheetseach spreadsheet sheet on one page
--no-downloadcreate the PDF render without downloading it

formfeed renders​

Inspect renders

CommandDescription
formfeed renders get <id>Show one render
formfeed renders listRecent 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
formfeed renders list​
FlagDescription
--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)
--allfollow the cursor and list every match
formfeed renders pull <id>​
FlagDescription
--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-redactskip the redaction formfeed.json sets in pull.redact
--runrender the data set locally and print diagnostics with template line and column
--snapshotwrite tests/snapshots/<name>.html from the local render (not for failed renders)
--forceoverwrite an existing data set of that name

formfeed webhooks​

Webhook events and deliveries

CommandDescription
formfeed webhooks resend <eventId>Send a stored event (evt_…) again, to the running formfeed listen session or to --to
formfeed webhooks resend <eventId>​
FlagDescription
--to <id>endpoint or listen session id (default: the session of a running formfeed listen with the same key)

formfeed import​

Import templates from other services (apitemplate.io, PDFMonkey, jsreport)

CommandDescription
formfeed import apitemplateCreate local templates from apitemplate.io: read with an API key, or from exported files
formfeed import pdfmonkeyCreate local templates from PDFMonkey code templates, read through their API
formfeed import jsreport <file>Create local templates from a jsreport export (.jsrexport)
formfeed import apitemplate​
FlagDescription
--key <key>apitemplate.io API key (or APITEMPLATE_API_KEY)
--template <ids...>template ids to read with the key
--allread 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)
formfeed import pdfmonkey​
FlagDescription
--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)
--draftimport the unpublished drafts
formfeed import jsreport <file>​
FlagDescription
--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.