Skip to content

Commit c6a7cb0

Browse files
marc0oloraymondk
andauthored
docs: update installation to use official Homebrew formulas and ensure consistent ordering (#343)
Co-authored-by: raymondk <raymond.khalife@dfinity.org>
1 parent 37e4494 commit c6a7cb0

5 files changed

Lines changed: 26 additions & 28 deletions

File tree

.claude/CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,15 @@ Documentation follows the Diátaxis framework:
222222
- `docs/reference/` — Information-oriented technical specifications
223223
- `docs/migration/` — Migration guides (e.g., from dfx)
224224

225+
### Installation Instructions
226+
227+
- **npm is the recommended installation method** for quickstarts, tutorials, and READMEs
228+
- Only `docs/guides/installation.md` should list all installation options
229+
- Follow DRY: other docs should link to the installation guide rather than duplicating instructions
230+
- Consistent ordering: npm (in Quick Install), then Homebrew, then Shell Script (in Alternative Methods)
231+
- When referencing alternatives in other docs, maintain this order: "Homebrew, shell script, ..." (e.g., "See the Installation Guide for Homebrew, shell script, or other options")
232+
- Both `icp-cli` and `ic-wasm` are available as official Homebrew formulas: `brew install icp-cli` and `brew install ic-wasm`
233+
225234
### Paths
226235

227236
All paths are UTF-8. `PathBuf` and `Path` are the types from `camino`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
1616
npm install -g ic-mops && mops toolchain init
1717
```
1818

19-
> **Alternative methods:** See the [Installation Guide](docs/guides/installation.md) for shell script, Homebrew, Rust setup, or platform-specific instructions.
19+
> **Alternative methods:** See the [Installation Guide](docs/guides/installation.md) for Homebrew, shell script, Rust setup, or platform-specific instructions.
2020
2121
Then follow the **[Quickstart](docs/quickstart.md)** to deploy your first canister in under 5 minutes.
2222

docs/guides/installation.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Set up everything you need to build and deploy canisters on the Internet Compute
2020
> sudo dnf install -y dbus-libs openssl ca-certificates
2121
> ```
2222
23-
## Quick Install (Recommended)
23+
## Quick Install via npm (Recommended)
2424
2525
**Required:** [Node.js](https://nodejs.org/) (LTS) — needed for npm and for building frontend canisters.
2626
@@ -60,33 +60,23 @@ If you prefer not to use npm, or need platform-specific options, see the section
6060

6161
### icp-cli
6262

63-
**Shell Script (macOS / Linux / WSL):**
63+
**Homebrew (macOS/Linux):**
6464

6565
```bash
66-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh | sh
67-
```
68-
69-
Restart your shell or follow the instructions shown by the installer.
70-
71-
**Shell Script (Windows, for Rust-only mainnet projects):**
72-
73-
```ps1
74-
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.ps1 | iex"
66+
brew install icp-cli
7567
```
7668

77-
Restart your terminal after installation.
78-
79-
**Homebrew (macOS/Linux only):**
69+
**Shell Script (macOS/Linux/WSL):**
8070

8171
```bash
82-
brew install dfinity/tap/icp-cli
72+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh | sh
8373
```
8474

85-
To update later: `brew upgrade dfinity/tap/icp-cli`
86-
87-
> **Note:** Homebrew installs ic-wasm as a dependency, so you can skip the ic-wasm installation below.
75+
**Shell Script (Windows):**
8876

89-
> **Note:** [Node.js](https://nodejs.org/) (LTS recommended) is still required for the Motoko toolchain and frontend canisters when using alternative installation methods.
77+
```ps1
78+
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.ps1 | iex"
79+
```
9080

9181
### ic-wasm
9282

@@ -103,12 +93,10 @@ To update later: `brew upgrade dfinity/tap/icp-cli`
10393

10494
**Installation:**
10595

106-
> **Note:** If you installed icp-cli via Homebrew, ic-wasm is already included. Skip this section.
107-
108-
**npm (recommended):**
96+
**Homebrew (macOS/Linux):**
10997

11098
```bash
111-
npm install -g @icp-sdk/ic-wasm
99+
brew install ic-wasm
112100
```
113101

114102
**Shell Script (macOS/Linux):**
@@ -130,10 +118,11 @@ Learn more: [ic-wasm repository](https://github.com/dfinity/ic-wasm)
130118
**Motoko:**
131119

132120
```bash
133-
npm install -g ic-mops
134-
mops toolchain init
121+
curl -fsSL cli.mops.one/install.sh | sh && mops toolchain init
135122
```
136123

124+
> **Note:** Requires [Node.js](https://nodejs.org/) and a package manager (npm, pnpm, or bun). The shell script installs the latest Mops version stored onchain on ICP.
125+
137126
**Rust:**
138127

139128
Install from [rustup.rs](https://rustup.rs/):

docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
1616
npm install -g ic-mops && mops toolchain init
1717
```
1818

19-
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, or other options.
19+
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for Homebrew, shell script, or other options.
2020
2121
## Steps
2222

docs/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This installs:
3333
- **ic-wasm** — optimizes WebAssembly for the Internet Computer
3434
- **mops** — Motoko package manager, which also installs the Motoko compiler
3535

36-
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, Rust setup, or other options.
36+
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for Homebrew, shell script, Rust setup, or other options.
3737
3838
Verify the tools are installed:
3939

0 commit comments

Comments
 (0)