Skip to content

CLI overview

Two equivalent ways to invoke the CLI:

Terminal window
# Installed binary
cargo install provekit-cli
provekit-cli <command> [options]
# From a source checkout
cargo run --release --bin provekit-cli -- <command> [options]

Most examples below assume the current directory contains a Noir package’s Nargo.toml. When in doubt, pass explicit artifact paths instead of relying on defaults.

Rust API references: provekit-common · provekit-prover · provekit-verifier · provekit-r1cs-compiler. Unfamiliar terms? See the glossary.

ArtifactDefault pathProduced byConsumed by
Prover key<circuit>.pkpprepareprove, analyze-pkp, FFI/WASM provers
Verifier key<circuit>.pkvprepareverify, show-inputs, generate-gnark-inputs, verifier server
Proof./proof.npproveverify, show-inputs, generate-gnark-inputs
Noir inputs./Prover.tomlUser / Noir toolingprove
Recursive params./params_for_recursive_verifiergenerate-gnark-inputsGo/gnark recursive verifier
Recursive R1CS./r1cs.jsongenerate-gnark-inputsGo/gnark recursive verifier, verifier server

Default key names come from the enclosing Nargo package name. When a command can’t infer the package, pass --pkp, --pkv, --prover, or --verifier explicitly.

Terminal window
cd noir-examples/basic
cargo run --release --bin provekit-cli -- prepare
cargo run --release --bin provekit-cli -- prove
cargo run --release --bin provekit-cli -- verify

The same workflow with explicit paths:

Terminal window
cargo run --release --bin provekit-cli -- prepare \
. \
--pkp artifacts/basic.pkp \
--pkv artifacts/basic.pkv \
--hash skyscraper
cargo run --release --bin provekit-cli -- prove \
--prover artifacts/basic.pkp \
--input Prover.toml \
--out artifacts/proof.np
cargo run --release --bin provekit-cli -- verify \
--verifier artifacts/basic.pkv \
--proof artifacts/proof.np

Keep the .pkp, .pkv, proof, inputs, circuit source, and --hash choice aligned. Regenerate artifacts after any change to the circuit, inputs, branch, or hash.

Compile a Noir package and write the ProveKit key files.

Terminal window
provekit-cli prepare [program_path] [options]
OptionPurpose
program_pathDirectory containing Nargo.toml. Defaults to ..
--package <name>Compile a single Noir package from a workspace.
--workspaceCompile every binary package in a Noir workspace.
--target-dir <path>Override the Noir target directory for compiled artifacts.
--deny-warningsTreat Noir warnings as errors.
--silence-warningsSuppress Noir warnings.
--print-acirPrint the compiled ACIR.
--skip-underconstrained-checkSkip Noir’s under-constrained-values check.
--skip-brillig-constraints-checkSkip the Brillig call-constraints check.
--forceForce recompilation, ignoring cached artifacts.
--pkp, -p <path>Output prover key path. Defaults to <circuit>.pkp.
--pkv, -v <path>Output verifier key path. Defaults to <circuit>.pkv.
--hash <name>Merkle commitment hash: skyscraper, sha256, keccak, blake3, or poseidon2. Defaults to skyscraper.

--pkp and --pkv cannot be used when compiling multiple binary packages.

Read a prover key plus input TOML and write a proof.

Terminal window
provekit-cli prove [options]
OptionPurpose
--prover, -p <path>Prover key path. Defaults to <circuit>.pkp.
--input, -i <path>Noir input file. Defaults to ./Prover.toml.
--out, -o <path>Proof output path. Defaults to ./proof.np.

prove consumes the prepared key material and writes a serialized NoirProof. For browser, mobile, or service integrations, treat the proof as an artifact that must stay paired with its verifier key and public inputs.

Read a verifier key plus proof and verify the proof.

Terminal window
provekit-cli verify [options]
OptionPurpose
--verifier, -v <path>Verifier key path. Defaults to <circuit>.pkv.
--proof <path>Proof path. Defaults to ./proof.np.

A verification failure usually means the proof, verifier key, public inputs, circuit, branch, or hash configuration don’t match. Regenerate from prepare when any of those inputs change.

Analyze Noir ACIR circuit statistics and R1CS complexity. Noir only.

Terminal window
provekit-cli circuit-stats <target/*.json>

Print the size breakdown of a Noir prover key. Noir only.

Terminal window
provekit-cli analyze-pkp <file.pkp>

Display public inputs from a proof using their ABI variable names. Pass --hex for byte-exact comparison.

Terminal window
provekit-cli show-inputs [--hex] <verifier.pkv> <proof.np>

Export recursive-verifier parameters and an R1CS JSON file for the Go/gnark wrapper.

Terminal window
provekit-cli generate-gnark-inputs <verifier.pkv> <proof.np> \
[--params <path>] \
[--r1cs <path>]

Example with full paths:

Terminal window
cargo run --release --bin provekit-cli -- generate-gnark-inputs \
artifacts/basic.pkv \
artifacts/proof.np \
--params artifacts/params_for_recursive_verifier \
--r1cs artifacts/r1cs.json

The CLI prints span timing and memory statistics through its tracing layer. When built with the tracy feature, these global flags are also available:

FlagPurpose
--tracyEnable Tracy profiling.
--tracy-allocations <depth>Track allocations at the given stack depth (0 for no stack traces).
--tracy-keepaliveKeep the process alive after completion so Tracy can collect data.

Build with Tracy support before using those flags:

Terminal window
cargo run --release --features tracy --bin provekit-cli -- --tracy prepare