Achronyme 0.1.2 is published: detached verification preserves operational errors and global JSON output 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
--insecure-dev-setupPermit single-party proving-key setup for local development. Conflicts with --trusted-key-dir
--trusted-key-dir <dir>Select a ceremony-derived trusted-key store. Conflicts with --insecure-dev-setup
--allow-read <dir>Grant read-only access to one directory. Repeatable
--allow-write <dir>Grant write access to one directory. Repeatable
--allow-connect <ip:port>Grant one outbound numeric IP and port. Repeatable
--allow-listen <ip:port>Grant one numeric listen address and port. Repeatable
--max-tasks <count>Bound explicit spawn and implicit await child tasks; exclude the root task
--max-resources <count>Bound simultaneously open owned resources
--max-task-scopes <count>Bound simultaneously live structured scopes, explicit and implicit
--max-pending-native-requests <count>Bound in-flight asynchronous native requests
--max-retained-task-results <count>Bound completed child results retained for task handles
--max-channels <count>Bound simultaneously open channels
--max-channel-operations <count>Bound pending send and receive operations
--blocking-workers <count>Set the bounded blocking-I/O worker count
--blocking-queue-capacity <count>Bound queued blocking-I/O requests

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.


verify — Verify detached Groth16 artifacts

Verification is independent of project configuration and does not create a proving key. The curve is required so the CLI never infers a cryptographic format from untrusted input:

ach verify \
  --proof proof.json \
  --public public.json \
  --vkey verification_key.json \
  --curve bn254 \
  --format json

Supported curves are bn254 and bls12-381. Invalid, malformed, mismatched, or tampered artifacts return a non-zero exit status.

Missing or unreadable artifacts are operational errors, not invalid proofs. --error-format json selects JSON output for detached verification when verify --format is omitted. An explicit verify --format text or verify --format json takes precedence.


trusted-setup — Package an externally verified key

ach trusted-setup package creates an immutable trusted-key store from an already verified BN254 Groth16 ceremony. It requires the exact R1CS, final and pre-beacon zkeys, phase-1 artifact and digest, every contributor ID and hash, and the committed public-beacon evidence.

ach trusted-setup package --help

This command does not run a ceremony or invent missing evidence. Operators should follow the versioned trusted-setup workflow in the core repository.


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 the pre-optimization IR estimate and final R1CS proving constraints for each prove {} block
--prove-backend <backend>Backend for prove {} blocks: r1cs (default) or plonkish
--engine <engine>Execution engine: interpreter, jit, or auto (default)
--max-instructions <count>Stop after the configured bytecode instruction budget

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 TOML (arrays supported). Repeat for R1CS compile-once, multi-witness/proof output
-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
--low-memoryBound retained metadata while exporting very large optimized R1CS circuits
--circuit-statsPrint the pre-optimization IR estimate and exact final R1CS proving constraints

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)

aot — Compile a native executable

Compile Achronyme source or an .achb image through LLVM and link it against the packaged Achronyme AOT runtime:

ach aot src/main.ach --output build/app
ach aot program.achb --output build/app --clang clang-21

--runtime <path> overrides discovery of libakron_aot_runtime.a. AOT requires Clang 21 and LLVM 21.

The standalone executable starts with filesystem and network authority denied. Runtime grants and limits are selected when the binary runs, not embedded from the ach aot command:

AKRON_ALLOW_READ=/srv/app/data \
AKRON_MAX_TASKS=32 \
AKRON_INSTRUCTION_BUDGET=1000000 \
./build/app

AKRON_ALLOW_READ and AKRON_ALLOW_WRITE accept platform path lists. AKRON_ALLOW_CONNECT and AKRON_ALLOW_LISTEN accept comma-separated numeric addresses. Heap and GC controls use AKRON_MAX_HEAP and AKRON_STRESS_GC. Every structured-runtime limit also has an uppercase AKRON_ equivalent, from AKRON_MAX_TASKS and AKRON_MAX_RESOURCES through AKRON_BLOCKING_QUEUE_CAPACITY.


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
--manifestPrint the resolved program effect/capability manifest and runtime security configuration, then exit
Navigation