sim-cli
sim runs Termina simulator sessions over historical Solana slots from the command line. Replay
a slot range, swap in a new program binary or account overrides, and compare the results with
the onchain outcome or with another run.
This guide covers what each command is for. Every flag is documented in sim <command> --help;
guides and concepts are in the Termina docs.
Install
| INSTALL_DIR="/.local/bin"
Or build it from crates.io (needs Rust 1.97 or newer):
sim update replaces the binary with the latest prebuilt one. Prebuilt binaries track the main
branch, so pin a version with cargo install when you need a reproducible install.
Commands
| Command | What it is for |
|---|---|
sim run |
Replay a slot range, optionally with a new program binary, account overrides or rerouted swaps, and write the results as NDJSON |
sim compare |
Diff two sim run output files: regressions, improvements, logs, compute units, balances |
sim summarize |
Print the totals of one output file |
sim ranges |
List the slot ranges the server can replay |
sim usage |
Show your API key's usage |
sim bundle |
Build, inspect and delete your custom bundles |
sim datasets credentials |
Print read-only S3 credentials for the datasets |
sim datasets generate depth |
Request a venue-depth dataset; sim datasets universe depth lists the markets it samples |
sim update |
Replace sim with the latest prebuilt binary |
Networked commands read your key from SIMULATOR_API_KEY.
Test a new program binary
Gate CI on regressions
With --fail-on-diff, sim compare exits with status 1 when the selected section has an entry:
Reroute swaps
# Reroute the range's swaps through the router
# Price them on your own venue's instructions instead
The template format is in File formats.