You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses all items from #491, plus one additional gap
found during a full help audit:
- canister settings update: fill in empty descriptions for
--compute-allocation, --log-visibility, --add/remove/set-log-viewer,
--add/remove-environment-variable; clarify that --log-visibility only
accepts 'controllers'/'public', not 'allowed-viewers'
- canister settings show: fix description from "status" to "settings";
fix "enviroment" typo; note no default-to-all behaviour
- canister status: document that omitting [CANISTER] queries all
canisters in the environment; fix "enviroment" typo; add examples
- network start: document default port 8000, gateway.port config, and
--project-root-override tip for port conflicts
- new: replace misleading template_values_file reference in --silent
with accurate non-interactive/CI guidance; improve --define description
to mention template-specific variable names and relationship to --silent
- canister list: document plain-text and JSON output formats
- environment list: fix "enviroments" typo; add context about icp project show
- cycles transfer: fix //// comment to /// so --from-subaccount gets a description
- cycles mint: document that exactly one of --icp or --cycles is required
- docs/reference/cli.md: regenerated
Copy file name to clipboardExpand all lines: docs/reference/cli.md
+46-21Lines changed: 46 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -314,7 +314,9 @@ Install a built WASM to a canister on a network
314
314
315
315
## `icp canister list`
316
316
317
-
List the canisters in an environment
317
+
List the canisters in an environment.
318
+
319
+
Prints canister names, one per line. Use --json for machine-readable output (returns {"canisters": ["name1", "name2", ...]})
318
320
319
321
**Usage:**`icp canister list [OPTIONS]`
320
322
@@ -406,23 +408,23 @@ Commands to manage canister settings
406
408
407
409
###### **Subcommands:**
408
410
409
-
*`show` — Show the status of a canister
411
+
*`show` — Show the status of a canister, including its settings
410
412
*`update` — Change a canister's settings to specified values
411
413
*`sync` — Synchronize a canister's settings with those defined in the project
412
414
413
415
414
416
415
417
## `icp canister settings show`
416
418
417
-
Show the status of a canister.
419
+
Show the status of a canister, including its settings.
418
420
419
-
By default this queries the status endpoint of the management canister. If the caller is not a controller, falls back on fetching public information from the state tree.
421
+
A canister must always be specified (no default-to-all behaviour). By default this queries the status endpoint of the management canister. If the caller is not a controller, falls back on fetching public information from the state tree.
420
422
421
423
**Usage:**`icp canister settings show [OPTIONS] <CANISTER>`
422
424
423
425
###### **Arguments:**
424
426
425
-
*`<CANISTER>` — canister name or principal to target. When using a name, an enviroment must be specified
427
+
*`<CANISTER>` — Canister name or principal to target. When using a name, an environment must be specified
426
428
427
429
###### **Options:**
428
430
@@ -461,19 +463,19 @@ Change a canister's settings to specified values
461
463
*`--set-controller <SET_CONTROLLER>` — Replace the canister's controller list with the specified principals.
462
464
463
465
Warning: This removes all existing controllers not in the new list. If you don't include yourself, you will lose control of the canister.
464
-
*`--compute-allocation <COMPUTE_ALLOCATION>`
466
+
*`--compute-allocation <COMPUTE_ALLOCATION>` — Compute allocation percentage (0-100). Represents a guaranteed share of a subnet's compute capacity
465
467
*`--memory-allocation <MEMORY_ALLOCATION>` — Memory allocation in bytes. Supports suffixes: kb, kib, mb, mib, gb, gib (e.g. "4gib" or "2.5kb")
466
468
*`--freezing-threshold <FREEZING_THRESHOLD>` — Freezing threshold. Controls how long a canister can be inactive before being frozen. Supports duration suffixes: s (seconds), m (minutes), h (hours), d (days), w (weeks). A bare number is treated as seconds
467
469
*`--reserved-cycles-limit <RESERVED_CYCLES_LIMIT>` — Upper limit on cycles reserved for future resource payments. Memory allocations that would push the reserved balance above this limit will fail. Supports suffixes: k (thousand), m (million), b (billion), t (trillion)
468
470
*`--wasm-memory-limit <WASM_MEMORY_LIMIT>` — Wasm memory limit in bytes. Supports suffixes: kb, kib, mb, mib, gb, gib (e.g. "4gib" or "2.5kb")
469
471
*`--wasm-memory-threshold <WASM_MEMORY_THRESHOLD>` — Wasm memory threshold in bytes. Supports suffixes: kb, kib, mb, mib, gb, gib (e.g. "4gib" or "2.5kb")
470
472
*`--log-memory-limit <LOG_MEMORY_LIMIT>` — Log memory limit in bytes (max 2 MiB). Oldest logs are purged when usage exceeds this value. Supports suffixes: kb, kib, mb, mib (e.g. "2mib" or "256kib"). Canister default is 4096 bytes
*`--log-visibility <LOG_VISIBILITY>` — Set log visibility to a fixed policy [possible values: controllers, public]. Conflicts with --add-log-viewer, --remove-log-viewer, and --set-log-viewer. Use --add-log-viewer / --set-log-viewer to grant access to specific principals instead
474
+
*`--add-log-viewer <ADD_LOG_VIEWER>` — Add a principal to the allowed log viewers list
475
+
*`--remove-log-viewer <REMOVE_LOG_VIEWER>` — Remove a principal from the allowed log viewers list
476
+
*`--set-log-viewer <SET_LOG_VIEWER>` — Replace the allowed log viewers list with the specified principals
477
+
*`--add-environment-variable <ADD_ENVIRONMENT_VARIABLE>` — Add a canister environment variable in KEY=VALUE format
478
+
*`--remove-environment-variable <REMOVE_ENVIRONMENT_VARIABLE>` — Remove a canister environment variable by key name
477
479
*`--proxy <PROXY>` — Principal of a proxy canister to route the management canister calls through
478
480
479
481
@@ -678,9 +680,24 @@ By default this queries the status endpoint of the management canister. If the c
678
680
679
681
**Usage:**`icp canister status [OPTIONS] [CANISTER]`
680
682
683
+
Examples:
684
+
685
+
# Status of all canisters in the local environment
686
+
icp canister status
687
+
688
+
# Status of one canister by name
689
+
icp canister status backend -e local
690
+
691
+
# Print only canister IDs (useful for scripting)
692
+
icp canister status -i
693
+
694
+
# JSON output for all canisters
695
+
icp canister status --json
696
+
697
+
681
698
###### **Arguments:**
682
699
683
-
*`<CANISTER>` — An optional canister name or principal to target. When using a name, an enviroment must be specified
700
+
*`<CANISTER>` — An optional canister name or principal to target. When using a name, an environment must be specified. If omitted, shows status for all canisters in the environment
684
701
685
702
###### **Options:**
686
703
@@ -744,7 +761,7 @@ Mint and manage cycles
744
761
###### **Subcommands:**
745
762
746
763
*`balance` — Display the cycles balance
747
-
*`mint` — Convert icp to cycles
764
+
*`mint` — Convert ICP to cycles
748
765
*`transfer` — Transfer cycles to another principal
749
766
750
767
@@ -769,7 +786,9 @@ Display the cycles balance
769
786
770
787
## `icp cycles mint`
771
788
772
-
Convert icp to cycles
789
+
Convert ICP to cycles.
790
+
791
+
Exactly one of --icp or --cycles must be provided.
773
792
774
793
**Usage:**`icp cycles mint [OPTIONS]`
775
794
@@ -801,7 +820,7 @@ Transfer cycles to another principal
801
820
###### **Options:**
802
821
803
822
*`--to-subaccount <TO_SUBACCOUNT>` — The subaccount to transfer to (only if the receiver is a principal)
804
-
*`--from-subaccount <FROM_SUBACCOUNT>`
823
+
*`--from-subaccount <FROM_SUBACCOUNT>` — The subaccount to transfer cycles from
805
824
*`-n`, `--network <NETWORK>` — Name or URL of the network to target, conflicts with environment argument
806
825
*`-k`, `--root-key <ROOT_KEY>` — The root key to use if connecting to a network by URL. Required when using `--network <URL>`
807
826
*`-e`, `--environment <ENVIRONMENT>` — Override the environment to connect to. By default, the local environment is used
@@ -877,13 +896,15 @@ Show information about the current project environments
877
896
878
897
###### **Subcommands:**
879
898
880
-
*`list` — Display a list of enviroments
899
+
*`list` — List the environments defined in this project, one per line
881
900
882
901
883
902
884
903
## `icp environment list`
885
904
886
-
Display a list of enviroments
905
+
List the environments defined in this project, one per line.
906
+
907
+
Use `icp project show` to see the fully expanded configuration including implicit environments (local, ic) and their network and canister assignments.
887
908
888
909
**Usage:**`icp environment list`
889
910
@@ -1172,7 +1193,11 @@ Examples:
1172
1193
1173
1194
## `icp network start`
1174
1195
1175
-
Run a given network
1196
+
Run a given network.
1197
+
1198
+
The gateway binds to port 8000 by default. To use a different port, set `gateway.port` in `icp.yaml`. If port 8000 is already in use by another icp-cli project, stop that network first:
1199
+
1200
+
icp network stop --project-root-override <path>
1176
1201
1177
1202
**Usage:**`icp network start [OPTIONS] [NAME]`
1178
1203
@@ -1328,11 +1353,11 @@ Under the hood templates are generated with `cargo-generate`. See the cargo-gene
1328
1353
*`-f`, `--force` — Don't convert the project name to kebab-case before creating the directory. Note that `icp-cli` won't overwrite an existing directory, even if `--force` is given
1329
1354
*`-q`, `--quiet` — Opposite of verbose, suppresses errors & warning in output Conflicts with --debug, and requires the use of --continue-on-error
1330
1355
*`--continue-on-error` — Continue if errors in templates are encountered
1331
-
*`-s`, `--silent` — If silent mode is set all variables will be extracted from the template_values_file. If a value is missing the project generation will fail
1356
+
*`-s`, `--silent` — Non-interactive mode: suppresses all prompts. Unset variables fall back to their template-defined defaults; generation fails if a required variable has no default. Combine with --define to supply values for variables that have no default in the template. Use for CI or automated/agent contexts
1332
1357
*`--vcs <VCS>` — Specify the VCS used to initialize the generated template
1333
1358
*`-i`, `--identity <IDENTITY>` — Use a different ssh identity
1334
1359
*`--gitconfig <GITCONFIG_FILE>` — Use a different gitconfig file, if omitted the usual $HOME/.gitconfig will be used
1335
-
*`-d`, `--define <DEFINE>` — Define a value for use during template expansion. E.g `--define foo=bar`
1360
+
*`-d`, `--define <DEFINE>` — Set a template variable in KEY=VALUE format (e.g. --define project_name=my-app). Variable names are template-specific. Suppresses the interactive prompt for that variable. Required in --silent mode for any template variable that has no default value
1336
1361
*`--init` — Generate the template directly into the current dir. No subfolder will be created and no vcs is initialized
1337
1362
*`--destination <PATH>` — Generate the template directly at the given path
1338
1363
*`--force-git-init` — Will enforce a fresh git init on the generated project
0 commit comments