Skip to content

Commit 51bc678

Browse files
authored
Installation (#909)
* added examples back in * installation revisions + standardization * comments * comments
1 parent 5371a27 commit 51bc678

5 files changed

Lines changed: 69 additions & 100 deletions

File tree

apps/web/content/docs/en/intro/installation/anchor-cli-basics.mdx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,41 @@ description:
55
This section walks through some common Anchor CLI commands to get you started.
66
---
77

8-
This section walks through some common Anchor CLI commands to get you started.
9-
For more information on the Anchor CLI, see the
10-
[Anchor documentation](https://www.anchor-lang.com/docs).
8+
This section provides some common commands and examples to help you get started
9+
using the [Anchor CLI](https://www.anchor-lang.com/docs).
1110

1211
<Steps>
1312
<Step>
1413

15-
### Initialize Project
14+
### Initialize the project
1615

17-
To create a new Anchor project, run the following command:
16+
Create a new Anchor project by running the command shown below.
17+
It will create a new directory with the project name and use it to
18+
initialize a new Anchor project.
1819

1920
```terminal
2021
$ anchor init <project-name>
2122
```
2223

23-
For example, to create a project called `my-project`, run:
24+
For example, the command below will create a project called `my-project`.
25+
The `my-project` directory will contain a basic Rust program and TypeScript test template.
2426

2527
```terminal
2628
$ anchor init my-project
2729
```
2830

29-
This command creates a new directory with the project name and initializes a new
30-
Anchor project with a basic Rust program and TypeScript test template.
31-
32-
Navigate to the project directory:
31+
Then navigate to the project directory:
3332

3433
```terminal
3534
$ cd <project-name>
3635
```
3736

38-
See the Anchor project's
39-
[file structure](https://www.anchor-lang.com/docs/quickstart/local#project-file-structure).
37+
See Anchor's [project file structure](https://www.anchor-lang.com/docs/quickstart/local#project-file-structure).
4038

4139
</Step>
42-
4340
<Step>
44-
### Build Program
41+
42+
### Build the program
4543

4644
To build your project, run the following command:
4745

@@ -101,7 +99,7 @@ again.
10199
</Step>
102100
<Step>
103101

104-
### Deploy Program
102+
### Deploy the program
105103

106104
To deploy your project, run the following command:
107105

@@ -115,28 +113,24 @@ This command deploys your program to the `cluster` specified in the
115113
</Step>
116114
<Step>
117115

118-
### Test Program
116+
### Test the program
119117

120118
To test your project, run the following command:
121119

122120
```terminal
123121
$ anchor test
124122
```
125123

126-
<Callout>
127-
128124
This command builds, deploys, and runs the tests for your project.
129125

130-
When using `localnet` as the `cluster` in `Anchor.toml`, Anchor automatically
131-
starts a local validator, deploys your program, runs tests, and then stops the
132-
validator.
133-
126+
<Callout>
127+
When using the `localnet` cluster, Anchor automatically starts a local validator,
128+
deploys the program, runs tests, then stops the validator.
134129
</Callout>
135130

136131
<Callout type="warn">
137132

138-
When running _shell`anchor test`_ after creating a new Anchor project on Linux
139-
or WSL, you may encounter the following errors if you don't have Node.js or Yarn
133+
Either of the following errors may indicate that you don't have Node.js or Yarn
140134
installed:
141135

142136
```

apps/web/content/docs/en/intro/installation/dependencies.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ anchor-cli 0.31.1
488488
</Step>
489489
</Steps>
490490

491-
### Setting up AI Tooling for Solana development
491+
### Set up AI tooling for Solana development
492492

493493
This section details optional AI tooling setup you can use to accelerate your
494494
Solana development.

apps/web/content/docs/en/intro/installation/index.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ $ curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.de
143143

144144
A successful installation will return output like the following:
145145

146-
```
146+
```txt title="Example output"
147147
Installed Versions:
148148
Rust: rustc 1.90.0 (1159e78c4 2025-09-14)
149149
Solana CLI: solana-cli 2.3.13 (src:5466f459; feat:2142755730, client:Agave)
@@ -164,9 +164,3 @@ $ rustc --version && solana --version && anchor --version && node --version && y
164164
Dependencies](/docs/intro/installation/dependencies) section below for
165165
instructions to install each dependency individually.
166166
</Callout>
167-
168-
### Next steps
169-
170-
Once you have installed all the necessary dependencies, you are ready to review
171-
the [Solana CLI Basics](/docs/intro/installation/solana-cli-basics) and
172-
[Anchor CLI Basics](/docs/intro/installation/anchor-cli-basics).

apps/web/content/docs/en/intro/installation/solana-cli-basics.mdx

Lines changed: 38 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,40 @@ description:
55
This section walks through some common Solana CLI commands to get you started.
66
---
77

8-
<Steps>
9-
<Step>
8+
This section provides some common commands and examples
9+
to help you get you started using the Solana CLI.
1010

11-
### Solana Config
11+
## Solana config
1212

13-
To see your current config:
13+
Your Solana config specifies the following variables:
14+
15+
- **Config file**: The path to your config file
16+
- **RPC URL & Websocket URL**: The Solana cluster to which the CLI makes requests
17+
- **Keypair path**:
18+
The path to the default Solana wallet (keypair) used to pay transaction fees and deploy programs.
19+
By default, this file is stored at `~/.config/solana/id.json`.
20+
21+
To see your current configuration settings, enter the follow command in your terminal.
1422

1523
```terminal
1624
$ solana config get
1725
```
1826

19-
You should see output like the following:
27+
A successful command will return output similar to the following:
2028

21-
```
29+
```txt title="Example output"
2230
Config File: /Users/test/.config/solana/cli/config.yml
2331
RPC URL: https://api.mainnet-beta.solana.com
2432
WebSocket URL: wss://api.mainnet-beta.solana.com/ (computed)
2533
Keypair Path: /Users/test/.config/solana/id.json
2634
Commitment: confirmed
2735
```
2836

29-
The RPC URL and Websocket URL specify the Solana cluster the CLI makes requests
30-
to.
37+
You can change the Solana CLI cluster with the following commands:
3138

32-
You can update the Solana CLI cluster using the following commands:
39+
<Tabs items={["Full commands", "Short commands"]}>
40+
41+
<Tab value="Full commands">
3342

3443
```terminal
3544
$ solana config set --url mainnet-beta
@@ -38,7 +47,8 @@ $ solana config set --url localhost
3847
$ solana config set --url testnet
3948
```
4049

41-
You can also use the following short options:
50+
</Tab>
51+
<Tab value="Short commands">
4252

4353
```terminal
4454
$ solana config set -um # For mainnet-beta
@@ -47,27 +57,23 @@ $ solana config set -ul # For localhost
4757
$ solana config set -ut # For testnet
4858
```
4959

50-
The Keypair Path points to the default Solana wallet (keypair) used by the
51-
Solana CLI to pay transaction fees and deploy programs. By default, this file is
52-
stored at `~/.config/solana/id.json`.
53-
54-
</Step>
55-
<Step>
60+
</Tab>
61+
</Tabs>
5662

57-
### Create Wallet
63+
## Create a wallet
5864

59-
To send transactions using the Solana CLI, you need a Solana wallet funded with
60-
SOL.
65+
Before you can send a transactions using the Solana CLI,
66+
you need a Solana wallet funded with SOL.
6167

62-
To generate a keypair at the default Keypair Path, run the following command:
68+
To generate a keypair at the default keypair path, run the following command:
6369

6470
```terminal
6571
$ solana-keygen new
6672
```
6773

68-
You should see output like the following:
74+
A successful command will return output similar to the following:
6975

70-
```
76+
```txt title="Example output"
7177
Generating a new keypair
7278
7379
For added security, enter a BIP39 passphrase
@@ -87,11 +93,8 @@ cream bleak tortoise ocean nasty game gift forget fancy salon mimic amazing
8793
```
8894

8995
<Callout type="info">
90-
91-
If you already have a file system wallet saved at the default location, this
92-
command doesn't override it unless you explicitly force override using the
93-
`--force` flag.
94-
96+
This command will not override an existing account at the default location,
97+
unless you use the `--force` flag.
9598
</Callout>
9699

97100
To view your wallet's address (public key), run:
@@ -100,21 +103,18 @@ To view your wallet's address (public key), run:
100103
$ solana address
101104
```
102105

103-
</Step>
104-
<Step>
105-
106-
### Airdrop SOL
106+
## Airdrop SOL
107107

108108
Request an airdrop of SOL to your wallet to pay for transactions and program
109109
deployments.
110110

111-
Set your cluster to the devnet:
111+
1. Set your cluster to Devnet:
112112

113113
```terminal
114114
$ solana config set -ud
115115
```
116116

117-
Then request an airdrop of devnet SOL:
117+
2. Request an airdrop of Devnet SOL:
118118

119119
```terminal
120120
$ solana airdrop 2
@@ -133,31 +133,20 @@ To check your wallet's SOL balance, run the following command:
133133
$ solana balance
134134
```
135135

136-
</Step>
137-
<Step>
138-
139-
### Run Local Validator
136+
## Run local validator
140137

141138
The Solana CLI includes a built-in
142139
[test validator](https://docs.anza.xyz/cli/examples/test-validator) for local
143140
development.
144141

145-
In a separate terminal, run the following command to start a local validator:
142+
Open a new terminal and update your CLI to use localhost:
146143

147144
```terminal
148-
$ solana-test-validator
145+
$ solana config set -ul
149146
```
150147

151-
<Callout>
152-
153-
Remember to also update your CLI to use localhost before running Solana CLI
154-
commands:
148+
Run the following command to start a local validator:
155149

156150
```terminal
157-
$ solana config set -ul
151+
$ solana-test-validator
158152
```
159-
160-
</Callout>
161-
162-
</Step>
163-
</Steps>

apps/web/content/docs/en/intro/quick-start/index.mdx

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ Welcome to the Solana quick start guide! This hands-on guide will introduce you
1111
to the **Solana Playground** (Solpg), where you can learn core-concepts,
1212
regardless of your prior experience. In this tutorial, you will learn about:
1313

14-
- **Solana Accounts**: How the Solana network stores data
15-
- **Sending Transactions**: How to interact with the Solana network by sending
14+
- **Solana accounts**: How the Solana network stores data
15+
- **Sending transactions**: How to interact with the Solana network by sending
1616
transactions
17-
- **Building and Deploying Programs**: Create your first Solana program and
17+
- **Building and deploying programs**: Create your first Solana program and
1818
deploy it to the network
19-
- **Program Derived Addresses (PDAs)**: Learn how to use PDAs to create
20-
deterministic addresses for accounts
21-
- **Cross-Program Invocations (CPIs)**: Learn how to call other programs from
22-
within your program, enabling complex interactions and composability between
23-
different programs on Solana
19+
- **Program-Derived addresses**: Learn how to create deterministic addresses for accounts
20+
- **Cross-Program Invocations**: Learn how to call other programs from
21+
within your program, enabling complex interactions and program composability
2422

2523
## The Solana Playground
2624

@@ -35,7 +33,7 @@ create a Playground [wallet](/docs/references/terminology#wallet) and add
3533
[SOL](/docs/references/terminology#sol). This wallet will allow you to interact
3634
with the Solana network directly from your browser.
3735

38-
## Create a Playground Wallet
36+
## Create a Playground wallet
3937

4038
<Steps>
4139
<Step>
@@ -57,7 +55,7 @@ Click the 🔴 **Not connected** text at the bottom left corner of the screen.
5755
</Step>
5856
<Step>
5957

60-
### Save your Keypair
58+
### Save your keypair
6159

6260
Click **Save keypair** to save your key pair locally. When you're ready, click
6361
**Continue**.
@@ -89,7 +87,7 @@ SOL to your wallet.
8987
</Step>
9088
<Step>
9189

92-
### Add SOL to Your Wallet
90+
### Add SOL to your wallet
9391

9492
Before starting development, you need to add devnet SOL to your wallet. As a
9593
developer, SOL is used for two main use cases:
@@ -100,15 +98,15 @@ developer, SOL is used for two main use cases:
10098
You can add devnet SOL to your wallet using the Playground terminal or with the
10199
Devnet Faucet. Each option is described below:
102100

103-
#### Option 1: Use the Playground Terminal
101+
#### Option 1: Use the Playground terminal
104102

105103
Run the following command in the Playground terminal:
106104

107105
```terminal
108106
$ solana airdrop 5
109107
```
110108

111-
#### Option 2: Use the Devnet Faucet
109+
#### Option 2: Use the Devnet faucet
112110

113111
If option 1 fails, due to rate limits or other errors, use Solana's
114112
[Web Faucet](https://faucet.solana.com/).
@@ -121,9 +119,3 @@ If option 1 fails, due to rate limits or other errors, use Solana's
121119

122120
</Step>
123121
</Steps>
124-
125-
## Next Steps
126-
127-
Now that you have created a Playground wallet and added Devnet SOL, you are
128-
ready to
129-
[read from the Solana network](/docs/intro/quick-start/reading-from-network).

0 commit comments

Comments
 (0)