From ce500df54523a85633b181d3a269911c9e394a99 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 16 Jul 2026 12:40:59 +0200 Subject: [PATCH] chore: bump icp-cli to v1.1.0 and update CLI docs - Pin icp-cli submodule to v1.1.0 (fe4af7c) and update .sources/VERSIONS - Correct canister delete note: cycles are now returned to the caller via the cycles ledger as of v1.1.0 (--no-recover-cycles to opt out) - Bump all cli.internetcomputer.org doc-link slugs 0.3 -> 1.1 - Add CLI cross-reference (icp token approve/allowance) to the ICRC-2 section - Fix slug-verification guidance: versions.json at a release tag lags the advertised slug; derive slug from the release major.minor instead - Make the slug-replacement snippet portable across GNU/BSD sed --- .agents/submodule-bumping.md | 10 ++++++---- .sources/VERSIONS | 2 +- .sources/icp-cli | 2 +- AGENTS.md | 2 +- docs/developer-tools/index.md | 6 +++--- docs/getting-started/project-structure.mdx | 6 +++--- docs/getting-started/quickstart.md | 4 ++-- .../canister-calls/parallel-inter-canister-calls.mdx | 4 ++-- docs/guides/canister-management/cycles-management.mdx | 4 ++-- docs/guides/canister-management/lifecycle.mdx | 4 ++-- docs/guides/canister-management/logs.md | 4 ++-- docs/guides/canister-management/settings.mdx | 2 +- docs/guides/canister-management/snapshots.md | 2 +- docs/guides/digital-assets/ledgers.mdx | 2 ++ docs/guides/frontends/frameworks.md | 2 +- docs/guides/testing/pocket-ic.md | 2 +- docs/guides/testing/strategies.md | 2 +- docs/index.mdx | 2 +- 18 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.agents/submodule-bumping.md b/.agents/submodule-bumping.md index ccf8b254..5847a7cf 100644 --- a/.agents/submodule-bumping.md +++ b/.agents/submodule-bumping.md @@ -52,7 +52,7 @@ EOF All CLI docs links use a versioned slug (e.g. `https://cli.internetcomputer.org/0.2/...`). When bumped to a new minor version: -1. Read the new slug: `cat .sources/icp-cli/docs-site/versions.json` — use the `"version"` marked `"latest": true`. +1. Determine the new slug: it is the `major.minor` of the release tag you pinned (e.g. `v1.1.0` → `1.1`). Do **not** read it from `.sources/icp-cli/docs-site/versions.json` — at a release tag that file still lists the *previous* slug, since the docs-site version bump lands as a follow-up commit after the tag. Confirm the new slug is live by opening the docs-site root (`https://cli.internetcomputer.org/`), which redirects to the latest version. 2. Verify all linked paths still exist in the new submodule before replacing: ```bash grep -roh "cli\.internetcomputer\.org/[0-9][.0-9]*/[^\"' )#]*" docs/ --include="*.md" --include="*.mdx" \ @@ -62,10 +62,12 @@ All CLI docs links use a versioned slug (e.g. `https://cli.internetcomputer.org/ done ``` Resolve any MISSING paths manually before proceeding. -3. Replace the slug across all files: +3. Replace the slug across all files (per-file loop — portable across GNU and BSD/macOS `sed`, whose `-i` syntax differs): ```bash - old=0.2; new=0.3 - find docs/ \( -name "*.md" -o -name "*.mdx" \) | xargs sed -i "s|cli.internetcomputer.org/${old}/|cli.internetcomputer.org/${new}/|g" + old=1.0; new=1.1 + grep -rl "cli.internetcomputer.org/${old}/" docs/ --include="*.md" --include="*.mdx" | while IFS= read -r f; do + sed -i.bak "s|cli.internetcomputer.org/${old}/|cli.internetcomputer.org/${new}/|g" "$f" && rm -f "$f.bak" + done ``` 4. Run `npm run build` to confirm no broken links. diff --git a/.sources/VERSIONS b/.sources/VERSIONS index 4fb07177..58dcd2f6 100644 --- a/.sources/VERSIONS +++ b/.sources/VERSIONS @@ -56,7 +56,7 @@ chain-fusion-signer v0.4.0 a18c52a papi v0.1.1 168bc9d ic-pub-key v1.0.1 f89fa55 -icp-cli v1.0.0 9eed60c +icp-cli v1.1.0 fe4af7c motoko v1.11.0 c3a6eb3 motoko-core v2.4.0 cd37dbf cdk-rs ic-cdk v0.20.1 / ic-cdk-timers v1.0.0 / ic-cdk-executor v2.0.0 317f55c diff --git a/.sources/icp-cli b/.sources/icp-cli index 9eed60c8..fe4af7c5 160000 --- a/.sources/icp-cli +++ b/.sources/icp-cli @@ -1 +1 @@ -Subproject commit 9eed60c87336d9ac665e7fc72bab5bfd529cdc18 +Subproject commit fe4af7c5600f14aab3c3f0ded7cf9da4f288571f diff --git a/AGENTS.md b/AGENTS.md index ed318daa..ee60073e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -171,7 +171,7 @@ EOF - Link to `internetcomputer.org/docs/` (retired) or `learn.internetcomputer.org` (content is now in this repo under `docs/concepts/`) - Link to internal pages that don't exist — run `ls ` before linking. Links to `.mdx` files use `.md` extension. - Link to an internal page without checking for a relevant section anchor — read the target page to find the most specific section that fits, then derive the anchor slug from its heading (lowercase, spaces → `-`, special chars stripped). -- Link to `https://cli.internetcomputer.org/` bare root — use the versioned path. Current slug: `0.2`; verify with `cat .sources/icp-cli/docs-site/versions.json`. +- Link to `https://cli.internetcomputer.org/` bare root — use the versioned path. Current slug: `1.1` (the `major.minor` of the pinned icp-cli release). Do not trust `.sources/icp-cli/docs-site/versions.json` here: at a release tag it still lists the *previous* slug, because the docs-site version bump lands as a follow-up commit after the tag. Confirm the live slug at the docs-site root (it redirects to the latest version). - Link externally when an internal page exists — check `docs/` first - Write em-dashes (`—`) or use `--` as prose punctuation — use colon, semicolon, or parentheses instead. (`--` is fine inside code blocks as a CLI flag or comment.) - Rename Candid field names, management canister API identifiers, or example repo names — these are protocol-level identifiers diff --git a/docs/developer-tools/index.md b/docs/developer-tools/index.md index 598e4b6c..cb4cc5c7 100644 --- a/docs/developer-tools/index.md +++ b/docs/developer-tools/index.md @@ -18,13 +18,13 @@ Key features: - **Environments**: named deployment targets that combine a network, canister set, and settings (e.g., local, staging, production) - **Project scaffolding**: `icp new` bootstraps new projects from official templates -For installation, see the [Quickstart](../getting-started/quickstart.md) or the [full CLI documentation](https://cli.internetcomputer.org/0.3/). +For installation, see the [Quickstart](../getting-started/quickstart.md) or the [full CLI documentation](https://cli.internetcomputer.org/1.1/). -Advanced: [creating recipes](https://cli.internetcomputer.org/0.3/guides/creating-recipes) and [creating templates](https://cli.internetcomputer.org/0.3/guides/creating-templates) are documented on the CLI docs site. +Advanced: [creating recipes](https://cli.internetcomputer.org/1.1/guides/creating-recipes) and [creating templates](https://cli.internetcomputer.org/1.1/guides/creating-templates) are documented on the CLI docs site. icp-cli collects anonymous usage telemetry. Opt out with `icp settings telemetry false` or `DO_NOT_TRACK=1`. -Coming from dfx? See the [migration guide](https://cli.internetcomputer.org/0.3/migration/from-dfx). +Coming from dfx? See the [migration guide](https://cli.internetcomputer.org/1.1/migration/from-dfx). ### ic-wasm diff --git a/docs/getting-started/project-structure.mdx b/docs/getting-started/project-structure.mdx index cc3b6611..819bbe25 100644 --- a/docs/getting-started/project-structure.mdx +++ b/docs/getting-started/project-structure.mdx @@ -72,7 +72,7 @@ Beyond canisters, `icp.yaml` can also define **networks** (where to deploy) and | `local` | `local` (managed, localhost:8000) | Local development | | `ic` | `ic` (connected, https://icp-api.io) | Mainnet production | -You only need to add custom networks or environments when you have staging environments, testnets, or other deployment targets. See the [icp-cli configuration reference](https://cli.internetcomputer.org/0.3/reference/configuration#networks) for the full schema. +You only need to add custom networks or environments when you have staging environments, testnets, or other deployment targets. See the [icp-cli configuration reference](https://cli.internetcomputer.org/1.1/reference/configuration#networks) for the full schema. ## Canister configuration (canister.yaml) @@ -155,7 +155,7 @@ icp project show This outputs the effective configuration, including all expanded recipe steps and implicit defaults. -Recipes are Handlebars templates hosted at [dfinity/icp-cli-recipes](https://github.com/dfinity/icp-cli-recipes). You can also create local or remote recipes for custom build patterns. See the [icp-cli recipes documentation](https://cli.internetcomputer.org/0.3/guides/creating-recipes) for details. +Recipes are Handlebars templates hosted at [dfinity/icp-cli-recipes](https://github.com/dfinity/icp-cli-recipes). You can also create local or remote recipes for custom build patterns. See the [icp-cli recipes documentation](https://cli.internetcomputer.org/1.1/guides/creating-recipes) for details. ## The .icp/ directory @@ -254,6 +254,6 @@ For a deep dive on binding generation, see [Binding generation](../guides/canist - [Binding generation](../guides/canister-calls/candid.md#binding-generation): deep dive on generating type-safe client code - [Asset canister](../guides/frontends/asset-canister.md): how the frontend recipe and asset upload work - [Canister lifecycle](../guides/canister-management/lifecycle.md): build, deploy, upgrade, and manage canisters -- [icp-cli reference](https://cli.internetcomputer.org/0.3/reference/cli): full CLI and configuration documentation +- [icp-cli reference](https://cli.internetcomputer.org/1.1/reference/cli): full CLI and configuration documentation {/* Upstream: informed by dfinity/icp-cli docs/concepts/project-model.md, docs/concepts/recipes.md, docs/concepts/binding-generation.md, docs/concepts/canister-discovery.md */} diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index ab753ae8..a8c476e6 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -37,7 +37,7 @@ icp --version ic-wasm --version ``` -> **Alternative methods:** [Homebrew, shell scripts, and other options](https://cli.internetcomputer.org/0.3/guides/installation) are also available. +> **Alternative methods:** [Homebrew, shell scripts, and other options](https://cli.internetcomputer.org/1.1/guides/installation) are also available. ## Create a project @@ -127,6 +127,6 @@ Each canister name maps to a directory containing its own `canister.yaml` with b - [Choose your path](choose-your-path.md): pick a development path based on what you want to build - [Concepts: Canisters](../concepts/canisters.md): learn what canisters are and how they work - [AI coding agents](../guides/ai-coding-agents.md): use ICP skills to build on the Internet Computer with AI -- [icp-cli documentation](https://cli.internetcomputer.org/0.3/): full CLI reference and guides +- [icp-cli documentation](https://cli.internetcomputer.org/1.1/): full CLI reference and guides diff --git a/docs/guides/canister-calls/parallel-inter-canister-calls.mdx b/docs/guides/canister-calls/parallel-inter-canister-calls.mdx index c93a9ffa..ad89e9ef 100644 --- a/docs/guides/canister-calls/parallel-inter-canister-calls.mdx +++ b/docs/guides/canister-calls/parallel-inter-canister-calls.mdx @@ -16,13 +16,13 @@ Parallel calls are most beneficial when the caller and callee are on **different -- [icp-cli](https://cli.internetcomputer.org/0.3/guides/installation) installed +- [icp-cli](https://cli.internetcomputer.org/1.1/guides/installation) installed - `mops` package manager with `core = "2.0.0"` in `mops.toml` -- [icp-cli](https://cli.internetcomputer.org/0.3/guides/installation) installed +- [icp-cli](https://cli.internetcomputer.org/1.1/guides/installation) installed - `ic-cdk = "0.19"` and `futures = "0.3"` in `Cargo.toml` diff --git a/docs/guides/canister-management/cycles-management.mdx b/docs/guides/canister-management/cycles-management.mdx index 02f62471..76a8a39a 100644 --- a/docs/guides/canister-management/cycles-management.mdx +++ b/docs/guides/canister-management/cycles-management.mdx @@ -307,7 +307,7 @@ icp deploy -e staging icp deploy -e production ``` -Each environment maintains separate canister IDs. Mainnet IDs are stored in `.icp/data/mappings/.ids.json` and should be committed to version control. See [Managing environments](https://cli.internetcomputer.org/0.3/guides/managing-environments) for full configuration options. +Each environment maintains separate canister IDs. Mainnet IDs are stored in `.icp/data/mappings/.ids.json` and should be committed to version control. See [Managing environments](https://cli.internetcomputer.org/1.1/guides/managing-environments) for full configuration options. ## Production deployment checklist @@ -375,6 +375,6 @@ icp canister top-up backend --amount 1T -n ic - [Cycles ledger reference](../../references/system-canisters.md#cycles-ledger): Canister IDs and interface specification - [Calls with attached cycles](../canister-calls/inter-canister-calls.md#calls-with-attached-cycles): attach cycles to an inter-canister call and accept them in the callee - [Reproducible builds](reproducible-builds.md): Verify your WASM is trustworthy before deploying -- [icp-cli docs](https://cli.internetcomputer.org/0.3/reference/cli#icp-cycles): Full command reference for `icp cycles` and `icp canister top-up` +- [icp-cli docs](https://cli.internetcomputer.org/1.1/reference/cli#icp-cycles): Full command reference for `icp cycles` and `icp canister top-up` {/* Upstream: informed by dfinity/portal (docs/building-apps/canister-management/topping-up.mdx, docs/building-apps/getting-started/tokens-and-cycles.mdx; dfinity/icp-cli) docs/guides/deploying-to-mainnet.md, docs/guides/tokens-and-cycles.md, docs/guides/managing-environments.md; dfinity/icskills: skills/cycles-management/SKILL.md */} diff --git a/docs/guides/canister-management/lifecycle.mdx b/docs/guides/canister-management/lifecycle.mdx index 885ba169..06cb3636 100644 --- a/docs/guides/canister-management/lifecycle.mdx +++ b/docs/guides/canister-management/lifecycle.mdx @@ -264,7 +264,7 @@ This is useful during development when you want a clean slate. The canister ID i Deleting permanently removes a canister from the network. The canister ID cannot be reused. -> Note: Canisters are like real estate on the IC. Creating them costs cycles. Instead of deleting a canister, consider reusing it in a different project. Check the [cli reference](https://cli.internetcomputer.org/1.0/concepts/project-model/#canister-ids) for more information. +> **Note:** Canisters are like real estate on the IC. Creating them costs cycles. Instead of deleting a canister, consider reusing it in a different project. Check the [cli reference](https://cli.internetcomputer.org/1.1/concepts/project-model/#canister-ids) for more information. 1. Stop the canister first: @@ -278,7 +278,7 @@ icp canister stop my-canister -e ic icp canister delete my-canister -e ic ``` -> **Warning** The remaining cycles in the canister are lost, see [github issue](https://github.com/dfinity/icp-cli/issues/431). +> **Note:** As of icp-cli v1.1.0, the canister's remaining cycles are returned to the caller (the identity that made the delete request) via the cycles ledger. Pass `--no-recover-cycles` to skip recovery and burn the cycles instead. On earlier versions, the remaining cycles are lost. ## Migrate a canister between subnets diff --git a/docs/guides/canister-management/logs.md b/docs/guides/canister-management/logs.md index 724eb3d4..547f819a 100644 --- a/docs/guides/canister-management/logs.md +++ b/docs/guides/canister-management/logs.md @@ -403,7 +403,7 @@ async fn main() -> Result<()> { - [Canister lifecycle](lifecycle.md): configure log visibility and memory limits when creating or deploying a canister - [Testing strategies](../testing/strategies.md): use canister logs as part of your debugging workflow -- [CLI reference: `icp canister logs`](https://cli.internetcomputer.org/0.3/reference/cli#icp-canister-logs): full command flags and options -- [CLI reference: `icp canister settings update`](https://cli.internetcomputer.org/0.3/reference/cli#icp-canister-settings-update): full command flags and options +- [CLI reference: `icp canister logs`](https://cli.internetcomputer.org/1.1/reference/cli#icp-canister-logs): full command flags and options +- [CLI reference: `icp canister settings update`](https://cli.internetcomputer.org/1.1/reference/cli#icp-canister-settings-update): full command flags and options diff --git a/docs/guides/canister-management/settings.mdx b/docs/guides/canister-management/settings.mdx index d0424a0b..c6f49179 100644 --- a/docs/guides/canister-management/settings.mdx +++ b/docs/guides/canister-management/settings.mdx @@ -332,7 +332,7 @@ icp canister settings update backend -e ic --freezing-threshold 90d Additional flags: `--reserved-cycles-limit`, `--wasm-memory-threshold`, `--log-memory-limit`, `--add-environment-variable`. Run `icp canister settings update --help` for the full list. -For the full list of CLI flags, see the [icp-cli reference](https://cli.internetcomputer.org/0.3/reference/cli#icp-canister-settings-update). +For the full list of CLI flags, see the [icp-cli reference](https://cli.internetcomputer.org/1.1/reference/cli#icp-canister-settings-update). ## Updating settings programmatically diff --git a/docs/guides/canister-management/snapshots.md b/docs/guides/canister-management/snapshots.md index f0018831..bb1a935d 100644 --- a/docs/guides/canister-management/snapshots.md +++ b/docs/guides/canister-management/snapshots.md @@ -181,6 +181,6 @@ icp canister status my-canister -e ic - [Canister lifecycle](lifecycle.md): Understand how snapshots fit into the upgrade workflow - [Canister migration](canister-migration.md): Complete guide for moving a canister to a different subnet using the snapshot transfer workflow - [Canister upgrades security](../security/canister-upgrades.md): Security considerations when using snapshot-based rollbacks -- [icp-cli canister snapshot reference](https://cli.internetcomputer.org/0.3/guides/canister-snapshots): Full command reference for all snapshot subcommands +- [icp-cli canister snapshot reference](https://cli.internetcomputer.org/1.1/guides/canister-snapshots): Full command reference for all snapshot subcommands diff --git a/docs/guides/digital-assets/ledgers.mdx b/docs/guides/digital-assets/ledgers.mdx index 18e26ab4..b1ef831e 100644 --- a/docs/guides/digital-assets/ledgers.mdx +++ b/docs/guides/digital-assets/ledgers.mdx @@ -252,6 +252,8 @@ ICRC-2 adds an approve/transferFrom pattern. The asset owner first approves a sp **When to use:** Exchange logic, payment processing, subscription services, or any case where a canister needs to pull assets from a user's account. +> To grant or inspect an allowance manually without writing code, use the [`icp token approve`](https://cli.internetcomputer.org/1.1/reference/cli#icp-token-approve) and [`icp token allowance`](https://cli.internetcomputer.org/1.1/reference/cli#icp-token-allowance) CLI commands. + diff --git a/docs/guides/frontends/frameworks.md b/docs/guides/frontends/frameworks.md index 113d5980..d8e537d8 100644 --- a/docs/guides/frontends/frameworks.md +++ b/docs/guides/frontends/frameworks.md @@ -11,7 +11,7 @@ This guide shows you how to configure your framework's build pipeline, wire up t ## Prerequisites -- [icp-cli](https://cli.internetcomputer.org/0.3/guides/installation) installed: `npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm` +- [icp-cli](https://cli.internetcomputer.org/1.1/guides/installation) installed: `npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm` - A backend canister deployed (or a static-only site with no backend) - Familiarity with [asset canisters](asset-canister.md) diff --git a/docs/guides/testing/pocket-ic.md b/docs/guides/testing/pocket-ic.md index 9d583a72..da8867be 100644 --- a/docs/guides/testing/pocket-ic.md +++ b/docs/guides/testing/pocket-ic.md @@ -377,7 +377,7 @@ PocketIC runs on macOS and Linux. Windows is not currently supported for standal ## Connecting to a running network for testing -For end-to-end tests that need a full network with all system canisters, use a containerized network instead of PocketIC. See the [icp-cli containerized networks documentation](https://cli.internetcomputer.org/0.3/guides/containerized-networks) for how to configure Docker-based test networks in `icp.yaml`. +For end-to-end tests that need a full network with all system canisters, use a containerized network instead of PocketIC. See the [icp-cli containerized networks documentation](https://cli.internetcomputer.org/1.1/guides/containerized-networks) for how to configure Docker-based test networks in `icp.yaml`. The containerized network is appropriate when: diff --git a/docs/guides/testing/strategies.md b/docs/guides/testing/strategies.md index 9bcfb28b..202ca6fe 100644 --- a/docs/guides/testing/strategies.md +++ b/docs/guides/testing/strategies.md @@ -330,7 +330,7 @@ icp network status docker-test --json For the full containerized network configuration reference: including environment variables, volume mounts, and custom images: see the -[icp-cli containerized networks guide](https://cli.internetcomputer.org/0.3/guides/containerized-networks). +[icp-cli containerized networks guide](https://cli.internetcomputer.org/1.1/guides/containerized-networks). ## Choosing the right approach diff --git a/docs/index.mdx b/docs/index.mdx index 1c36749f..2e7e55ab 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -39,7 +39,7 @@ Teach your AI coding agent the patterns, APIs, and deployment workflows it needs ## External resources - +