docs: update and reorganize documentation (#806)

This commit is contained in:
cperry-goog
2025-06-07 10:47:30 -07:00
committed by GitHub
parent dcaecde844
commit 63757d6a7a
15 changed files with 170 additions and 163 deletions

View File

@@ -32,15 +32,17 @@ Slash commands provide meta-level control over the CLI itself. They can typicall
- **`refresh`**:
- **Description:** Reloads the hierarchical instructional context (memory) from all `GEMINI.md` files found in the configured locations (global, project/ancestors, and sub-directories). This command updates the AI's understanding based on the latest `GEMINI.md` content.
- **Action:** The CLI re-scans for all relevant `GEMINI.md` files and rebuilds its instructional memory. The number of loaded files is typically indicated in the CLI footer.
- **`delete_all_added`**:
- **Description:** Removes all ad-hoc memory entries that were added during the current session via `/memory add`. This does not affect memory loaded from `GEMINI.md` files.
- **Action:** All user-added memory entries for the current session are cleared.
- **Note:** For more details on how `GEMINI.md` files contribute to hierarchical memory, see the [CLI Configuration documentation](./configuration.md#4-geminimd-files-hierarchical-instructional-context).
- **Note:** For more details on how `GEMINI.md` files contribute to hierarchical memory, see the [CLI Configuration documentation](./configuration.md#4-geminimd-files-hierarchical-instructional-context).
- **`/quit`** (or **`/exit`**)
- **Description:** Exits the Gemini CLI application.
- **Action:** Terminates the CLI process.
- **`/tools`**
- **Description:** Displays a list of all the tools that are currently available to the model.
- **Action:** Outputs a list of the available tools.
## At Commands (`@`)
At commands are used to quickly include the content of files or directories as part of your prompt to Gemini. These commands now feature git-aware filtering.

View File

@@ -208,6 +208,10 @@ The CLI automatically loads environment variables from an `.env` file. The loadi
- `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.gemini/` directory (e.g., `my-project/.gemini/sandbox-macos-custom.sb`).
- **`DEBUG` or `DEBUG_MODE`** (often used by underlying libraries or the CLI itself):
- Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting.
- **`NO_COLOR`**:
- Set to any value to disable all color output in the CLI.
- **`CLI_TITLE`**:
- Set to a string to customize the title of the CLI.
## 3. Command-Line Arguments

View File

@@ -1,10 +1,6 @@
# Gemini CLI
Welcome to the documentation for the Gemini CLI. This section provides an overview of the CLI's features, how to interact with it, and how to customize your experience.
## What is the Gemini CLI?
The Gemini CLI (`packages/cli`) is the primary way users interact with the Gemini AI model and its associated tools directly from their terminal. It offers an interactive Read-Eval-Print Loop (REPL) environment where you can send prompts to Gemini, receive responses, and see the results of any tools Gemini uses to fulfill your requests.
The Gemini CLI (`packages/cli`) is the primary way users interact with the Gemini AI model and its associated tools directly from their terminal. For a general overview of the Gemini CLI, see the [main documentation page](../index.md).
## Core Features
@@ -36,4 +32,20 @@ The Gemini CLI (`packages/cli`) is the primary way users interact with the Gemin
- **[Themes](./themes.md)**: A guide to customizing the CLI's appearance with different themes.
- **[Tutorials](tutorials.md)**: A guide for mastering use of the CLI to automate your development tasks.
This documentation will help you become proficient in using the Gemini CLI for a wide range of tasks.
## Non-Interactive Mode
The Gemini CLI can be run in a non-interactive mode, which is useful for scripting and automation. In this mode, you can pipe input to the CLI and it will execute the command and exit.
To use the non-interactive mode, you can pipe a command to the CLI. For example:
```bash
echo "What is fine tuning?" | gemini
```
You can achieve the same result with the `--prompt` or `p` argument. For example:
```bash
gemini -p "What is fine tuning?"
```
In both cases this will execute the command and print the output to the console.