# Solana CLI Usage Refrence

### Solana Cluster/RPC commands:

#### Check what cluster the Solana command-line tool (CLI) is currently targeting by running the following command:

```
// Command
$ solana config get

// Return
Config File: C:\Users\etc..
RPC URL: https://api.devnet.solana.com
WebSocket URL: wss://api.devnet.solana.com/ (computed)
Keypair Path: C:\Users\etc..
Commitment: confirmed
```

#### Change cluster/rpc:

<pre><code>// Command
<strong>$ solana config set --url https://api.devnet.solana.com
</strong></code></pre>

#### Public Rpc list:

* [**https://api.devnet.solana.com**](https://api.devnet.solana.com)
* [**https://api.testnet.solana.com**](https://api.testnet.solana.com)
* [**https://api.mainnet-beta.solana.com**](https://api.mainnet-beta.solana.com)

### Solana Wallet commands:

#### Change wallet connected to CLI (Wallet needs to be decrypted into base64 json file):

```
// command
solana config set --keypair C:\PATH\wallet.json

//Example
solana config set --keypair C:\Users\Sebastian.config\solana\id.json
```

#### Devnet CLI faucet (Airdrops Solana into wallet):

```
// command
$ solana airdrop 1 <RECIPIENT_ACCOUNT_ADDRESS> --url https://api.devnet.solana.com
```

#### How to see current assosiated wallet address:

```
// Command
$ solana-keygen pubkey

// Return
madtRbRV8Dso6V3annY8Y5R7HAFQTbhUTRANuuP4DYB
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sebastian-solano.gitbook.io/solana-development-bible/solana-cli-usage-refrence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
