Skip to content
LogoLogo
@tevm/cli · tevm-run

An EVM in your terminal

@tevm/cli is an in-process Ethereum command line — a full EVM inside the CLI process, no Docker container, no background node, no anvil to babysit. tevm-run executes TypeScript scripts with the Tevm Solidity bundler already wired in.

npm install --global @tevm/cli

Try the playground →

tevm — an EVM in your terminal
$

@tevm/cli runs a full EVM inside the CLI process — no Docker container, no background node, no anvil to babysit — and exposes node actions, contract calls, state manipulation, and Solidity compilation as ordinary shell commands.

tevm-run is its sibling: a Bun-based runner that executes a TypeScript file with the Tevm Solidity bundler already wired in, so a script can import a .sol file directly.

npm install --global @tevm/cli
tevm session mainnet --fork https://mainnet.optimism.io --json
tevm get-balance --address vitalik.eth --session mainnet --run --json

Why it exists

Most Ethereum tooling makes you choose between a REPL and a daemon. Tevm CLI is neither:

  • No process to manage. Every command spins up an EVM in-process, applies your session's saved state, runs, and exits. There is nothing to start or kill.
  • Persistent, named sessions. tevm session <name> writes a fork URL, an optional pinned block, and accumulated state to disk. Subsequent commands reload it, so a sequence of set-code, call, mine behaves like one continuous chain.
  • Forks that are reproducible. Pin a block with --fork-block and the same command returns the same answer next week.
  • Typed JSON for agents and CI. --json switches every command to a stable { ok, command, result, session } envelope, and suppresses the interactive Ink editor so a script never hangs waiting for a keystroke.
  • Solidity without a framework. tevm compile, tevm sol, and tevm deploy take you from a .sol file to a return value without a foundry.toml or a hardhat.config.

Two packages

PackageBinaryRuntimeUse it for
@tevm/clitevmNode.js ≥ 24Shell-driven EVM work: forks, calls, state, compilation, a local JSON-RPC server.
tevm-runtevm-runBun ≥ 1.0Executing a TypeScript script that imports Solidity contracts directly.

Where to go next

Explore the commands

Pick a command to watch it run:

Execute an eth_call against a fork or a saved session — no wallet, no gas.

tevm call
$

The Tevm family

This site is one of the *.tevm.sh docs sites — jump between them: