Skip to content

Command reference

Find global flags, output modes, aliases, and every available command.

Find a command

Command aliases

Most commands have short aliases. Subcommands also have aliases: ls for list, rm for delete, show for view.

pf p→pf projects
pf t→pf tasks
pf cl→pf checklist
pf st→pf subtasks
pf po→pf posts
pf c→pf comments
pf r→pf reactions
pf m→pf media
pf n→pf notifications
pf ws→pf workspace
pf wh→pf webhooks
pf cv→pf canvases
pf ch→pf chat
pf i→pf init
pf audit→pf audit-logs

Global flags

These options are accepted by every command. See JSON output and filtering below for command support.

--json [fields]Output as JSON, optionally selecting specific fields
--jq <expr>Filter JSON output with a jq expression
--template <text>Format output with {{ jq expression }} placeholders
--verboseShow HTTP request/response details
--debugShow truncated request/response bodies with known sensitive fields redacted
--profile <name>Use a specific config profile
--api-key <key>Override the API key for this command
--project <id>Override the default project
--workspace <slug>Assert the workspace slug for workspace-scoped API calls
--no-colorDisable colored output
--record-undoSave each edit's previous state so pf undo can restore it. Costs one extra request per edit.
--no-inputNever prompt. A missing value fails with exit code 2. PF_NO_INPUT=1 does the same.

--debug also enables --verbose and truncates displayed JSON bodies to 500 characters. Request bodies, successful responses, and structured error bodies redact fields named secret, token, password, apiKey, api_key, api-key, or authorization, case-insensitively, including nested fields. Other text and fields can still appear in output.

Common command-specific flags

These flags appear on several resource commands but are not global. Run the target command with --help before relying on one in a script.

--sort <field>Sort supported list output by one field
--reverseReverse supported list output
--confirmSkip a confirmation prompt on supported mutations. With --no-input or PF_NO_INPUT, a command that would ask fails with exit code 2 unless you pass it
--dry-runPreview a supported destructive operation

JSON output and filtering

Use --json on supported commands for machine-readable output. Some mutations print confirmation text even with this flag. Optionally select specific fields or apply a jq filter:

Shell
pf tasks list --json
pf tasks list --json id,title,status
pf posts list --json --jq ".[].title"
pf tasks list --jq '.[] | select(.status == "todo") | .identifier'

--jq runs a full jq 1.8 expression, compiled to WebAssembly, so you do not need a separate jq install. Strings print without quotes, other values print as indented JSON, and every output is printed. An invalid expression or a runtime error exits with code 2 and prints nothing else.

--template formats each row with text and {{ jq expression }} placeholders. An array is rendered once per element. Strings print as they are, null prints nothing, structures print as compact JSON, and an expression with several outputs joins them with commas. It cannot be combined with --jq.

Shell
pf tasks list --template '{{.identifier}}\t{{.status}}\t{{.title}}'

List commands that page accept --all to follow every cursor and print one list. It stops after 100 pages or 10,000 rows, and the last cursor stays set when it does. Add --page to --json to keep hasMore and nextCursor; without it, --json prints the rows alone. When a page has more rows, the command says to run the same command with --cursor and the value to use; pf events list and pf webhooks replay print the whole line instead.

Shell
pf docs list --all --json id,title
pf time list --all --page --json

Sorting is available on supported list commands:

Shell
pf tasks list --sort priority --reverse
pf posts list --sort title

Dry runs

Destructive commands such as delete, archive, and mark-all-read support --dry-run to preview what would happen without making changes:

Shell
pf posts delete <id> --dry-run
pf projects archive <id> --dry-run

Use the CLI in automation

  • Use a workspace-owned service account for unattended jobs and grant only the scopes and workspace access the job needs.
  • Pass credentials through a protected environment or secret manager. Do not put --api-key values in shared shell history or process logs.
  • Use --json for machine-readable output and pin the fields your script consumes.
  • Pass explicit workspace and project values in jobs that can access more than one target. Do not rely on an interactive picker.
  • Do not run pf in a shell loop that calls it again right away. Schedule checks at least a minute apart, or use a webhook to react to changes. The integration guidelines cover polling and retries.
  • Pass --no-input or set PF_NO_INPUT=1 so a missing value fails with exit code 2 instead of waiting at a prompt.
  • Preview supported destructive commands with --dry-run, then require an explicit change gate before --confirm.
  • Branch on the exit code instead of parsing messages. Request logging from --verbose and --debug goes to standard error; review it before sharing.

Exit codes

0
Success.
1
General error: a server or network failure, or an HTTP 4xx other than 401, 403, and 429.
2
Usage error: an unknown command, a bad flag value, or a missing argument.
4
Authentication needed or rejected: no API key, or HTTP 401 or 403.
5
Rate limited: HTTP 429 after the retries described below.
130
Interrupted with Ctrl-C.

Errors print to standard error with the problem code, a documentation link for it, and the request ID. With --json or --jq, the error is one JSON problem document on standard error instead, with the same fields plus exitCode, so standard output stays parseable.

Fix script problems

A request times out or fails
Ordinary API requests have a 30-second timeout per attempt, including reading the response body. Reads retry server errors up to three times, after 1, 2, and 4 seconds. Writes are not repeated after a server error, connection failure, or timeout. Check whether the change completed before running it again. Workspace export transfers and the Aseprite bridge use their own transfer handling.
A request is rate limited
Rate-limit rejections (HTTP 429), including writes, retry up to three times using Retry-After seconds or an HTTP date, with a two-second fallback for a missing or invalid value. Delays over 30 seconds return the rate-limit error so you can retry later. Both cases exit with code 5.
A scripted response changed
Remove presentation-only parsing, request --json with named fields, and check the API version reported by pf auth check or pf limits before changing the script.

Next steps

Image preview
100%