# CLI reference ## `pwm` (demo CLI) Run via: ```bash cargo run -p pwm-testkit --bin pwm --release -- [args] [--json] ``` Subcommands: | Command | Description | |---|---| | `pwm demo` | The whole story: infer -> prove -> challenge -> accept -> tamper -> reject (the tiny compact model). | | `pwm prove ` | Run the predictor, write the proof (AuditArtifact) to ``. | | `pwm verify ` | Decode a proof and verify it (accept or reject). | | `pwm audit ` | The verifier's story: challenge + accept, then tamper -> reject. | | `pwm tamper ` | Forge one matmul output (the canonical Freivalds-caught lie). | | `pwm prove-lewm ` | 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: ```bash cargo run -p pwm-tui --release -- [options] ``` Usage: ```text pwm-tui # the full demo (downloads on first run, cached after) pwm-tui --cache-dir # 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.