Introduction
The Solana Command Line Interface (CLI) is a comprehensive suite of tools for interacting with the Solana blockchain. It provides validators, developers, and users with powerful commands to manage accounts, deploy programs, stake tokens, and configure validator operations. Before running any Solana CLI commands, the tools must be installed on your system. See the Installation guide for detailed instructions.Main CLI Tools
The Solana CLI suite consists of several command-line tools, each serving specific purposes:solana
The main command-line tool for interacting with Solana clusters. It provides commands for:- Account management and balance checking
- Token transfers
- Stake account operations
- Vote account management
- Cluster queries and network information
- Program deployment and interaction
solana-keygen
A key generation and management tool for creating and managing Solana keypairs:- Generate new keypairs with various security options
- Derive public keys from seed phrases
- Verify keypair ownership
- Support for BIP39/BIP44 hierarchical derivation
- Grind vanity addresses
solana-validator
The validator node software for running a Solana validator.Command Structure
All Solana CLI commands follow a consistent structure:Getting Help
View all available commands:Common Command Patterns
Placeholder Conventions
Command documentation uses placeholders to indicate where you should provide specific values:<AMOUNT>- A numeric value (e.g.,42or100.42)<ACCOUNT_ADDRESS>- A base58-encoded public key (e.g.,9grmKMwTiZwUHSExjtbFzHLPTdWoXgcg1bZkhvwTrTww)<KEYPAIR>- A keypair file path, hardware wallet URL, or prompt URI<PUBKEY>- A public key address
Global Options
Several options are available across all commands:Essential Commands
Configuration Management
View current configuration:Account Information
Check balance:Cluster Information
Check CLI version:Keypair Conventions
Many commands require a<KEYPAIR> argument. The value depends on your wallet type:
File System Wallet
Provide the path to the keypair JSON file:Paper Wallet
Use theprompt:// URI scheme to enter your seed phrase:
Hardware Wallet
Use a keypair URL specifying the device:Installation Verification
Configuration File
The Solana CLI stores configuration in~/.config/solana/cli/config.yml by default. This file contains:
json_rpc_url- The cluster RPC endpointwebsocket_url- WebSocket endpoint for subscriptionskeypair_path- Default keypair file locationcommitment- Default commitment level