Conghao97's picture tcftrees's picture
ProgramGen release
d086025
|
Raw History Blame Contribute Delete
2.1 kB

CLI reference

pwm (demo CLI)

Run via:

cargo run -p pwm-testkit --bin pwm --release -- <command> [args] [--json]

Subcommands:

Command Description
pwm demo The whole story: infer -> prove -> challenge -> accept -> tamper -> reject (the tiny compact model).
pwm prove <file> Run the predictor, write the proof (AuditArtifact) to <file>.
pwm verify <file> Decode a proof and verify it (accept or reject).
pwm audit <file> The verifier's story: challenge + accept, then tamper -> reject.
pwm tamper <in> <out> Forge one matmul output (the canonical Freivalds-caught lie).
pwm prove-lewm <bundle.json> Prove the REAL le-wm pred_proj head from an export bundle.
pwm prove-predictor [bundle] Prove the full 6-block 16-head predictor. With a bundle: real checkpoint weights. Without: the real V0 dims (192/16/64, depth 6) over synthetic weights.

Global flag: --json for machine-readable output. Output respects NO_COLOR.

Exit codes: 0 on success (honest proof accepted, forged one rejected); non-zero on failure or bad usage.

pwm-tui

Run via:

cargo run -p pwm-tui --release -- [options]

Usage:

pwm-tui                      # the full demo (downloads on first run, cached after)
pwm-tui --cache-dir <path>   # override the cache location
pwm-tui --offline            # cache only, never touch the network
pwm-tui --refresh            # ignore cached assets and re-download
pwm-tui --re-export          # force stage 1 even on a bundle cache hit
pwm-tui --headless [--json]  # no TUI: plain progress lines (+ JSON summary)
pwm-tui cache path|ls|clear  # cache management

Notes:

  • Cache precedence: --cache-dir > PWM_CACHE_DIR env > the platform default.
  • cache clear deletes checkpoints/, datasets/, and bundles/ under the cache root only; confirm with --yes.
  • Falls back to headless mode automatically when stdout is not a terminal (CI).
  • Exit code 0 means the honest proof was ACCEPTED and the forged one REJECTED.
  • -h / --help prints usage.