Skip to content

CLI Reference

This reference provides a comprehensive overview of the Cairn CLI command hierarchy, global flags, and system exit codes. It is designed for autonomous agent instrumentation, CI/CD pipes, and low-latency settlement workflows.

Global Flags

These flags can be applied to any command to override local configuration or environment variables.

FlagEnv VarDescription
--api-urlBACKPAC_API_URLBase URL for the Backpac Identity/Admin API.
--worker-urlBACKPAC_WORKER_URLBase URL for RPC and Intent submission workers.
--chainCAIRN_CHAINBlockchain family (e.g., ethereum, solana).
--networkCAIRN_NETWORKNetwork within the chain (e.g., mainnet, sepolia, devnet).
--jwtBACKPAC_JWTBearer token to bypass saved credentials.
--outputCAIRN_OUTPUTOutput format: json (default) or text (key=value).
--quiet, -qNoneSuppress all stdout (exit code only).

Command Categories

auth

Agent authentication and session management using EIP-4361 patterns.

CommandArgumentsDescription
auth challenge--wallet, --ows, --did, [--chain]Request a cryptographic challenge for signing.
auth connect--wallet, --ows, --did, --nonce, [--signature], [--key-file]Submit signature to receive a JWT. Auto-signs if --key-file or --ows provided.
auth refreshNoneMints a new JWT using the current session.
auth statusNoneVerify token health and expiry.

balance

Query native token balances across one or multiple wallets.

CommandArgumentsDescription
balance[--address]Check balance for a specific address or all OWS wallets.

wallet (OWS)

Secure OpenWallet Standard (OWS) key management for agents.

CommandArgumentsDescription
wallet create--name, [--length], [--passphrase]Generate a new encrypted OWS wallet.
wallet listNoneList all locally configured OWS profiles.
wallet delete--namePermanently remove a wallet profile.

identity

Manage DID-anchored agent identities.

CommandArgumentsDescription
identity register--did, --wallet, --public-key, [--display-name]Anchor a DID to a wallet.
identity rotate--did, --current-key, --new-keyRotate Ed25519 signing keys.
identity get<did>Look up state for a registered DID.

poi (Proof of Intent)

Lifecycle management for structured settlement sessions.

CommandArgumentsDescription
poi create[--parent], [--max-depth], [--ttl], [--metadata], [--key-file]Initialize a new signed PoI tracking record.
poi get<poi_id>Retrieve PoI state.
poi list[--status], [--since], [--limit]Filter authenticated agent's PoI history.

intent

Dispatch and track individual execution intents.

CommandArgumentsDescription
intent send--method, [--params], [--params-file], [--poi-id], [--confidence]Submit JSON-RPC payload as an intent.
intent status<intent_id>Check state of a specific intent.
intent wait<intent_id>, [--interval], [--timeout]Block until intent reaches a terminal state.
intent history<intent_id>, [--limit], [--status]View state transition audit log.
intent list[--status], [--since], [--limit]List agent's execution history.
intent verify<intent_id>, [--receiver-did], [--min-confidence]Verify PoI and payment context for a receiver.

proof (PoT)

Cryptographic verification of transaction finality.

CommandArgumentsDescription
proof get<id>, [--include-telemetry], [--verify-signature], [--raw]Fetch PoT bundle for an Intent or PoI.
proof verify<id>Perform local Ed25519 integrity check via JWKS.

rpc

Direct protocol-level JSON-RPC operations (no intent wrapping).

CommandArgumentsDescription
rpc healthNoneCheck worker connectivity and chain ID.
rpc nonce[--address]Get the next valid transaction nonce.
rpc quoteNoneRequest a gas/fee estimate from the network.

policy

Administer Agentic Guardrails and Execution Policies locally.

CommandArgumentsDescription
policy add--fileLoad an OWS policy from a JSON definition.
policy listNoneList currently active guardrails.
policy delete--idRemove a specific policy enforcement.

Exit Codes

CodeCondition / MeaningHTTP Mapping
0Success200, 201, 204
1General Error (IO, Serialization)500
2Value MismatchIntent context validation fail
3Not FinalizedTerminal state required
4Forbidden / Unauthorized401 / 403
5Not Found404
10Operation TimeoutWait duration exceeded
11Signature ErrorCryptographic match failure
13Network ErrorUnreachable endpoint
16Insufficient Funds / x402402 Payment Required

Settlement Certainty Layer