A CLI for local Solana transaction simulation (LiteSVM) plus developer utilities.
- Simulate transactions locally without deploying programs (raw tx, signature, or bundle)
- Override programs/accounts, fund SOL or tokens, patch data
- Store accounts once, replay without hitting RPC
- Serialize/deserialize Borsh with a type descriptor DSL
- Decode, convert, derive PDAs, inspect accounts, pull program ELF, send transactions
git clone https://github.com/user/sonar.git
cd sonar
cargo build --release
# Binary at target/release/sonar# Simulate a transaction locally
sonar simulate <BASE58_OR_BASE64_TX> --rpc-url https://api.mainnet-beta.solana.com
# Or fetch by signature (auto-detected)
sonar simulate <SIGNATURE> --rpc-url https://api.mainnet-beta.solana.com
# Decode an account
sonar account <PUBKEY> --rpc-url https://api.mainnet-beta.solana.com| Command | Use when |
|---|---|
simulate |
Local execution logs, balance changes, and failure reasons |
decode |
Transaction structure (instructions/accounts) without execution |
replay |
Replay a confirmed transaction from on-chain metadata (no local simulation) |
account |
Decoded account metadata/data for a pubkey |
program-elf |
Raw ELF bytes from upgradeable program/buffer accounts |
idl |
Fetch/sync Anchor IDLs or derive an IDL account address |
send |
Submit a signed transaction to the network |
borsh |
Serialize JSON to Borsh bytes or deserialize Borsh bytes to JSON |
convert |
Format conversion |
pda |
Derive a PDA from seeds |
config |
Inspect or update ~/.config/sonar/config.toml |
cache |
List, clean, or inspect cached account data |
completions |
Generate shell completion scripts |
- Simulate & Decode: full usage, overrides, funding, patching, cache
- Account, PDA, Program ELF, IDL, Send: per-command reference
- Borsh: serialization/deserialization with type descriptor DSL
- Convert: format conversion reference
- Configuration: config file, cache, completions
- Output Conventions: stdout/stderr contract, permission markers, diagnostics
MIT