60 lines
692 B
Plaintext
60 lines
692 B
Plaintext
---
|
|
title: CLI Usage Reference
|
|
---
|
|
|
|
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
|
|
|
|
## Examples
|
|
|
|
### Get Pubkey
|
|
|
|
```bash
|
|
// Command
|
|
$ solana-keygen pubkey
|
|
|
|
// Return
|
|
<PUBKEY>
|
|
```
|
|
|
|
### Airdrop SOL/Lamports
|
|
|
|
```bash
|
|
// Command
|
|
$ solana airdrop 2
|
|
|
|
// Return
|
|
"2.00000000 SOL"
|
|
```
|
|
|
|
### Get Balance
|
|
|
|
```bash
|
|
// Command
|
|
$ solana balance
|
|
|
|
// Return
|
|
"3.00050001 SOL"
|
|
```
|
|
|
|
### Confirm Transaction
|
|
|
|
```bash
|
|
// Command
|
|
$ solana confirm <TX_SIGNATURE>
|
|
|
|
// Return
|
|
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
|
|
```
|
|
|
|
### Deploy program
|
|
|
|
```bash
|
|
// Command
|
|
$ solana program deploy <PATH>
|
|
|
|
// Return
|
|
<PROGRAM_ID>
|
|
```
|
|
|
|
## Usage
|