Barretenberg CLI Reference
This documentation is auto-generated from the bb CLI help output.
Generated: Tue 13 Jan 2026 17:34:08 UTC
Command: bb
Table of Contents
bb
Barretenberg Your favo(u)rite zkSNARK library written in C++, a perfectly good computer programming language. Aztec Virtual Machine (AVM): disabled AVM Transpiler: enabled Starknet Garaga Extensions: disabled
Usage:
bb [OPTIONS] [SUBCOMMAND]
Available Commands:
check- A debugging tool to quickly check whether a witness satisfies a circuit The function constructs the execution trace and iterates through it row by row, applying the polynomial relations defining the gate types. For Chonk, we check the VKs in the folding stack.gates- Construct a circuit from the given bytecode (in particular, expand black box functions) and return the gate count information.prove- Generate a proof.write_vk- Write the verification key of a circuit. The circuit is constructed using quickly generated but invalid witnesses (which must be supplied in Barretenberg in order to expand ACIR black box opcodes), and no proof is constructed.verify- Verify a proof.write_solidity_verifier- Write a Solidity smart contract suitable for verifying proofs of circuit satisfiability for the circuit with verification key at vk_path. Not all hash types are implemented due to efficiency concerns.aztec_process- Process Aztec contract artifacts: transpile and generate verification keys for all private functions. If input is a directory (and no output specified), recursively processes all artifacts found in the directory.msgpack- Msgpack API interface.
Options:
-h,--help- Print this help message and exit-v,--verbose,--verbose_logging- Output all logs to stderr.-d,--debug_logging- Output debug logs to stderr.-c,--crs_path- Path CRS directory. Missing CRS files will be retrieved from the internet.--version- Print the version string.
Subcommands
bb check
A debugging tool to quickly check whether a witness satisfies a circuit The function constructs the execution trace and iterates through it row by row, applying the polynomial relations defining the gate types. For Chonk, we check the VKs in the folding stack.
Usage:
bb check [OPTIONS]
Options:
-h,--help- Print this help message and exit-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-b,--bytecode_path- Path to ACIR bytecode generated by Noir.-w,--witness_path- Path to partial witness generated by Noir.--ivc_inputs_path- For IVC, path to input stack with bytecode and witnesses.--update_inputs- Update inputs if vk check fails.
bb gates
Construct a circuit from the given bytecode (in particular, expand black box functions) and return the gate count information.
Usage:
bb gates [OPTIONS]
Options:
-h,--help- Print this help message and exit-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-v,--verbose,--verbose_logging- Output all logs to stderr.-b,--bytecode_path- Path to ACIR bytecode generated by Noir.--include_gates_per_opcode- Include gates_per_opcode in the output of the gates command.--oracle_hash- The hash function used by the prover as random oracle standing in for a verifier's challenge generation. Poseidon2 is to be used for proofs that are intended to be verified inside of a circuit. Keccak is optimized for verification in an Ethereum smart contract, where Keccak has a privileged position due to the existence of an EVM precompile. Starknet is optimized for verification in a Starknet smart contract, which can be generated using the Garaga library. Options: {poseidon2, keccak, starknet}--ipa_accumulation- Accumulate/Aggregate IPA (Inner Product Argument) claims
bb prove
Generate a proof.
Usage:
bb prove [OPTIONS]
Options:
-h,--help- Print this help message and exit-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-b,--bytecode_path- Path to ACIR bytecode generated by Noir.-w,--witness_path- Path to partial witness generated by Noir.-o,--output_path- Directory to write files or path of file to write, depending on subcommand.--ivc_inputs_path- For IVC, path to input stack with bytecode and witnesses.-k,--vk_path- Path to a verification key.--vk_policy- Policy for handling verification keys during IVC accumulation. 'default' uses the provided VK as-is, 'check' verifies the provided VK matches the computed VK (throws error on mismatch), 'recompute' always ignores the provided VK and treats it as nullptr. Options: {default, check, recompute}-v,--verbose,--verbose_logging- Output all logs to stderr.-d,--debug_logging- Output debug logs to stderr.-c,--crs_path- Path CRS directory. Missing CRS files will be retrieved from the internet.--oracle_hash- The hash function used by the prover as random oracle standing in for a verifier's challenge generation. Poseidon2 is to be used for proofs that are intended to be verified inside of a circuit. Keccak is optimized for verification in an Ethereum smart contract, where Keccak has a privileged position due to the existence of an EVM precompile. Starknet is optimized for verification in a Starknet smart contract, which can be generated using the Garaga library. Options: {poseidon2, keccak, starknet}--write_vk- Write the provided circuit's verification key--ipa_accumulation- Accumulate/Aggregate IPA (Inner Product Argument) claims--disable_zk- Use a non-zk version of --scheme. This flag is set to false by default.--slow_low_memory- Enable low memory mode (can be 2x slower or more).--print_bench- Pretty print op counts to standard error in a human-readable format.--bench_out- Path to write the op counts in a json.--bench_out_hierarchical- Path to write the hierarchical benchmark data (op counts and timings with parent-child relationships) as json.--storage_budget- Storage budget for FileBackedMemory (e.g. '500m', '2g'). When exceeded, falls back to RAM (requires --slow_low_memory).--verify- Verify the proof natively, resulting in a boolean output. Useful for testing.
bb write_vk
Write the verification key of a circuit. The circuit is constructed using quickly generated but invalid witnesses (which must be supplied in Barretenberg in order to expand ACIR black box opcodes), and no proof is constructed.
Usage:
bb write_vk [OPTIONS]
Options:
-h,--help- Print this help message and exit-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-b,--bytecode_path- Path to ACIR bytecode generated by Noir.-o,--output_path- Directory to write files or path of file to write, depending on subcommand.--ivc_inputs_path- For IVC, path to input stack with bytecode and witnesses.-v,--verbose,--verbose_logging- Output all logs to stderr.-d,--debug_logging- Output debug logs to stderr.-c,--crs_path- Path CRS directory. Missing CRS files will be retrieved from the internet.--oracle_hash- The hash function used by the prover as random oracle standing in for a verifier's challenge generation. Poseidon2 is to be used for proofs that are intended to be verified inside of a circuit. Keccak is optimized for verification in an Ethereum smart contract, where Keccak has a privileged position due to the existence of an EVM precompile. Starknet is optimized for verification in a Starknet smart contract, which can be generated using the Garaga library. Options: {poseidon2, keccak, starknet}--ipa_accumulation- Accumulate/Aggregate IPA (Inner Product Argument) claims--verifier_type- Is a verification key for use a standalone single circuit verifier (e.g. a SNARK or folding recursive verifier) or is it for an ivc verifier?standaloneproduces a verification key is sufficient for verifying proofs about a single circuit (including the non-encapsulated use case where an IVC scheme is manually constructed via recursive UltraHonk proof verification).standalone_hidingis similar tostandalonebut is used for the last step where the structured trace is not utilized.ivcproduces a verification key for verifying the stack of run though a dedicated ivc verifier class (currently the only option is the Chonk class) Options: {standalone, standalone_hiding, ivc}--disable_zk- Use a non-zk version of --scheme. This flag is set to false by default.
bb verify
Verify a proof.
Usage:
bb verify [OPTIONS]
Options:
-h,--help- Print this help message and exit-i,--public_inputs_path- Path to public inputs.-p,--proof_path- Path to a proof.-k,--vk_path- Path to a verification key.-v,--verbose,--verbose_logging- Output all logs to stderr.-d,--debug_logging- Output debug logs to stderr.-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-c,--crs_path- Path CRS directory. Missing CRS files will be retrieved from the internet.--oracle_hash- The hash function used by the prover as random oracle standing in for a verifier's challenge generation. Poseidon2 is to be used for proofs that are intended to be verified inside of a circuit. Keccak is optimized for verification in an Ethereum smart contract, where Keccak has a privileged position due to the existence of an EVM precompile. Starknet is optimized for verification in a Starknet smart contract, which can be generated using the Garaga library. Options: {poseidon2, keccak, starknet}--disable_zk- Use a non-zk version of --scheme. This flag is set to false by default.--ipa_accumulation- Accumulate/Aggregate IPA (Inner Product Argument) claims
bb write_solidity_verifier
Write a Solidity smart contract suitable for verifying proofs of circuit satisfiability for the circuit with verification key at vk_path. Not all hash types are implemented due to efficiency concerns.
Usage:
bb write_solidity_verifier [OPTIONS]
Options:
-h,--help- Print this help message and exit-s,--scheme- The type of proof to be constructed. This can specify a proving system, an accumulation scheme, or a particular type of circuit to be constructed and proven for some implicit scheme. Options: {chonk, avm, ultra_honk} Environment:BB_SCHEME-k,--vk_path- Path to a verification key.-o,--output_path- Directory to write files or path of file to write, depending on subcommand.-v,--verbose,--verbose_logging- Output all logs to stderr.--disable_zk- Use a non-zk version of --scheme. This flag is set to false by default.-c,--crs_path- Path CRS directory. Missing CRS files will be retrieved from the internet.--optimized- Use the optimized Solidity verifier.
bb aztec_process
Process Aztec contract artifacts: transpile and generate verification keys for all private functions. If input is a directory (and no output specified), recursively processes all artifacts found in the directory.
Usage:
bb aztec_process [OPTIONS]
Options:
-h,--help- Print this help message and exit-i,--input- Input artifact JSON path or directory to search (optional, defaults to current directory)-o,--output- Output artifact JSON path (optional, same as input if not specified)-f,--force- Force regeneration of verification keys-v,--verbose,--verbose_logging- Output all logs to stderr.-d,--debug_logging- Output debug logs to stderr.
bb msgpack
Msgpack API interface.
Usage:
bb msgpack [OPTIONS] [SUBCOMMAND]
Available Commands:
schema- Output a msgpack schema encoded as JSON to stdout.curve_constants- Output curve constants as msgpack to stdout.run- Execute msgpack API commands from stdin or file.
Options:
-h,--help- Print this help message and exit
Subcommands
bb msgpack schema
Output a msgpack schema encoded as JSON to stdout.
Usage:
bb msgpack schema [OPTIONS]
Options:
-h,--help- Print this help message and exit-v,--verbose,--verbose_logging- Output all logs to stderr.
bb msgpack curve_constants
Output curve constants as msgpack to stdout.
Usage:
bb msgpack curve_constants [OPTIONS]
Options:
-h,--help- Print this help message and exit-v,--verbose,--verbose_logging- Output all logs to stderr.
bb msgpack run
Execute msgpack API commands from stdin or file.
Usage:
bb msgpack run [OPTIONS]
Options:
-h,--help- Print this help message and exit-v,--verbose,--verbose_logging- Output all logs to stderr.-i,--input- Input file containing msgpack buffers (defaults to stdin)--max-clients- Maximum concurrent clients for shared memory IPC server (default: 1)