— Reference —

CLI REFERENCE

Five subcommands, one binary. This is the exact usage text and behavior in crates/zkvm-cli/src/main.rs, not a paraphrase.

Usage

zkvm -- a minimal proven-execution virtual machine (Phase 1 MVP)

USAGE:
  zkvm run    <program.zkasm>              execute a program, print the result
  zkvm prove  <program.zkasm> <out.proof>  execute + generate a STARK proof
  zkvm verify <program.zkasm> <in.proof>   verify a proof against a program
  zkvm deploy <program.zkasm> [--server URL] [--out out.proof]
                                            push a program to a zkvm-host-server
                                            and save back the proof it returns
  zkvm demo                                execute/prove/verify + tamper checks

Running the binary with no arguments, or an unrecognized subcommand, prints exactly this and exits 0.

zkvm run <program.zkasm>

Parses and executes a program in the interpreter, no proof involved. Prints the instruction count and the final accumulator value.

executed 4 instruction(s)
result = 12

zkvm prove <program.zkasm> <out.proof>

Executes the program, then generates a real STARK proof over Winterfell and writes it to disk. Prints proof size and the public inputs (initial value, result) the verifier will check against.

proof written to out.proof (10998 bytes)
public inputs: initial=5, result=12

zkvm verify <program.zkasm> <in.proof>

Re-derives the program's public inputs itself (it never trusts the prover's claim) and checks the proof against them. Exits non-zero and prints the failure reason if the proof doesn't verify.

OK: proof verifies against examples/fibonacci_like.zkasm

zkvm deploy <program.zkasm> [--server URL] [--out out.proof]

Sends the program to a running zkvm-host-server instead of proving locally -- "push code, get a proof back." Verification still happens locally afterward, so you never have to trust the server's own claim that a proof is valid. Defaults to --server http://127.0.0.1:4477 and --out <program>.proof.

deploying examples/fibonacci_like.zkasm to http://127.0.0.1:4477/v1/proofs ...
proof received: 10998 bytes -> examples/fibonacci_like.zkasm.proof
result = 12
verify locally with: zkvm verify examples/fibonacci_like.zkasm examples/fibonacci_like.zkasm.proof

zkvm demo

A fixed, self-contained walkthrough: builds ((5+3)*2)-4, executes it, proves it, verifies the real proof (accepted), then re-verifies the exact same proof against a tampered result and a tampered program (both rejected). No arguments -- it needs no input file because the program is hardcoded in the demo itself.

=== zkVM Phase 1 demo ===

program: initial=5, ADD 3, MUL 2, SUB 4   (=> ((5+3)*2)-4)
interpreter result: 12

generating STARK proof...
proof generated: 10998 bytes

verifying against the correct public inputs...
  -> accepted

re-verifying the SAME proof against a tampered result (12 -> 13)...
  -> rejected, as expected

re-verifying the SAME proof against a tampered program (first op ADD -> SUB)...
  -> rejected, as expected

Every command shares one error convention

A failure prints error: <message> to stderr and exits with a non-zero status. There is no separate verbose/quiet mode, and no global flags -- the entire CLI surface is the five subcommands above.