CLI Commands
Achronyme CLI command reference.
Global Flags
These flags apply to all subcommands:
| Flag | Description |
|---|---|
--error-format <fmt> | Diagnostic output format: human (default), json, or short. See Diagnostics & Warnings |
--no-config | Disable 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
| Argument | Description |
|---|---|
<name> | Project name (must match [a-zA-Z_][a-zA-Z0-9_-]*) |
Flags
| Flag | Description |
|---|---|
--template <tpl> | Project template: circuit (default), vm, or prove |
Templates
circuit— A standalone circuit withpublic/witnessdeclarations andassert_eqvm— A general-purpose program withprint()prove— A mixed program with an inlineprove {}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
| Flag | Description |
|---|---|
--stress-gc | Run 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-stats | Print GC statistics to stderr after execution. See GC Statistics |
--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.
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
| Flag | Description |
|---|---|
--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
repl — Interactive mode
Starts an interactive Read-Eval-Print loop. (Not yet implemented.)