stoffel CLI. The stoffel binary is a Cargo-like project tool for creating, checking, building, running, and iterating on Stoffel apps. It is the developer-facing entry point for local MPC workflows.
Core workflow
stoffel --help to see the installed command set. Current commands are:
init/new: create a project from a template.check: validate source and MPC configuration without writing bytecode.compile: compile a project, source directory, or.stflfile to.stflbbytecode, or disassemble existing bytecode.build: build project bytecode undertarget/.run: run a project,.stflsource file, or.stflbbytecode through local or network MPC execution.dev: watch a project and rerun it on local MPC when files change.test: run no-argument Stoffel test functions.status/doctor: show project health and environment status.clean: remove generated build artifacts.update/upgrade: check or update the CLI and project dependency files.
Creating projects
--lib cannot be combined with --template. Use stoffel init --help for supported template names.
Project structure
The default template currently creates a Rust-backed Stoffel project:stoffel/ directory and include the host-language scaffold for Python, Rust, Foundry, or Hardhat.
Stoffel.toml
Stoffel.toml is the project manifest. The CLI reads package, build, and MPC settings from this file. A minimal shape looks like:
Stoffel.toml to stoffel run --config. --config is for an MPC network/off-chain client TOML file; pass the project path as the positional PATH instead.
Checking and compiling
.stflb extension.
Optimization flags accepted by compile, build, and source-compiling run include:
Running programs
ClientStore.take_share, provide client-provided private inputs by numeric slot:
--network or --config is set. A local run spawns several MPC nodes/processes on your machine using the configured parties and threshold.
Development watch mode
stoffel dev runs a project through local MPC, then watches Stoffel.toml and source files for changes:
--poll-ms:
Testing
stoffel test runs no-argument test functions from a project or test file. By default it searches recursively under tests/.
Status, clean, and update
Debugging tips
- Run
stoffel check --print-irbefore investigating runtime behavior. - Run
stoffel run --program-infoto inspect function and instruction metadata. - Use
stoffel compile --disassemble <file.stflb>to inspect bytecode. - Use the Rust SDK wrapper when you want application code to compile and run the same Stoffel program.