Skip to content
The solana command-line interface configures a cluster connection, reads network state, sends SOL, manages durable nonces, deploys programs, and operates stake and vote accounts. This reference follows Agave v4.2.1. Run solana --version to check the installed release and use --help for the exact options available in that version.
Commands that create, transfer, authorize, withdraw, or deploy submit transactions. Confirm the configured cluster and signer before running them. Devnet and Testnet tokens have no value; Mainnet commands use real SOL.

​Command structure

Get help at any level:

​Global options

Global options can be placed before the command. Command-specific help repeats the options that apply to that command.
OptionPurpose
-u, --url <URL_OR_MONIKER>Select an RPC URL or mainnet-beta, testnet, devnet, or localhost.
--ws <URL>Override the WebSocket endpoint.
-k, --keypair <KEYPAIR>Select a keypair file, ASK, stdin (-), or a supported signer URL.
-C, --config <FILEPATH>Use a different CLI configuration file.
--commitment <LEVEL>Read at processed, confirmed, or finalized commitment.
--output <FORMAT>Return json or json-compact where supported.
--skip-preflightSend without RPC simulation. Use only when the failure tradeoff is understood.
--use-tpu-clientSend transactions through the TPU client.
--no-address-labelsPrint addresses without local labels.
--skip-seed-phrase-validationPermit a recovery phrase outside the BIP39 English list.
-v, --verboseShow additional command output.
-V, --versionPrint the installed CLI version.

​Configure the CLI

The configuration contains an RPC URL, WebSocket URL, default signer, and commitment. A command-line option overrides the saved value for that invocation.

​Common account and transaction workflows

transfer accepts SOL by default. Use ALL as the amount to move the available balance after fees. For token examples, see the token quickstart.

​Program workflows

Pass --program-id <KEYPAIR_OR_ADDRESS> when a deployment must use a known program ID. --final makes a new deployment immutable; read its help carefully before using it because the upgrade authority cannot be restored.

​Durable nonce workflows

Use authorize-nonce-account to change the nonce authority and nonce-account to inspect the full account state. Transactions using a nonce also accept --nonce and --nonce-authority on supported commands.

​Stake workflows

To delegate, the stake account needs the minimum delegation (currently 1 SOL; check it with solana stake-minimum-delegation) plus the rent-exempt minimum for its 200 bytes (solana rent 200), so fund it with slightly more than 1 SOL. With exactly 1 SOL, delegate-stake fails with Error: Bad parameter: need at least <LAMPORTS> lamports to delegate this stake account. Deactivation completes at an epoch boundary and may take more than one epoch. Use stakes, validators, stake-history, and stake-minimum-delegation to inspect cluster and delegation state before submitting changes.

​Address utilities

PDA seeds use PREFIX:VALUE. Supported prefixes include string, pubkey, hex, u8, and fixed-width signed or unsigned integer encodings such as u64le.

​Offchain messages and shell completion

​Complete command index

The following index includes every top-level command in Agave v4.2.1. Commands such as program, config, feature, and address-lookup-table contain nested commands; run <command> --help to list them.
CommandDescription
accountShow an account’s lamports, owner, data, and executable state.
addressPrint the selected signer’s public key.
address-lookup-tableCreate, extend, freeze, deactivate, close, and inspect address lookup tables.
airdropRequest SOL from a local validator’s faucet (closed on devnet and testnet).
alpenglow-genesis-infoRead information about the Alpenglow genesis certificate.
authorize-nonce-accountAssign a durable nonce account authority.
balanceShow an account’s SOL balance.
blockFetch a confirmed block by slot.
block-heightShow the current block height.
block-productionShow leader block production for a slot range.
block-timeEstimate the production time of a block.
catchupWait for a validator to catch up with the cluster.
close-vote-accountClose a vote account and withdraw its remaining funds.
cluster-dateEstimate the cluster date from genesis time and network time.
cluster-versionShow the cluster entrypoint’s software version.
completionGenerate a shell completion script.
configGet or set CLI defaults.
confirmCheck a transaction signature’s confirmation status.
create-address-with-seedDerive a system address from a base, seed, and program ID.
create-nonce-accountCreate and initialize a durable nonce account.
create-stake-accountCreate a stake account.
create-stake-account-checkedCreate a stake account while checking the withdraw authority as a signer.
create-vote-accountCreate a validator vote account.
deactivate-stakeBegin deactivating delegated stake.
decode-transactionDecode a serialized transaction.
delegate-stakeDelegate a stake account to a vote account.
epochShow the current epoch number.
epoch-infoShow epoch, slot, block height, and transaction count information.
featureInspect and manage runtime feature accounts.
find-program-derived-addressDerive a PDA and canonical bump from typed seeds.
first-available-blockShow the first complete block retained by the RPC node.
genesis-hashShow the cluster genesis hash.
gossipList nodes visible through gossip.
helpPrint root or command help.
inflationShow inflation governor, rate, or reward information.
largest-accountsList the cluster’s largest accounts.
leader-scheduleDisplay the leader schedule.
live-slotsStream current slot progression.
logsStream transaction logs, optionally filtered by address.
merge-stakeMerge compatible stake accounts.
new-nonceAdvance a durable nonce.
noncePrint a durable nonce value.
nonce-accountShow complete durable nonce account state.
programDeploy, upgrade, inspect, dump, set authority for, or close programs and buffers.
recent-prioritization-feesShow recent prioritization fees for writable accounts.
rentCalculate the rent-exempt minimum for an account data size.
resolve-signerResolve a general signer reference such as a Ledger URL to its specific path.
sign-offchain-messageSign a UTF-8 offchain message.
slotShow the current slot.
split-stakeSplit lamports from one stake account into another.
stake-accountShow a stake account’s authorities, balance, and delegation state.
stake-authorizeChange a stake or withdraw authority.
stake-authorize-checkedChange a stake authority while checking the new authority as a signer.
stake-historyShow cluster stake activation and deactivation history.
stake-minimum-delegationShow the cluster’s minimum stake delegation.
stake-set-lockupSet a stake account lockup.
stake-set-lockup-checkedSet a lockup while checking the new custodian as a signer.
stakesList stake accounts, optionally filtered by validator or authority.
supplyShow circulating, non-circulating, and total SOL supply.
transaction-countShow the cluster transaction count.
transaction-historyList transactions involving an address from newest to oldest.
transferTransfer SOL between system accounts.
upgrade-nonce-accountIdempotently upgrade a legacy nonce account.
validator-infoPublish or read validator information.
validatorsShow validator stake, commission, skip rate, and version summary.
verify-offchain-signatureVerify a signed offchain message.
vote-accountShow a vote account’s authorities, commission, credits, and votes.
vote-authorize-voterChange a vote account’s voter authority.
vote-authorize-voter-checkedChange voter authority while checking the new authority as a signer.
vote-authorize-withdrawerChange a vote account’s withdraw authority.
vote-authorize-withdrawer-checkedChange withdraw authority while checking the new authority as a signer.
vote-update-commissionChange a vote account’s commission.
vote-update-validatorChange the validator identity assigned to a vote account.
withdraw-from-nonce-accountWithdraw some or all SOL from a durable nonce account.
withdraw-from-vote-accountWithdraw lamports from a vote account.
withdraw-stakeWithdraw inactive SOL from a stake account.

​Script output

Use --output json or --output json-compact where supported instead of parsing human-readable output:
Not every command supports structured output. Check the command’s help before depending on it in automation, and treat nonzero exit status as failure.