sol — Solana for Humans and LLM Agents
A command-line tool that lets you work with Solana the way you'd describe it out loud. Pay people, buy and sell tokens, stake, lend, and track your portfolio — instead of constructing transactions and managing program instructions, you say what you want. Keys live locally on disk. No API keys, no private key env vars.
# Set up
sol wallet create --name "ClawdBot"
# Transfer some SOL to the agent wallet, then:
# Check balance
sol wallet balance
# Swap 50 USDC for BONK
sol token swap 50 usdc bonk
# Stake idle SOL
sol stake new 10
# Deposit USDC to earn yield (auto-picks best rate across protocols)
sol lend deposit 100 usdc
# See everything you hold
sol portfolio
# Snapshot for tracking over time
sol portfolio snapshot --label "post-rebalance"
Documentation: solanacompass.com/skills — complete guides on trading, staking, lending, prediction markets, agent security, and more.
Install
npm install -g @solana-compass/cli
Or run without installing:
npx @solana-compass/cli@latest wallet list
Requires Node.js >= 20.
Install as an Agent Skill
Sol CLI is available as a discoverable skill for Claude Code and other LLM agents:
# Claude Code — add the marketplace, then install the plugin
/plugin marketplace add solanaguide/solana-cli
/plugin install solana-payments-wallets-trading@solanaguide-solana-cli
# skills.sh
npx skills add solanaguide/solana-cli
Once installed, the agent can use Sol commands directly when you ask it to send crypto, trade tokens, check balances, stake, lend, or track portfolio performance.
First-time setup
sol config set rpc.url https://api.mainnet-beta.solana.com
sol wallet create
Use a dedicated RPC endpoint for production — the public one rate-limits aggressively. Helius, Triton, or QuickNode all offer free tiers.
Commands
wallet — Create, import, and manage Solana keypairs
sol wallet create # New wallet, auto-named
sol wallet create --name trading --count 3 # Batch-create 3 wallets
sol wallet list # List all wallets with SOL balances
sol wallet balance # Full token balances + USD values
sol wallet balance trading # Balance for a specific wallet
sol wallet import --solana-cli # Import from ~/.config/solana/id.json
sol wallet import ./keypair.json --name cold # Import from file
sol wallet export main # Show key file path
sol wallet remove old-wallet # Remove from registry
sol wallet set-default trading # Change the active wallet
sol wallet label main --add trading # Tag wallets for organization
sol wallet history # Recent transaction activity
sol wallet history --type swap --limit 5 # Filtered
Wallets are stored locally as key files. The first wallet created becomes the default for all commands. Change it with sol wallet set-default <name>, or override per-command with --wallet <name-or-address>.
token — Prices, swaps, transfers, and account management
sol token browse trending # Discover trending tokens
sol token browse top-traded --interval 24h # Most traded over 24h
sol token browse lst # Liquid staking tokens
sol token price sol # Current SOL price
sol token price sol usdc bonk # Multiple prices at once
sol token info bonk # Token metadata (mint, decimals)
sol token list # All tokens in your wallet
sol token sync # Refresh token metadata cache
sol token swap 50 usdc bonk # Swap via Jupiter
sol token swap 1.5 sol usdc --slippage 100 # 1% slippage tolerance
sol token swap 50 usdc bonk --quote-only # Preview without executing
sol token swap 5 usdc sol --wallet backup # Swap from a specific wallet
sol token send 2 sol GkX...abc # Send SOL to an address
sol token burn bonk --all # Burn all of a token
sol token close --all --yes # Close empty accounts, reclaim rent
Swaps use Jupiter's aggregator — best price across all Solana DEXes, no API key needed. Every swap is logged with cost-basis prices for portfolio tracking.
Token resolution
Anywhere a command takes a token, you can use a symbol (sol, usdc, bonk) or a mint address (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v). Resolution works in three steps:
- Hardcoded well-known list — 15 major tokens (SOL, USDC, USDT, JUP, BONK, mSOL, jitoSOL, bSOL, ETH, wBTC, PYTH, JTO, WEN, RNDR, JLP) resolve instantly offline. These are immune to spoofing.