Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ Documentation follows the Diátaxis framework:
- `docs/reference/` — Information-oriented technical specifications
- `docs/migration/` — Migration guides (e.g., from dfx)

### Installation Instructions

- **npm is the recommended installation method** for quickstarts, tutorials, and READMEs
- Only `docs/guides/installation.md` should list all installation options
- Follow DRY: other docs should link to the installation guide rather than duplicating instructions
- Consistent ordering: npm (in Quick Install), then Homebrew, then Shell Script (in Alternative Methods)
- 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")
- Both `icp-cli` and `ic-wasm` are available as official Homebrew formulas: `brew install icp-cli` and `brew install ic-wasm`

### Paths

All paths are UTF-8. `PathBuf` and `Path` are the types from `camino`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
npm install -g ic-mops && mops toolchain init
```

> **Alternative methods:** See the [Installation Guide](docs/guides/installation.md) for shell script, Homebrew, Rust setup, or platform-specific instructions.
> **Alternative methods:** See the [Installation Guide](docs/guides/installation.md) for Homebrew, shell script, Rust setup, or platform-specific instructions.

Then follow the **[Quickstart](docs/quickstart.md)** to deploy your first canister in under 5 minutes.

Expand Down
39 changes: 14 additions & 25 deletions docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Set up everything you need to build and deploy canisters on the Internet Compute
> sudo dnf install -y dbus-libs openssl ca-certificates
> ```

## Quick Install (Recommended)
## Quick Install via npm (Recommended)

**Required:** [Node.js](https://nodejs.org/) (LTS) — needed for npm and for building frontend canisters.

Expand Down Expand Up @@ -60,33 +60,23 @@ If you prefer not to use npm, or need platform-specific options, see the section

### icp-cli

**Shell Script (macOS / Linux / WSL):**
**Homebrew (macOS/Linux):**

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh | sh
```

Restart your shell or follow the instructions shown by the installer.

**Shell Script (Windows, for Rust-only mainnet projects):**

```ps1
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.ps1 | iex"
brew install icp-cli
```

Restart your terminal after installation.

**Homebrew (macOS/Linux only):**
**Shell Script (macOS/Linux/WSL):**

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

To update later: `brew upgrade dfinity/tap/icp-cli`

> **Note:** Homebrew installs ic-wasm as a dependency, so you can skip the ic-wasm installation below.
**Shell Script (Windows):**

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

### ic-wasm

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

**Installation:**

> **Note:** If you installed icp-cli via Homebrew, ic-wasm is already included. Skip this section.

**npm (recommended):**
**Homebrew (macOS/Linux):**

```bash
npm install -g @icp-sdk/ic-wasm
brew install ic-wasm
```

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

```bash
npm install -g ic-mops
mops toolchain init
curl -fsSL cli.mops.one/install.sh | sh && mops toolchain init
```

> **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.

**Rust:**

Install from [rustup.rs](https://rustup.rs/):
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
npm install -g ic-mops && mops toolchain init
```

> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, or other options.
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for Homebrew, shell script, or other options.

## Steps

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This installs:
- **ic-wasm** — optimizes WebAssembly for the Internet Computer
- **mops** — Motoko package manager, which also installs the Motoko compiler

> **Alternative methods:** See the [Installation Guide](guides/installation.md) for shell script, Homebrew, Rust setup, or other options.
> **Alternative methods:** See the [Installation Guide](guides/installation.md) for Homebrew, shell script, Rust setup, or other options.

Verify the tools are installed:

Expand Down
Loading