From 6628cbb39de7b00e976d80662da68df3cea3c9fe Mon Sep 17 00:00:00 2001 From: Sam Roberts <158088236+g-samroberts@users.noreply.github.com> Date: Mon, 23 Feb 2026 09:13:24 -0800 Subject: [PATCH] Updates command reference and /stats command. (#19794) --- docs/get-started/index.md | 10 +++++ docs/reference/commands.md | 61 +++++++++++++++++++++++++---- docs/resources/quota-and-pricing.md | 17 +++++--- docs/sidebar.json | 16 +------- 4 files changed, 77 insertions(+), 27 deletions(-) diff --git a/docs/get-started/index.md b/docs/get-started/index.md index 4d0158b71f..bc29581d2f 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -64,6 +64,16 @@ and more. To explore the power of Gemini CLI, see [Gemini CLI examples](./examples.md). +## Check usage and quota + +You can check your current token usage and quota information using the +`/stats model` command. This command provides a snapshot of your current +session's token usage, as well as your overall quota and usage for the supported +models. + +For more information on the `/stats` command and its subcommands, see the +[Command Reference](../../reference/commands.md#stats). + ## Next steps - Follow the [File management](../cli/tutorials/file-management.md) guide to diff --git a/docs/reference/commands.md b/docs/reference/commands.md index ee7ac6d581..ceb064a9bf 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -32,6 +32,8 @@ Slash commands provide meta-level control over the CLI itself. conversation state interactively, or resuming a previous state from a later session. - **Sub-commands:** + - **`debug`** + - **Description:** Export the most recent API request as a JSON payload. - **`delete `** - **Description:** Deletes a saved conversation checkpoint. - **`list`** @@ -128,8 +130,29 @@ Slash commands provide meta-level control over the CLI itself. ### `/extensions` -- **Description:** Lists all active extensions in the current Gemini CLI - session. See [Gemini CLI Extensions](../extensions/index.md). +- **Description:** Manage extensions. See + [Gemini CLI Extensions](../extensions/index.md). +- **Sub-commands:** + - **`config`**: + - **Description:** Configure extension settings. + - **`disable`**: + - **Description:** Disable an extension. + - **`enable`**: + - **Description:** Enable an extension. + - **`explore`**: + - **Description:** Open extensions page in your browser. + - **`install`**: + - **Description:** Install an extension from a git repo or local path. + - **`link`**: + - **Description:** Link an extension from a local path. + - **`list`**: + - **Description:** List active extensions. + - **`restart`**: + - **Description:** Restart all extensions. + - **`uninstall`**: + - **Description:** Uninstall an extension. + - **`update`**: + - **Description:** Update extensions. Usage: update |--all ### `/help` (or `/?`) @@ -184,6 +207,10 @@ Slash commands provide meta-level control over the CLI itself. servers that support OAuth authentication. - **`desc`** - **Description:** List configured MCP servers and tools with descriptions. + - **`disable`** + - **Description:** Disable an MCP server. + - **`enable`** + - **Description:** Enable a disabled MCP server. - **`list`** or **`ls`**: - **Description:** List configured MCP servers and tools. This is the default action if no subcommand is specified. @@ -221,7 +248,21 @@ Slash commands provide meta-level control over the CLI itself. ### `/model` -- **Description:** Opens a dialog to choose your Gemini model. +- **Description:** Manage model configuration. +- **Sub-commands:** + - **`manage`**: + - **Description:** Opens a dialog to configure the model. + - **`set`**: + - **Description:** Set the model to use. + - **Usage:** `/model set [--persist]` + +### `/permissions` + +- **Description:** Manage folder trust settings and other permissions. +- **Sub-commands:** + - **`trust`**: + - **Description:** Manage folder trust settings. + - **Usage:** `/permissions trust []` ### `/plan` @@ -331,10 +372,16 @@ Slash commands provide meta-level control over the CLI itself. ### `/stats` - **Description:** Display detailed statistics for the current Gemini CLI - session, including token usage, cached token savings (when available), and - session duration. Note: Cached token information is only displayed when cached - tokens are being used, which occurs with API key authentication but not with - OAuth authentication at this time. + session. +- **Sub-commands:** + - **`session`**: + - **Description:** Show session-specific usage statistics, including + duration, tool calls, and performance metrics. This is the default view. + - **`model`**: + - **Description:** Show model-specific usage statistics, including token + counts and quota information. + - **`tools`**: + - **Description:** Show tool-specific usage statistics. ### `/terminal-setup` diff --git a/docs/resources/quota-and-pricing.md b/docs/resources/quota-and-pricing.md index 7b1b37a32c..d4ed22a1cb 100644 --- a/docs/resources/quota-and-pricing.md +++ b/docs/resources/quota-and-pricing.md @@ -135,6 +135,18 @@ Flow video editor). These plans do not apply to the API usage which powers the Gemini CLI. Supporting these plans is under active consideration for future support. +## Check usage and quota + +You can check your current token usage and quota information using the +`/stats model` command. This command provides a snapshot of your current +session's token usage, as well as your overall quota and usage for the supported +models. + +For more information on the `/stats` command and its subcommands, see the +[Command Reference](../../reference/commands.md#stats). + +A summary of model usage is also presented on exit at the end of a session. + ## Tips to avoid high costs When using a Pay as you Go API key, be mindful of your usage to avoid unexpected @@ -151,8 +163,3 @@ costs. models directly. - Vertex AI: This is the enterprise-grade platform for building, deploying, and managing Gemini models with specific security and control requirements. - -## Understanding your usage - -A summary of model usage is available through the `/stats` command and presented -on exit at the end of a session. diff --git a/docs/sidebar.json b/docs/sidebar.json index 1a47f8adc9..8a4bd7391c 100644 --- a/docs/sidebar.json +++ b/docs/sidebar.json @@ -72,14 +72,9 @@ "slug": "docs/extensions/index" }, { "label": "Headless mode", "slug": "docs/cli/headless" }, - { "label": "Help", "link": "/docs/reference/commands/#help-or" }, { "label": "Hooks", "slug": "docs/hooks" }, { "label": "IDE integration", "slug": "docs/ide-integration" }, { "label": "MCP servers", "slug": "docs/tools/mcp-server" }, - { - "label": "Memory management", - "link": "/docs/reference/commands/#memory" - }, { "label": "Model routing", "slug": "docs/cli/model-routing" }, { "label": "Model selection", "slug": "docs/cli/model" }, { "label": "Plan mode", "badge": "🧪", "slug": "docs/cli/plan-mode" }, @@ -96,17 +91,8 @@ { "label": "Rewind", "slug": "docs/cli/rewind" }, { "label": "Sandboxing", "slug": "docs/cli/sandbox" }, { "label": "Settings", "slug": "docs/cli/settings" }, - { - "label": "Shell", - "link": "/docs/reference/commands/#shells-or-bashes" - }, - { - "label": "Stats", - "link": "/docs/reference/commands/#stats" - }, { "label": "Telemetry", "slug": "docs/cli/telemetry" }, - { "label": "Token caching", "slug": "docs/cli/token-caching" }, - { "label": "Tools", "link": "/docs/reference/commands/#tools" } + { "label": "Token caching", "slug": "docs/cli/token-caching" } ] }, {