Introducing Achronyme — a language for zero-knowledge proofs. Read the announcement arrow_right_alt

CLI Commands

Achronyme CLI command reference.

Global Flags

These flags apply to all subcommands:

FlagDescription
--error-format <fmt>Diagnostic output format: human (default), json, or short. See Diagnostics & Warnings
--prime <name>Prime field for the constraint backend: bn254 (default), bls12-381, or goldilocks
--no-configDisable achronyme.toml loading. All values come from CLI flags and defaults

init — Create a new project

Scaffolds a new Achronyme project with achronyme.toml, source directory, and .gitignore.

ach init my-circuit
ach init my-app --template vm

Arguments

ArgumentDescription
<name>Project name (must match [a-zA-Z_][a-zA-Z0-9_-]*)

Flags

FlagDescription
--template <tpl>Project template: circuit (default), vm, or prove

Templates

  • circuit — A standalone circuit with public/witness declarations and assert_eq
  • vm — A general-purpose program with print()
  • prove — A mixed program with an inline prove {} block

Generated structure

my-circuit/
├── achronyme.toml
├── src/
│   └── main.ach
└── .gitignore

See Project Configuration for the achronyme.toml reference.


run — Execute a program

Runs an Achronyme source file (.ach) or compiled binary (.achb).

ach run script.ach
ach run script.achb
ach run                # uses [project].entry from achronyme.toml

If <path> is omitted, the CLI resolves the entry file from [project].entry in achronyme.toml.

Flags

FlagDescription
--stress-gcRun GC on every allocation (for testing). See Stress GC Mode
--max-heap <size>Set maximum heap size (e.g., 256M, 1G, 512K). Raises HeapLimitExceeded if exceeded
--gc-statsPrint GC statistics to stderr after execution. See GC Statistics
--circuit-statsPrint circuit constraint stats for each prove {} block executed
--prove-backend <backend>Backend for prove {} blocks: r1cs (default) or plonkish

Examples

ach run hello.ach
ach run hello.ach --prove-backend plonkish
ach run hello.ach --max-heap 256M --gc-stats
ach run                              # from project with achronyme.toml

circuit — Compile a ZK circuit

Compiles an Achronyme circuit source file into R1CS/Plonkish constraints and generates a witness.

ach circuit circuit.ach --inputs "x=42,y=7"
ach circuit --inputs "x=42,y=7"    # uses entry from achronyme.toml

See Circuit Options for all available flags.


circom — Compile a .circom file

Compiles a Circom 2.x source file through the Achronyme frontend, producing the same .r1cs/.wtns artefacts as circuit and optionally a Groth16 proof. Use this to run circomlib templates (or your own .circom projects) without leaving the Achronyme toolchain.

ach circom poseidon.circom --inputs "in=42"
ach circom merkle.circom --inputs "root=0x...,leaf=42" --prove --solidity Verifier.sol
ach circom -l vendor/circomlib/circuits sha256.circom --inputs-file inputs.toml

Flags

FlagDescription
--inputs <pairs>Comma-separated name=value (decimal or 0x hex)
--input-file <path>Inputs from a TOML file (arrays supported natively)
-l, --lib <dir>Library search directory for include resolution. Repeatable; CLI dirs take precedence over [circom].libs from achronyme.toml
--backend <r1cs|plonkish>Constraint backend (default: r1cs)
--proveGenerate a cryptographic proof after compilation (requires --inputs)
--r1cs <path>Output .r1cs path (snarkjs-compatible)
--wtns <path>Output .wtns path
--solidity <path>Emit a Solidity Groth16 verifier contract at this path
--plonkish-json <path>Export the Plonkish circuit (with witness if --inputs is given) as JSON
--dump-irPrint the optimized SSA IR and exit before constraint generation
--no-optimizeDisable IR optimization passes
--circuit-statsPrint constraint count breakdown

Library resolution

include lookup walks --lib directories first, then [circom].libs from the project manifest, then the file’s own directory. See Importing Templates for the full resolution model.


compile — Compile to bytecode

Compiles an Achronyme source file into a binary (.achb) that can be run with ach run.

ach compile script.ach --output script.achb
ach compile --output script.achb   # uses entry from achronyme.toml

Flags

FlagDescription
--output <path>Output file path (optional — can be set in [build.output].binary in achronyme.toml)

disassemble — Show bytecode

Disassembles an Achronyme source file or binary, showing the bytecode instructions.

ach disassemble script.ach
ach disassemble                    # uses entry from achronyme.toml

inspect — Open the circuit inspector

Compiles a circuit (or a named prove {} block) and serves a local HTTP page that visualises the IR DAG, witness values, and constraint stats. The Astro+D3 inspector UI lives in the achronyme-inspector repo and ships embedded for offline use.

ach inspect circuit.ach --inputs "x=42"
ach inspect script.ach --prove main_block --inputs "secret=7"
ach inspect --bind 127.0.0.1 --port 3000

Flags

FlagDescription
--inputs <pairs>Standalone-circuit inputs as name=value (comma-separated)
--input-file <path>Standalone-circuit inputs from a TOML file
--prove <name>Inspect a named prove {} block instead of a top-level circuit; the program runs in the VM to resolve captured values
--port <u16>HTTP port (default 3000)
--bind <addr>Bind address (default 127.0.0.1). The inspector exposes witness values, source, and DAG state without auth — binding to 0.0.0.0 makes that visible to every peer on the network
--no-openDo not auto-open the browser
Navigation