Skip to main content
Version: v5.0.0-nightly.20260224

Barretenberg CLI Reference

This documentation is auto-generated from the bb CLI help output.

Generated: Tue 24 Feb 2026 04:44:17 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.
  • msgpack - Msgpack API interface.

Options:

  • -h,--help - Print this help message and exit
  • --version - Print the version string.
  • --help-extended - Show all options including advanced and Aztec-specific commands.

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
  • --help-extended - Show all options including advanced ones.
  • -b,--bytecode_path - Path to ACIR bytecode generated by Noir.
  • -w,--witness_path - Path to partial witness generated by Noir.

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
  • --help-extended - Show all options including advanced ones.
  • -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.
  • -t,--verifier_target - Target verification environment. Determines hash function and ZK settings. Environment: BB_VERIFIER_TARGET

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 curve_constants

Output curve constants as msgpack to stdout.

Usage:

bb msgpack curve_constants [OPTIONS]

Options:

  • -h,--help - Print this help message and exit

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
  • -i,--input - Input file containing msgpack buffers (defaults to stdin)
  • --request-ring-size - Request ring buffer size for shared memory IPC (default: 1MB)
  • --response-ring-size - Response ring buffer size for shared memory IPC (default: 1MB)
  • --max-clients - Maximum concurrent clients for socket IPC servers (default: 1, only used for .sock files)

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

bb prove

Generate a proof.

Usage:

bb prove [OPTIONS]

Options:

  • -h,--help - Print this help message and exit
  • --help-extended - Show all options including advanced ones.
  • -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.
  • -k,--vk_path - Path to a verification key.
  • -t,--verifier_target - Target verification environment. Determines hash function and ZK settings. Environment: BB_VERIFIER_TARGET
  • --write_vk - Write the provided circuit's verification key
  • --output_format - Output format for proofs and verification keys: 'binary' (default) or 'json'. JSON format includes metadata like bb_version, scheme, and verifier_target. Options: {binary, json}
  • --verify - Verify the proof natively, resulting in a boolean output. Useful for testing.

bb verify

Verify a proof.

Usage:

bb verify [OPTIONS]

Options:

  • -h,--help - Print this help message and exit
  • --help-extended - Show all options including advanced ones.
  • -i,--public_inputs_path - Path to public inputs.
  • -p,--proof_path - Path to a proof.
  • -k,--vk_path - Path to a verification key.
  • -t,--verifier_target - Target verification environment. Determines hash function and ZK settings. Environment: BB_VERIFIER_TARGET

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
  • --help-extended - Show all options including advanced ones.
  • -k,--vk_path - Path to a verification key.
  • -o,--output_path - Directory to write files or path of file to write, depending on subcommand.
  • -t,--verifier_target - Target verification environment. Determines hash function and ZK settings. Environment: BB_VERIFIER_TARGET
  • --optimized - Use the optimized Solidity verifier.

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
  • --help-extended - Show all options including advanced ones.
  • -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.
  • -t,--verifier_target - Target verification environment. Determines hash function and ZK settings. Environment: BB_VERIFIER_TARGET
  • --output_format - Output format for proofs and verification keys: 'binary' (default) or 'json'. JSON format includes metadata like bb_version, scheme, and verifier_target. Options: {binary, json}