Manage the active Solana network. Default is devnet.
Review: $ARGUMENTS
Instructions
No arguments — show current network
- Read
SOLANA_NETWORKfrom environment. If unset, assumedevnet. - Display current network and available options:
Current network: [network]
Available:
devnet - Testing, free SOL via airdrop
testnet - Community testnet, real conditions, no risk
localnet - Local validator, requires local setup
mainnet-beta - Production, real SOL, requires /solana-accept-risk
Switching to devnet / testnet / localnet
- Set
SOLANA_NETWORKto the requested value. - Confirm the switch with network details.
Switching to mainnet-beta
- Check if
SOLANA_ACCEPT_RISKis set totrue. - If not accepted — refuse the switch and tell the user to run
/solana-accept-riskfirst. - If accepted — switch and show mainnet safety reminders:
- Verify addresses 3x before transferring
- Start with tiny test amounts (0.001 SOL)
- Simulate all transactions first
Invalid network name
Show error with valid options: devnet, testnet, localnet, mainnet-beta.
Notes
- Network defaults to devnet on session restart.
- Custom RPC: set
SOLANA_RPC_URLenvironment variable.