reth-console is a standalone attach console for reth and bera-reth. It is for operator work: connect, run raw RPC, inspect the result, move on. No JavaScript runtime and no web3 object model.
It connects over local IPC, http(s), or ws(s). IPC is the primary path: if no endpoint is provided, it uses DATADIR/reth.ipc. Use --exec for one-shot calls or start the REPL for an interactive session with history and completion.
The query mini-language is intentionally small: .count and .len, .first and .last, indexed access like .[0] or .[0].field, and .map(.field).
In REPL mode, query commands apply to the last RPC result (not the previous query output). Example: admin.peers, then .count, then .[0].
The primary workflow is local IPC against a node on the same machine.
reth-consoleRun one command and exit over IPC:
reth-console --exec "eth.blockNumber"Use a non-default data directory:
reth-console --datadir /path/to/rethUse an explicit endpoint only when needed:
reth-console --exec "eth_blockNumber" http://127.0.0.1:8545Example REPL session:
reth> eth.getLogs [{"fromBlock":"latest","toBlock":"latest","address":"0x..."}]
reth> .count
reth> .first
If you are running from source, build once via Make and run the binary directly:
make all
./target/debug/reth-consolereth-console [endpoint]
--datadir <path>
--ipc-filename <name>
--exec "<cmd>"
--http-header key:value
--alias alias=rpc_method
--datadir is used for default IPC resolution and the history file. --ipc-filename defaults to reth.ipc. --http-header and --alias are repeatable.
Run tests:
make testRun coverage:
make test-coverageCoverage writes coverage/lcov.info.
make test-coverage requires cargo-llvm-cov and Rust LLVM tools on the active toolchain:
cargo install cargo-llvm-cov
rustup component add llvm-tools-previewIf cargo-llvm-cov is installed into a custom Cargo home, add its bin directory to PATH before running coverage.
This project does not try to do geth-console parity. Scope is direct RPC invocation, aliases, and compact JSON extraction.