diff options
| author | cperry-goog <[email protected]> | 2025-06-07 10:47:30 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-07 10:47:30 -0700 |
| commit | 63757d6a7ae6dcff47e912578903ed4040b2b82f (patch) | |
| tree | 243f231880d3456ae0c055a9deccf3c23a84c113 /docs/cli | |
| parent | dcaecde844fd21d101bbb76c41163919373543d2 (diff) | |
docs: update and reorganize documentation (#806)
Diffstat (limited to 'docs/cli')
| -rw-r--r-- | docs/cli/commands.md | 10 | ||||
| -rw-r--r-- | docs/cli/configuration.md | 4 | ||||
| -rw-r--r-- | docs/cli/index.md | 24 |
3 files changed, 28 insertions, 10 deletions
diff --git a/docs/cli/commands.md b/docs/cli/commands.md index 1792ce4c..c0952129 100644 --- a/docs/cli/commands.md +++ b/docs/cli/commands.md @@ -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. diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md index 28d971de..22d4f698 100644 --- a/docs/cli/configuration.md +++ b/docs/cli/configuration.md @@ -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 diff --git a/docs/cli/index.md b/docs/cli/index.md index 26a58985..24419d77 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -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. |
