Updates command reference and /stats command. (#19794)

This commit is contained in:
Sam Roberts
2026-02-23 09:13:24 -08:00
committed by GitHub
parent a17d795e56
commit c4eac92cbe
4 changed files with 77 additions and 27 deletions
+10
View File
@@ -64,6 +64,16 @@ and more.
To explore the power of Gemini CLI, see [Gemini CLI examples](./examples.md). 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 ## Next steps
- Follow the [File management](../cli/tutorials/file-management.md) guide to - Follow the [File management](../cli/tutorials/file-management.md) guide to
+54 -7
View File
@@ -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 conversation state interactively, or resuming a previous state from a later
session. session.
- **Sub-commands:** - **Sub-commands:**
- **`debug`**
- **Description:** Export the most recent API request as a JSON payload.
- **`delete <tag>`** - **`delete <tag>`**
- **Description:** Deletes a saved conversation checkpoint. - **Description:** Deletes a saved conversation checkpoint.
- **`list`** - **`list`**
@@ -128,8 +130,29 @@ Slash commands provide meta-level control over the CLI itself.
### `/extensions` ### `/extensions`
- **Description:** Lists all active extensions in the current Gemini CLI - **Description:** Manage extensions. See
session. See [Gemini CLI Extensions](../extensions/index.md). [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 <extension-names>|--all
### `/help` (or `/?`) ### `/help` (or `/?`)
@@ -184,6 +207,10 @@ Slash commands provide meta-level control over the CLI itself.
servers that support OAuth authentication. servers that support OAuth authentication.
- **`desc`** - **`desc`**
- **Description:** List configured MCP servers and tools with descriptions. - **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`**: - **`list`** or **`ls`**:
- **Description:** List configured MCP servers and tools. This is the - **Description:** List configured MCP servers and tools. This is the
default action if no subcommand is specified. default action if no subcommand is specified.
@@ -221,7 +248,21 @@ Slash commands provide meta-level control over the CLI itself.
### `/model` ### `/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 <model-name> [--persist]`
### `/permissions`
- **Description:** Manage folder trust settings and other permissions.
- **Sub-commands:**
- **`trust`**:
- **Description:** Manage folder trust settings.
- **Usage:** `/permissions trust [<directory-path>]`
### `/plan` ### `/plan`
@@ -331,10 +372,16 @@ Slash commands provide meta-level control over the CLI itself.
### `/stats` ### `/stats`
- **Description:** Display detailed statistics for the current Gemini CLI - **Description:** Display detailed statistics for the current Gemini CLI
session, including token usage, cached token savings (when available), and session.
session duration. Note: Cached token information is only displayed when cached - **Sub-commands:**
tokens are being used, which occurs with API key authentication but not with - **`session`**:
OAuth authentication at this time. - **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` ### `/terminal-setup`
+12 -5
View File
@@ -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 Gemini CLI. Supporting these plans is under active consideration for future
support. 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 ## Tips to avoid high costs
When using a Pay as you Go API key, be mindful of your usage to avoid unexpected When using a Pay as you Go API key, be mindful of your usage to avoid unexpected
@@ -151,8 +163,3 @@ costs.
models directly. models directly.
- Vertex AI: This is the enterprise-grade platform for building, deploying, and - Vertex AI: This is the enterprise-grade platform for building, deploying, and
managing Gemini models with specific security and control requirements. 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.
+1 -15
View File
@@ -72,14 +72,9 @@
"slug": "docs/extensions/index" "slug": "docs/extensions/index"
}, },
{ "label": "Headless mode", "slug": "docs/cli/headless" }, { "label": "Headless mode", "slug": "docs/cli/headless" },
{ "label": "Help", "link": "/docs/reference/commands/#help-or" },
{ "label": "Hooks", "slug": "docs/hooks" }, { "label": "Hooks", "slug": "docs/hooks" },
{ "label": "IDE integration", "slug": "docs/ide-integration" }, { "label": "IDE integration", "slug": "docs/ide-integration" },
{ "label": "MCP servers", "slug": "docs/tools/mcp-server" }, { "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 routing", "slug": "docs/cli/model-routing" },
{ "label": "Model selection", "slug": "docs/cli/model" }, { "label": "Model selection", "slug": "docs/cli/model" },
{ "label": "Plan mode", "badge": "🧪", "slug": "docs/cli/plan-mode" }, { "label": "Plan mode", "badge": "🧪", "slug": "docs/cli/plan-mode" },
@@ -96,17 +91,8 @@
{ "label": "Rewind", "slug": "docs/cli/rewind" }, { "label": "Rewind", "slug": "docs/cli/rewind" },
{ "label": "Sandboxing", "slug": "docs/cli/sandbox" }, { "label": "Sandboxing", "slug": "docs/cli/sandbox" },
{ "label": "Settings", "slug": "docs/cli/settings" }, { "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": "Telemetry", "slug": "docs/cli/telemetry" },
{ "label": "Token caching", "slug": "docs/cli/token-caching" }, { "label": "Token caching", "slug": "docs/cli/token-caching" }
{ "label": "Tools", "link": "/docs/reference/commands/#tools" }
] ]
}, },
{ {