CLI
@clearproof/cli — command-line tool for proof generation, verification, and demos.
Installation
npm install -g @clearproof/cli
# or
npx @clearproof/cli <command>Commands
demo
Runs a full proof generation and verification flow with sample data.
clearproof demo- Loads compiled circuit artifacts from
./artifacts - Generates a sample compliance proof with mock credential data
- Verifies the proof locally
- Prints all 16 public signals with labels
prove
Generates a ZK compliance proof from a JSON input file.
clearproof prove --input inputs.json
clearproof prove --input inputs.json --artifacts ./artifacts --output proof.jsonOptions:
--input <file>— (required) Path to JSON file with circuit inputs matching theComplianceInputschema--artifacts <dir>— Path to circuit artifacts directory (default:./artifacts)--output <file>— Write proof JSON to file (default: stdout)
The input JSON must contain all fields from the ComplianceInput type — both public inputs (sanctions root, issuer root, thresholds, etc.) and private inputs (credential preimage, Merkle paths, etc.).
verify
Verifies a ZK compliance proof against the verification key.
clearproof verify --proof proof.json
clearproof verify --proof proof.json --artifacts ./artifactsOptions:
--proof <file>— (required) Path to proof JSON (output ofprove)--artifacts <dir>— Path to circuit artifacts directory (default:./artifacts)
Returns JSON with valid, isCompliant, sarReviewFlag, and publicSignals. Exit code 0 if valid, 1 if invalid.
--version
clearproof --version
# 0.2.0Requirements
Requires locally compiled circuit artifacts. Run bash scripts/compile_circuits.sh first.