CLI Usage Reference

The solana-cli crate provides a command-line interface tool for Solana

Examples

Get Pubkey

// Command
$ solana-keygen pubkey

// Return
<PUBKEY>

Airdrop SOL/Lamports

// Command
$ solana airdrop 1

// Return
"1 SOL"

Get Balance

// Command
$ solana balance

// Return
"3.00050001 SOL"

Confirm Transaction

// Command
$ solana confirm <TX_SIGNATURE>

// Return
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"

Deploy program

// Command
$ solana program deploy <PATH>

// Return
<PROGRAM_ID>

Usage