CLI
The perafly command (short name pf): publish folders, manage versions and projects, and reach every project feature from a terminal or CI.
On this page
Install
The CLI needs Node.js 22 or later.
Every command prints readable text by default and a JSON envelope with --json. Running perafly with no command shows the same as perafly status.
Sign-in and setup
Publishing and versions
perafly publish flags
The CLI never runs your build. If you publish source, the hosting provider detects the framework and builds it; perafly.jsonc can override the commands (see perafly.jsonc).
Projects and keys
Project features
These commands act on the linked project, or the one given with --project. Each has its own page with details.
Global flags and environment
There is no --token flag on purpose: arguments end up in shell history and process lists. The CLI rejects arguments that look like a secret key.
Files the CLI uses
Agent mode and confirmations
With PERAFLY_AGENT=1 or in CI (CI set), the CLI turns on --json and never asks questions. Agent mode never means --yes: a destructive action such as rollback, versions rm or storage rm still needs an explicit --yes, or it stops with confirmation_required.
Separately, the server asks a teammate to approve risky actions that come from an agent sign-in, like changing what's live. See Approvals.
JSON output and exit codes
With --json, success goes to stdout as { "data": … } and errors go to stderr as { "error": { code, message, … } }. Server errors keep the API's code (see Errors); recovery suggests the next command when there is one.
approval_required (exit code 2) when you pass --no-wait.- Run
perafly <command> --helpfor every flag of a command.