Skip to content
v0.11.2Since v0.9.0

CLI

Command-line tools for receipt verification, conformance testing, policy authoring, and evidence bundling. Verify receipts, run conformance suites, and author peac.txt policies from the terminal.

Package: @peac/cli

Install

Terminal
pnpm add @peac/cli

# or with npm
npm install @peac/cli

Commands

CommandDescription
verifyVerify a receipt compact JWS: signature, claims, expiry, and kernel constraints
conformance runRun the conformance test suite against a receipt or issuer endpoint
samples listList built-in sample receipts for testing and demonstration
policy initCreate a new peac-policy.yaml template in the current directory
policy validateValidate a peac-policy.yaml file against the policy schema
policy generateCompile peac-policy.yaml into a peac.txt discovery file
bundle createCreate an evidence bundle from one or more receipts

Verify

The verify command checks a receipt JWS against the issuer's public key. It validates the EdDSA signature, claim structure, expiry, and kernel constraints. The output is a structured JSON verification result.

Terminal
$ peac verify eyJhbGciOiJFZERTQSIsInR5cCI6InBlYWMtcmVjZWlwdC8wLjEifQ...
verification-result.jsonJSON
{
  "valid": true,
  "issuer": "https://publisher.example.com",
  "audience": "agent.consumer.com",
  "issuedAt": "2026-02-25T12:00:00Z",
  "expiresAt": "2026-02-25T13:00:00Z",
  "wireFormat": "peac-receipt/0.1",
  "checks": {
    "signature": "verified",
    "claims": "verified",
    "expiry": "verified",
    "constraints": "verified"
  }
}

Conformance Levels

The conformance run command supports three levels of testing, each building on the previous:

LevelChecksDescription
basicStructure + SignatureJWS format, required headers (alg, typ), EdDSA signature verification
standard+ Claims + ExpiryRequired claims (iss, iat), optional claims validation, expiry checks
full+ Constraints + Policy bindingKernel constraints (DD-60), policy binding status, evidence carrier contract
Terminal
# Run standard conformance
$ peac conformance run --level standard receipt.jws

# Run full conformance against an issuer endpoint
$ peac conformance run --level full --issuer https://publisher.example.com

Policy Authoring Workflow

The CLI provides a three-step workflow for authoring and publishing PEAC policies. The peac-policy.yaml file is the local source of truth; peac.txt is the hosted discovery artifact.

1. Initialize

Create a peac-policy.yaml template with default values:

$ peac policy init

2. Validate

Check the YAML against the policy schema before generating:

$ peac policy validate peac-policy.yaml

3. Generate

Compile the YAML into a peac.txt file for hosting at /.well-known/peac.txt:

$ peac policy generate peac-policy.yaml -o peac.txt

Evidence Bundling

The bundle create command combines multiple receipts into a single evidence bundle. Bundles are useful for compliance audits, dispute resolution, and archival.

Terminal
$ peac bundle create \
    --receipts receipt-1.jws receipt-2.jws receipt-3.jws \
    --output evidence-bundle.json

Sample Receipts

The CLI ships with built-in sample receipts for testing and demonstration. Use samples list to see available samples, then pipe them to verify:

Terminal
# List available samples
$ peac samples list

# Verify a built-in sample
$ peac samples get payment-x402 | peac verify

Links

Verify and Author from the Terminal

The CLI covers the full receipt lifecycle: verify incoming receipts, run conformance tests against your implementation, author policies for your domain, and bundle evidence for audits. All operations run locally; no network calls are made unless you explicitly target a remote issuer endpoint.