@oxdeai/cli
v0.2.4
Published
Protocol-focused CLI tooling for OxDeAI artifact build/verify/replay workflows
Readme
@oxdeai/cli
Protocol-oriented command-line tooling for OxDeAI.
@oxdeai/cli is a thin Node.js wrapper around @oxdeai/core verification and local state workflows. It is framework-agnostic and intended for local policy operations, artifact inspection, and deterministic verification.
Quickstart
End users
Install the CLI:
npm install -g @oxdeai/cliBasic commands:
oxdeai --help
oxdeai --version
oxdeai verify snap
oxdeai verify envelope
oxdeai build snapshotLocal monorepo contributors
Build the package from the repo root:
pnpm -C packages/cli buildRun the CLI from the monorepo root:
pnpm oxdeai --help
pnpm oxdeai --version
pnpm oxdeai verify snap --file packages/cli/.oxdeai/snapshot.bin --jsonRun it from inside packages/cli:
pnpm build
node dist/main.js --help
node dist/main.js verify snap --file .oxdeai/snapshot.bin --jsonFor a local global-style workflow:
cd packages/cli
npm link
oxdeai --helpCommand Surface
oxdeai buildoxdeai verifyoxdeai replay
Legacy helper commands are still available (init, launch, state, audit, verify-audit, make-envelope, verify-envelope, snapshot-hash) for local development workflows.
Core Commands
build
Builds a canonical snapshot verification payload from state.
oxdeai build snapshot
oxdeai build --state .oxdeai/state.json --out .oxdeai/snapshot.bin --jsonverify
Verifies one artifact kind at a time:
snapshotauditenvelopeauthorization
Examples:
oxdeai verify snap
oxdeai verify audit
oxdeai verify envelope
oxdeai verify auth --file authorization.json --expected-issuer oxdeai://issuer --expected-audience rp://tool-gateway --json
oxdeai verify --kind snapshot --file snapshot.bin --json
oxdeai verify --kind audit --file audit.ndjson --mode strict --json
oxdeai verify --kind envelope --file envelope.bin --trusted-keyset keyset.json --require-signature --json
oxdeai verify --kind authorization --file authorization.json --expected-issuer oxdeai://issuer --expected-audience rp://tool-gateway --jsonverify auth does not assume a default file. Pass --file <authorization.json> explicitly.
replay
Protocol-aware stub in 0.1.x. It returns a clear unsupported response and points users to deterministic audit verification (verify --kind audit).
Output and Exit Codes
- Human-readable output by default
- Machine-readable output with
--json
Exit codes:
0= verificationok/ command success1= verificationinvalidor malformed input/runtime failure2= usage/flag parsing error3= verificationinconclusive
Troubleshooting
- If
oxdeai: command not found, the package is not installed or linked globally yet. Usenpm install -g @oxdeai/cliornpm linkfrompackages/cli. - In the monorepo, prefer
pnpm oxdeai ...from the repo root ornode dist/main.js ...frompackages/cli.pnpm exec oxdeaiis not the primary local workflow here. - Default local file paths are
.oxdeai/state.jsonand.oxdeai/audit.ndjson. Pass--state,--audit,--file, or--outexplicitly if you are working outside that layout.
PDP / PEP Boundary
The CLI does not replace a runtime PEP. It is intended for deterministic protocol artifact handling, validation, and local operational tooling around the OxDeAI PDP/PEP model.
