summaryrefslogtreecommitdiff
path: root/docs/cli
diff options
context:
space:
mode:
authorcperry-goog <[email protected]>2025-06-21 17:41:03 -0700
committerGitHub <[email protected]>2025-06-21 17:41:03 -0700
commite20171e7ddb7c4d0935dcb578b8395dc560005ec (patch)
treec32e876fe169936f50e4f6a33af2cc2b2a959485 /docs/cli
parent47780e984c36e494cbfe6f93d7bdf065184bf10b (diff)
Updating missing commands (#1289)
Diffstat (limited to 'docs/cli')
-rw-r--r--docs/cli/commands.md29
-rw-r--r--docs/cli/configuration.md22
2 files changed, 47 insertions, 4 deletions
diff --git a/docs/cli/commands.md b/docs/cli/commands.md
index e58c2add..7aa32360 100644
--- a/docs/cli/commands.md
+++ b/docs/cli/commands.md
@@ -43,6 +43,8 @@ Slash commands provide meta-level control over the CLI itself.
- **Description:** Manage the AI's instructional context (hierarchical memory loaded from `GEMINI.md` files).
- **Sub-commands:**
+ - **`add`**:
+ - **Description:** Adds the following text to the AI's memory. Usage: `/memory add <text to remember>`
- **`show`**:
- **Description:** Display the full, concatenated content of the current hierarchical memory that has been loaded from all `GEMINI.md` files. This lets you inspect the instructional context being provided to the Gemini model.
- **`refresh`**:
@@ -57,6 +59,14 @@ Slash commands provide meta-level control over the CLI itself.
- **Description:** Open a dialog that lets you change the visual theme of Gemini CLI.
+- **`/auth`**
+
+ - **Description:** Open a dialog that lets you change the authentication method.
+
+- **`/about`**
+
+ - **Description:** Show version info. Please share this information when filing issues.
+
- [**`/tools`**](../tools/index.md)
- **Description:** Display a list of tools that are currently available within Gemini CLI.
@@ -70,6 +80,25 @@ Slash commands provide meta-level control over the CLI itself.
- **Description:** Exit Gemini CLI.
+## Checkpointing Commands
+
+Checkpointing allows you to save and restore the state of your conversation and files. This is disabled by default, you must explicitly enable checkpointing using the `--checkpointing` argument or via [settings](./configuration.md).
+
+- **`/save`**
+
+ - **Description:** Saves a checkpoint of the current conversation history. You can optionally add a `[tag]` to easily identify it later.
+ - **Usage:** `/save [tag]`
+
+- **`/resume`**
+
+ - **Description:** Resumes a conversation from a previously saved checkpoint. If you don't provide a `[tag]`, it will attempt to load the latest checkpoint.
+ - **Usage:** `/resume [tag]`
+
+- **`/restore`**
+
+ - **Description:** Restores the project files to the state they were in just before a tool was executed. This is particularly useful for undoing file edits made by a tool. If run without a tool call ID, it will list available checkpoints to restore from.
+ - **Usage:** `/restore [tool_call_id]`
+
## At commands (`@`)
At commands are used to include the content of files or directories as part of your prompt to Gemini. These commands include git-aware filtering.
diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md
index bc85114f..e3c379b0 100644
--- a/docs/cli/configuration.md
+++ b/docs/cli/configuration.md
@@ -147,9 +147,12 @@ In addition to a project settings file, a project's `.gemini` directory can cont
}
```
-- **`mcpServerCommand`** (string, **deprecated**):
+- **`checkpointing`** (object):
- - This is a legacy setting for configuring a single MCP server. Use `mcpServers` instead.
+ - **Description:** Configures the checkpointing feature, which allows you to save and restore conversation and file states. See the [Checkpointing Commands](./commands.md#checkpointing-commands) for more details.
+ - **Default:** `{"enabled": false}`
+ - **Properties:**
+ - **`enabled`** (boolean): When `true`, the `/save`, `/resume`, and `/restore` commands are available.
### Example `settings.json`:
@@ -171,6 +174,14 @@ In addition to a project settings file, a project's `.gemini` directory can cont
}
```
+## Shell History
+
+The CLI keeps a history of shell commands you run. To avoid conflicts between different projects, this history is stored in a project-specific directory within your user's home folder.
+
+- **Location:** `~/.gemini/tmp/<project_hash>/shell_history`
+ - `<project_hash>` is a unique identifier generated from your project's root path.
+ - The history is stored in a file named `shell_history`.
+
## Environment Variables & `.env` Files
Environment variables are a common way to configure applications, especially for sensitive information like API keys or for settings that might change between environments.
@@ -187,8 +198,8 @@ The CLI automatically loads environment variables from an `.env` file. The loadi
- Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env` file.
- **`GEMINI_MODEL`**:
- Specifies the default Gemini model to use.
- - Overrides the hardcoded default, which is currently `gemini-2.5-pro-preview-05-06`.
- - Example: `export GEMINI_MODEL="gemini-1.5-flash-latest"`
+ - Overrides the hardcoded default
+ - Example: `export GEMINI_MODEL="gemini-2.5-flash"`
- **`GOOGLE_API_KEY`**:
- Your Google Cloud API key.
- Required for using Vertex AI in express mode.
@@ -199,6 +210,9 @@ The CLI automatically loads environment variables from an `.env` file. The loadi
- Required for using Code Assist or Vertex AI.
- If using Vertex AI, ensure you have the necessary permissions and set the `GOOGLE_GENAI_USE_VERTEXAI=true` environment variable.
- Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
+- **`GOOGLE_APPLICATION_CREDENTIALS`** (string):
+ - **Description:** The path to your Google Application Credentials JSON file.
+ - **Example:** `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"`
- **`OTLP_GOOGLE_CLOUD_PROJECT`**:
- Your Google Cloud Project ID for Telemetry in Google Cloud
- Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.