Skip to content

CLI Reference

The @agnt-rcpt/openclaw package ships a CLI for inspecting the receipt database outside of active agent sessions. Use it for post-session audits, automated compliance checks, or integration with external tools via JSON output and jq.

Terminal window
npx @agnt-rcpt/openclaw <subcommand> [flags]
SubcommandPurpose
receiptsList and filter receipts
verifyVerify the integrity of a receipt chain
exportExport one receipt or a full chain

Lists receipts from the local database, with optional filters.

Terminal window
npx @agnt-rcpt/openclaw receipts [flags]
FlagTypeDescription
--riskstringFilter by risk level: low, medium, high, critical
--actionstringFilter by action type (e.g. system.command.execute)
--statusstringFilter by outcome: success or failure
--limitnumberMaximum number of results to return
--dbpathPath to the SQLite database (default: ~/.openclaw/agent-receipts/receipts.db)
--jsonflagOutput raw JSON instead of the default tabular display

List all high-risk receipts:

Terminal window
npx @agnt-rcpt/openclaw receipts --risk high

List the last 20 receipts in JSON:

Terminal window
npx @agnt-rcpt/openclaw receipts --limit 20 --json

Filter by action type and output JSON for downstream processing:

Terminal window
npx @agnt-rcpt/openclaw receipts --action system.command.execute --json

Use jq to filter shell commands by risk level:

Terminal window
npx @agnt-rcpt/openclaw receipts --action system.command.execute --json \
| jq '.receipts[] | select(.risk == "high")'

Verifies the cryptographic integrity of a receipt chain: checks every Ed25519 signature and every SHA-256 hash link between receipts.

Terminal window
npx @agnt-rcpt/openclaw verify [flags]
FlagTypeDescription
--chainstringChain ID to verify (required unless --all is given)
--allflagVerify all chains in the database
--dbpathPath to the SQLite database

Verify a specific chain:

Terminal window
npx @agnt-rcpt/openclaw verify --chain chain_openclaw_main_sid-42

Output when the chain is valid:

Chain "chain_openclaw_main_sid-42" is valid: 12 receipts, all signatures and hash links verified.

Output when tampering is detected:

Chain "chain_openclaw_main_sid-42": BROKEN at position 7
Tamper detected! The following receipts have issues:
[7] urn:receipt:...: invalid signature, hash link

Verify every chain in the database:

Terminal window
npx @agnt-rcpt/openclaw verify --all

Exports receipts to a file or stdout, either as individual receipts or as a W3C Verifiable Presentation wrapping a full chain.

Terminal window
npx @agnt-rcpt/openclaw export [flags]
FlagTypeDescription
--idstringExport a single receipt by ID
--chainstringExport all receipts in a chain
--formatstringOutput format: json (default) or vp (W3C Verifiable Presentation)
--dbpathPath to the SQLite database

export --id fetches one receipt by its full URN and returns the complete signed credential object — including @context, proof, and all metadata fields. The receipts subcommand returns a collection view with summary fields only; it is designed for filtering and browsing, not for extracting individual credentials for verification.

Export a single receipt as JSON:

Terminal window
npx @agnt-rcpt/openclaw export --id urn:receipt:abc123...

Export a full chain as JSON:

Terminal window
npx @agnt-rcpt/openclaw export --chain chain_openclaw_main_sid-42

Export a chain as a W3C Verifiable Presentation:

Terminal window
npx @agnt-rcpt/openclaw export --chain chain_openclaw_main_sid-42 --format vp

The vp format wraps the chain in a standard W3C VP envelope, making it suitable for submission to compliance systems or external verifiers:

{
"@context": ["https://www.w3.org/2018/credentials/v1"],
"type": ["VerifiablePresentation"],
"verifiableCredential": [
{ /* receipt 1 */ },
{ /* receipt 2 */ },
{ /* … */ }
]
}