From 93619ee3d490a277648cb4e7788ced6f0eafeff0 Mon Sep 17 00:00:00 2001 From: Raymond Khalife Date: Wed, 19 Nov 2025 14:43:54 -0500 Subject: [PATCH] docs: Add missing docs to cli commands --- crates/icp-cli/src/commands/cycles/mod.rs | 3 ++ .../icp-cli/src/commands/environment/mod.rs | 1 + crates/icp-cli/src/commands/identity/mod.rs | 9 ++++++ docs/cli-reference.md | 32 ++++++++++++++----- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/crates/icp-cli/src/commands/cycles/mod.rs b/crates/icp-cli/src/commands/cycles/mod.rs index 7102cc4d5..5004aa926 100644 --- a/crates/icp-cli/src/commands/cycles/mod.rs +++ b/crates/icp-cli/src/commands/cycles/mod.rs @@ -7,6 +7,9 @@ pub(crate) mod mint; #[derive(Subcommand, Debug)] pub(crate) enum Command { + /// Display the cycles balance Balance(token::balance::BalanceArgs), + + /// Convert icp to cycles Mint(mint::MintArgs), } diff --git a/crates/icp-cli/src/commands/environment/mod.rs b/crates/icp-cli/src/commands/environment/mod.rs index 52f7579c3..b6ff246f9 100644 --- a/crates/icp-cli/src/commands/environment/mod.rs +++ b/crates/icp-cli/src/commands/environment/mod.rs @@ -4,5 +4,6 @@ pub(crate) mod list; #[derive(Subcommand, Debug)] pub(crate) enum Command { + /// Display a list of enviroments List(list::ListArgs), } diff --git a/crates/icp-cli/src/commands/identity/mod.rs b/crates/icp-cli/src/commands/identity/mod.rs index a337b2924..7af89e463 100644 --- a/crates/icp-cli/src/commands/identity/mod.rs +++ b/crates/icp-cli/src/commands/identity/mod.rs @@ -8,9 +8,18 @@ pub(crate) mod principal; #[derive(Debug, Subcommand)] pub(crate) enum Command { + /// Display the currently selected identity Default(default::DefaultArgs), + + /// Import a new identity Import(import::ImportArgs), + + /// List the identities List(list::ListArgs), + + /// Create a new identity New(new::NewArgs), + + /// Display the principal for the current identity Principal(principal::PrincipalArgs), } diff --git a/docs/cli-reference.md b/docs/cli-reference.md index a0568dbea..cddd77de2 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -424,13 +424,15 @@ Mint and manage cycles ###### **Subcommands:** -* `balance` — -* `mint` — +* `balance` — Display the cycles balance +* `mint` — Convert icp to cycles ## `icp-cli cycles balance` +Display the cycles balance + **Usage:** `icp-cli cycles balance [OPTIONS]` ###### **Options:** @@ -443,6 +445,8 @@ Mint and manage cycles ## `icp-cli cycles mint` +Convert icp to cycles + **Usage:** `icp-cli cycles mint [OPTIONS]` ###### **Options:** @@ -492,12 +496,14 @@ Show information about the current project environments ###### **Subcommands:** -* `list` — +* `list` — Display a list of enviroments ## `icp-cli environment list` +Display a list of enviroments + **Usage:** `icp-cli environment list` @@ -510,16 +516,18 @@ Manage your identities ###### **Subcommands:** -* `default` — -* `import` — -* `list` — -* `new` — -* `principal` — +* `default` — Display the currently selected identity +* `import` — Import a new identity +* `list` — List the identities +* `new` — Create a new identity +* `principal` — Display the principal for the current identity ## `icp-cli identity default` +Display the currently selected identity + **Usage:** `icp-cli identity default [NAME]` ###### **Arguments:** @@ -530,6 +538,8 @@ Manage your identities ## `icp-cli identity import` +Import a new identity + **Usage:** `icp-cli identity import [OPTIONS] <--from-pem |--read-seed-phrase|--from-seed-file > ` ###### **Arguments:** @@ -548,12 +558,16 @@ Manage your identities ## `icp-cli identity list` +List the identities + **Usage:** `icp-cli identity list` ## `icp-cli identity new` +Create a new identity + **Usage:** `icp-cli identity new [OPTIONS] ` ###### **Arguments:** @@ -568,6 +582,8 @@ Manage your identities ## `icp-cli identity principal` +Display the principal for the current identity + **Usage:** `icp-cli identity principal [OPTIONS]` ###### **Options:**