Skip to content
LogoLogo

Tevm CLI

The Tevm CLI exposes rc.151 node actions, contract tools, state controls, and Solidity compilation as shell commands. Reach for it when a one-off command or script is more direct than creating a JavaScript client.

Install and create a local session

npm install --global @tevm/cli@1.0.0-rc.151
tevm --version
tevm session docs --local --json
1.0.0-rc.151
{
  "ok": true,
  "command": "session",
  "result": {
    "version": 1,
    "name": "docs"
  },
  "session": "docs"
}

A named session reloads and persists local state between commands. Use --run to skip the interactive editor and --json for the stable { ok, command, result, session } envelope.

Global options

FlagEnvironmentEffect
--json, --no-jsonTEVM_JSONSelect stable JSON or human output.
--session <name>TEVM_SESSIONLoad and persist a named local or forked state file.
--run, -rTEVM_RUNExecute directly instead of opening the parameter editor.
--rpc <url>TEVM_RPCFork or query the selected JSON-RPC endpoint.

Command reference

CommandPurpose
tevm sessionCreate or inspect a persistent named local/forked session.
tevm solCompile one Solidity file, deploy it, and call a function.
tevm callExecute a raw EVM call against a contract or address.
tevm compileCompile Solidity sources to ABI and bytecode artifacts.
tevm contractCall a contract function through its ABI, with a decoded trace.
tevm action create-access-listCompute the EIP-2930 access list for a call.
tevm create-block-filterCreate a filter that tracks new blocks.
tevm create-contract-event-filterCreate an event filter scoped to one contract ABI event.
tevm create-event-filterCreate a raw topic-based event filter.
tevm deployDeploy bytecode into the session and persist the deployed contract.
tevm dump-stateExport the full EVM state as JSON.
tevm estimate-fees-per-gasEstimate current base and priority fees per gas.
tevm estimate-gasEstimate the gas a call would consume.
tevm get-accountRead an account’s balance, nonce, code, and storage root.
tevm action get-balanceRead an account balance.
tevm get-blockFetch a block by number, hash, or tag.
tevm get-block-numberRead the current block height.
tevm get-bytecodeRead the deployed bytecode at an address.
tevm get-chain-idRead the chain id.
tevm get-ens-addressResolve an ENS name to an address.
tevm get-ens-nameReverse-resolve an address to an ENS name.
tevm get-ens-textRead an ENS text record.
tevm get-gas-priceRead the current gas price.
tevm get-storage-atRead a raw storage slot.
tevm get-transactionFetch a transaction by hash.
tevm load-stateImport a previously dumped EVM state.
tevm mineMine one or more blocks.
tevm multicallBatch several contract reads into one call.
tevm read-contractRead a view/pure contract function through its ABI.
tevm action send-raw-transactionBroadcast a signed raw transaction.
tevm serveStart a persistent Tevm JSON-RPC server.
tevm set-accountSet an account’s balance, nonce, or code.
tevm set-codeOverwrite the deployed bytecode at an address.
tevm set-nonceOverwrite an account nonce.
tevm set-storage-atOverwrite a raw storage slot.
tevm action simulate-callsSimulate a batch of calls without committing state.

tevm create, tevm generate, and tevm tsc ship in 1.0.0-rc.151 but are not documented here: their non-interactive examples do not currently produce reproducible output, so no verified page exists yet. Run tevm create --help, tevm generate --help, or tevm tsc --help for their current schemas.

Neighbours

Getting started · Sessions and forks · tevm-run · Tevm Node JSON-RPC · Tevm actions