Skip to main content
Requires Node.js 22.0.0 or later.
Run checkfu <command> --help to see its flags, or checkfu deploy to deploy Checkfu.

Connect to a deployment

checkfu deploy saves a connection for the deployment it creates. For an existing deployment, run login with its API URL. It reads CHECKFU_API_KEY or prompts for it, verifies it, and saves both. checkfu logout removes the saved connection. The CLI stores one connection in the absolute CHECKFU_CONFIG_DIR you select. Otherwise it uses the first available absolute location from $XDG_CONFIG_HOME/checkfu, $APPDATA/checkfu, $HOME/.config/checkfu, or $USERPROFILE/.config/checkfu. The API URL resolves in order from --base-url, CHECKFU_BASE_URL, the saved connection in the active config directory, or http://localhost:1337. The key comes from CHECKFU_API_KEY, or the saved key when the target URL matches the saved connection (the CLI never sends a saved key to a different URL). When targeting a different URL with --base-url or CHECKFU_BASE_URL, either run checkfu login for it or export its CHECKFU_API_KEY.

Global flags

Input

Body fields map to flags (--name, --environment-id). You can also pipe a JSON or YAML object on stdin; single-value flags override piped fields, while repeatable structured flags (--event, --initial-event, --file) cannot be combined with stdin. Text-body and structured flags (such as --system, --content, and JSON flags) accept @path to read from a file (use @@ for a literal leading @).
Writes that accept one take --idempotency-key. sessions:events send, automations create, and files upload generate a key if omitted and print it to stderr. Paginated list commands take --limit and --page. sessions:resources list returns all remaining resources when you omit --limit.

Sessions

sessions connect streams a Session and sends each line you type as a user.message. Pass --after SEQ to replay from a sequence number. Messages (agent.message, user.message, system.message) print to stdout; tool calls, thinking, and status print to stderr. With piped stdin, the command waits for each turn and exits, returning code 3 if a turn pauses waiting for a tool answer:

Files

Downloads refuse to overwrite an existing file and verify size and SHA-256 before writing. For curl examples that run against the File endpoints, see Files.

Agents as code and deploy

Resource commands

There is one command per HTTP endpoint. Path parameters become flags such as --agent-id, and subresources use a colon: checkfu sessions:events send.

Exit codes

API errors print to stderr as Error: API error (<status> <type>): <message> [request_id: <id>].