From d25c469f77237f55c50fb531f6bed06c9a8d4cc9 Mon Sep 17 00:00:00 2001 From: Sam Roberts <158088236+g-samroberts@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:47:39 -0800 Subject: [PATCH] Migrate files to resource or references folder. (#19503) --- CONTRIBUTING.md | 2 +- docs/changelogs/index.md | 3 +- docs/cli/cli-reference.md | 46 ++++++------- docs/cli/enterprise.md | 14 ++-- docs/cli/gemini-md.md | 2 +- docs/cli/model.md | 2 +- docs/cli/plan-mode.md | 2 +- docs/cli/sandbox.md | 6 +- docs/cli/telemetry.md | 2 +- docs/cli/themes.md | 6 +- docs/cli/tutorials/memory-management.md | 4 +- docs/cli/tutorials/session-management.md | 2 +- docs/core/index.md | 14 ++-- docs/core/subagents.md | 2 +- docs/extensions/reference.md | 2 +- docs/get-started/authentication.md | 8 +-- docs/get-started/index.md | 2 +- docs/hooks/best-practices.md | 2 +- docs/index.md | 65 ++++++------------- docs/redirects.json | 19 ++++++ docs/{cli => reference}/commands.md | 10 +-- .../configuration.md | 13 ++-- docs/{cli => reference}/keyboard-shortcuts.md | 0 docs/{core => reference}/memport.md | 0 docs/{core => reference}/policy-engine.md | 0 docs/{core => reference}/tools-api.md | 0 docs/{ => resources}/faq.md | 2 +- docs/{ => resources}/quota-and-pricing.md | 0 docs/{ => resources}/tos-privacy.md | 6 +- docs/{ => resources}/troubleshooting.md | 2 +- docs/{cli => resources}/uninstall.md | 0 docs/sidebar.json | 38 ++++++----- docs/tools/index.md | 4 +- docs/tools/internal-docs.md | 10 +-- docs/tools/shell.md | 6 +- scripts/generate-keybindings-doc.ts | 2 +- scripts/generate-settings-doc.ts | 2 +- 37 files changed, 151 insertions(+), 149 deletions(-) create mode 100644 docs/redirects.json rename docs/{cli => reference}/commands.md (98%) rename docs/{get-started => reference}/configuration.md (99%) rename docs/{cli => reference}/keyboard-shortcuts.md (100%) rename docs/{core => reference}/memport.md (100%) rename docs/{core => reference}/policy-engine.md (100%) rename docs/{core => reference}/tools-api.md (100%) rename docs/{ => resources}/faq.md (98%) rename docs/{ => resources}/quota-and-pricing.md (100%) rename docs/{ => resources}/tos-privacy.md (96%) rename docs/{ => resources}/troubleshooting.md (99%) rename docs/{cli => resources}/uninstall.md (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d8252f86c..7dfe898f14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -546,7 +546,7 @@ Before submitting your documentation pull request, please: If you have questions about contributing documentation: -- Check our [FAQ](/docs/faq.md). +- Check our [FAQ](/docs/resources/faq.md). - Review existing documentation for examples. - Open [an issue](https://github.com/google-gemini/gemini-cli/issues) to discuss your proposed changes. diff --git a/docs/changelogs/index.md b/docs/changelogs/index.md index 990d116769..3cff4c123b 100644 --- a/docs/changelogs/index.md +++ b/docs/changelogs/index.md @@ -295,7 +295,8 @@ on GitHub. - **Experimental permission improvements:** We are now experimenting with a new policy engine in Gemini CLI. This allows users and administrators to create fine-grained policy for tool calls. Currently behind a flag. See - [policy engine documentation](../core/policy-engine.md) for more information. + [policy engine documentation](../reference/policy-engine.md) for more + information. - Blog: [https://allen.hutchison.org/2025/11/26/the-guardrails-of-autonomy/](https://allen.hutchison.org/2025/11/26/the-guardrails-of-autonomy/) - **Gemini 3 support for paid:** Gemini 3 support has been rolled out to all API diff --git a/docs/cli/cli-reference.md b/docs/cli/cli-reference.md index b44733916f..f8ff24bed6 100644 --- a/docs/cli/cli-reference.md +++ b/docs/cli/cli-reference.md @@ -26,29 +26,29 @@ and parameters. ## CLI Options -| Option | Alias | Type | Default | Description | -| -------------------------------- | ----- | ------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--debug` | `-d` | boolean | `false` | Run in debug mode with verbose logging | -| `--version` | `-v` | - | - | Show CLI version number and exit | -| `--help` | `-h` | - | - | Show help information | -| `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. | -| `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. **Deprecated:** Use positional arguments instead. | -| `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode | -| `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution | -| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo` | -| `--yolo` | `-y` | boolean | `false` | **Deprecated.** Auto-approve all actions. Use `--approval-mode=yolo` instead. | -| `--experimental-acp` | - | boolean | - | Start in ACP (Agent Code Pilot) mode. **Experimental feature.** | -| `--experimental-zed-integration` | - | boolean | - | Run in Zed editor integration mode. **Experimental feature.** | -| `--allowed-mcp-server-names` | - | array | - | Allowed MCP server names (comma-separated or multiple flags) | -| `--allowed-tools` | - | array | - | **Deprecated.** Use the [Policy Engine](../core/policy-engine.md) instead. Tools that are allowed to run without confirmation (comma-separated or multiple flags) | -| `--extensions` | `-e` | array | - | List of extensions to use. If not provided, all extensions are enabled (comma-separated or multiple flags) | -| `--list-extensions` | `-l` | boolean | - | List all available extensions and exit | -| `--resume` | `-r` | string | - | Resume a previous session. Use `"latest"` for most recent or index number (e.g. `--resume 5`) | -| `--list-sessions` | - | boolean | - | List available sessions for the current project and exit | -| `--delete-session` | - | string | - | Delete a session by index number (use `--list-sessions` to see available sessions) | -| `--include-directories` | - | array | - | Additional directories to include in the workspace (comma-separated or multiple flags) | -| `--screen-reader` | - | boolean | - | Enable screen reader mode for accessibility | -| `--output-format` | `-o` | string | `text` | The format of the CLI output. Choices: `text`, `json`, `stream-json` | +| Option | Alias | Type | Default | Description | +| -------------------------------- | ----- | ------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--debug` | `-d` | boolean | `false` | Run in debug mode with verbose logging | +| `--version` | `-v` | - | - | Show CLI version number and exit | +| `--help` | `-h` | - | - | Show help information | +| `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. | +| `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. **Deprecated:** Use positional arguments instead. | +| `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode | +| `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution | +| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo` | +| `--yolo` | `-y` | boolean | `false` | **Deprecated.** Auto-approve all actions. Use `--approval-mode=yolo` instead. | +| `--experimental-acp` | - | boolean | - | Start in ACP (Agent Code Pilot) mode. **Experimental feature.** | +| `--experimental-zed-integration` | - | boolean | - | Run in Zed editor integration mode. **Experimental feature.** | +| `--allowed-mcp-server-names` | - | array | - | Allowed MCP server names (comma-separated or multiple flags) | +| `--allowed-tools` | - | array | - | **Deprecated.** Use the [Policy Engine](../reference/policy-engine.md) instead. Tools that are allowed to run without confirmation (comma-separated or multiple flags) | +| `--extensions` | `-e` | array | - | List of extensions to use. If not provided, all extensions are enabled (comma-separated or multiple flags) | +| `--list-extensions` | `-l` | boolean | - | List all available extensions and exit | +| `--resume` | `-r` | string | - | Resume a previous session. Use `"latest"` for most recent or index number (e.g. `--resume 5`) | +| `--list-sessions` | - | boolean | - | List available sessions for the current project and exit | +| `--delete-session` | - | string | - | Delete a session by index number (use `--list-sessions` to see available sessions) | +| `--include-directories` | - | array | - | Additional directories to include in the workspace (comma-separated or multiple flags) | +| `--screen-reader` | - | boolean | - | Enable screen reader mode for accessibility | +| `--output-format` | `-o` | string | `text` | The format of the CLI output. Choices: `text`, `json`, `stream-json` | ## Model selection diff --git a/docs/cli/enterprise.md b/docs/cli/enterprise.md index 31f7f89c83..b6d469755b 100644 --- a/docs/cli/enterprise.md +++ b/docs/cli/enterprise.md @@ -20,7 +20,7 @@ The most powerful tools for enterprise administration are the system-wide settings files. These files allow you to define a baseline configuration (`system-defaults.json`) and a set of overrides (`settings.json`) that apply to all users on a machine. For a complete overview of configuration options, see -the [Configuration documentation](../get-started/configuration.md). +the [Configuration documentation](../reference/configuration.md). Settings are merged from four files. The precedence order for single-value settings (like `theme`) is: @@ -224,8 +224,8 @@ gemini You can significantly enhance security by controlling which tools the Gemini model can use. This is achieved through the `tools.core` setting and the -[Policy Engine](../core/policy-engine.md). For a list of available tools, see -the [Tools documentation](../tools/index.md). +[Policy Engine](../reference/policy-engine.md). For a list of available tools, +see the [Tools documentation](../tools/index.md). ### Allowlisting with `coreTools` @@ -245,8 +245,8 @@ on the approved list. ### Blocklisting with `excludeTools` (Deprecated) -> **Deprecated:** Use the [Policy Engine](../core/policy-engine.md) for more -> robust control. +> **Deprecated:** Use the [Policy Engine](../reference/policy-engine.md) for +> more robust control. Alternatively, you can add specific tools that are considered dangerous in your environment to a blocklist. @@ -289,8 +289,8 @@ unintended tool execution. ## Managing custom tools (MCP servers) If your organization uses custom tools via -[Model-Context Protocol (MCP) servers](../core/tools-api.md), it is crucial to -understand how server configurations are managed to apply security policies +[Model-Context Protocol (MCP) servers](../reference/tools-api.md), it is crucial +to understand how server configurations are managed to apply security policies effectively. ### How MCP server configurations are merged diff --git a/docs/cli/gemini-md.md b/docs/cli/gemini-md.md index 01c99972d9..95f46ae095 100644 --- a/docs/cli/gemini-md.md +++ b/docs/cli/gemini-md.md @@ -88,7 +88,7 @@ More content here. @../shared/style-guide.md ``` -For more details, see the [Memory Import Processor](../core/memport.md) +For more details, see the [Memory Import Processor](../reference/memport.md) documentation. ## Customize the context file name diff --git a/docs/cli/model.md b/docs/cli/model.md index fd0e950bbb..62bfcf5b0b 100644 --- a/docs/cli/model.md +++ b/docs/cli/model.md @@ -39,7 +39,7 @@ To enable Gemini 3 Pro and Gemini 3 Flash (if available), enable You can also use the `--model` flag to specify a particular Gemini model on startup. For more details, refer to the -[configuration documentation](../get-started/configuration.md). +[configuration documentation](../reference/configuration.md). Changes to these settings will be applied to all subsequent interactions with Gemini CLI. diff --git a/docs/cli/plan-mode.md b/docs/cli/plan-mode.md index 995e693bb2..b59b0c3198 100644 --- a/docs/cli/plan-mode.md +++ b/docs/cli/plan-mode.md @@ -225,7 +225,7 @@ Guide]. [MCP tools]: /docs/tools/mcp-server.md [`activate_skill`]: /docs/cli/skills.md [experimental research sub-agents]: /docs/core/subagents.md -[Policy Engine Guide]: /docs/core/policy-engine.md +[Policy Engine Guide]: /docs/reference/policy-engine.md [`enter_plan_mode`]: /docs/tools/planning.md#1-enter_plan_mode-enterplanmode [`exit_plan_mode`]: /docs/tools/planning.md#2-exit_plan_mode-exitplanmode [`ask_user`]: /docs/tools/ask-user.md diff --git a/docs/cli/sandbox.md b/docs/cli/sandbox.md index 9f632693c7..392c71a176 100644 --- a/docs/cli/sandbox.md +++ b/docs/cli/sandbox.md @@ -167,6 +167,6 @@ gemini -s -p "run shell command: mount | grep workspace" ## Related documentation -- [Configuration](../get-started/configuration.md): Full configuration options. -- [Commands](./commands.md): Available commands. -- [Troubleshooting](../troubleshooting.md): General troubleshooting. +- [Configuration](../reference/configuration.md): Full configuration options. +- [Commands](../reference/commands.md): Available commands. +- [Troubleshooting](../resources/troubleshooting.md): General troubleshooting. diff --git a/docs/cli/telemetry.md b/docs/cli/telemetry.md index ca44bccaf0..0cda8b4528 100644 --- a/docs/cli/telemetry.md +++ b/docs/cli/telemetry.md @@ -93,7 +93,7 @@ Environment variables can be used to override the settings in the file. `true` or `1` will enable the feature. Any other value will disable it. For detailed information about all configuration options, see the -[Configuration guide](../get-started/configuration.md). +[Configuration guide](../reference/configuration.md). ## Google Cloud telemetry diff --git a/docs/cli/themes.md b/docs/cli/themes.md index dc3423080f..08564a249a 100644 --- a/docs/cli/themes.md +++ b/docs/cli/themes.md @@ -41,8 +41,8 @@ can change the theme using the `/theme` command. ### Theme persistence Selected themes are saved in Gemini CLI's -[configuration](../get-started/configuration.md) so your preference is -remembered across sessions. +[configuration](../reference/configuration.md) so your preference is remembered +across sessions. --- @@ -194,7 +194,7 @@ untrusted sources. - Or, set it as the default by adding `"theme": "MyCustomTheme"` to the `ui` object in your `settings.json`. - Custom themes can be set at the user, project, or system level, and follow the - same [configuration precedence](../get-started/configuration.md) as other + same [configuration precedence](../reference/configuration.md) as other settings. ### Themes from extensions diff --git a/docs/cli/tutorials/memory-management.md b/docs/cli/tutorials/memory-management.md index f679719238..829fbecbd4 100644 --- a/docs/cli/tutorials/memory-management.md +++ b/docs/cli/tutorials/memory-management.md @@ -121,6 +121,6 @@ immediately. Force a reload with: - Learn about [Session management](session-management.md) to see how short-term history works. -- Explore the [Command reference](../../cli/commands.md) for more `/memory` - options. +- Explore the [Command reference](../../reference/commands.md) for more + `/memory` options. - Read the technical spec for [Project context](../../cli/gemini-md.md). diff --git a/docs/cli/tutorials/session-management.md b/docs/cli/tutorials/session-management.md index 775a1e9b5f..7815aa94d6 100644 --- a/docs/cli/tutorials/session-management.md +++ b/docs/cli/tutorials/session-management.md @@ -101,5 +101,5 @@ This creates a new branch of history without losing your original work. - Learn about [Checkpointing](../../cli/checkpointing.md) to understand the underlying safety mechanism. - Explore [Task planning](task-planning.md) to keep complex sessions organized. -- See the [Command reference](../../cli/commands.md) for all `/chat` and +- See the [Command reference](../../reference/commands.md) for all `/chat` and `/resume` options. diff --git a/docs/core/index.md b/docs/core/index.md index 0cd49ad43e..53aa647dc2 100644 --- a/docs/core/index.md +++ b/docs/core/index.md @@ -9,11 +9,11 @@ requests sent from `packages/cli`. For a general overview of Gemini CLI, see the - **[Sub-agents (experimental)](./subagents.md):** Learn how to create and use specialized sub-agents for complex tasks. -- **[Core tools API](./tools-api.md):** Information on how tools are defined, - registered, and used by the core. -- **[Memory Import Processor](./memport.md):** Documentation for the modular - GEMINI.md import feature using @file.md syntax. -- **[Policy Engine](./policy-engine.md):** Use the Policy Engine for +- **[Core tools API](../reference/tools-api.md):** Information on how tools are + defined, registered, and used by the core. +- **[Memory Import Processor](../reference/memport.md):** Documentation for the + modular GEMINI.md import feature using @file.md syntax. +- **[Policy Engine](../reference/policy-engine.md):** Use the Policy Engine for fine-grained control over tool execution. ## Role of the core @@ -92,8 +92,8 @@ This allows you to have global, project-level, and component-level context files, which are all combined to provide the model with the most relevant information. -You can use the [`/memory` command](../cli/commands.md) to `show`, `add`, and -`refresh` the content of loaded `GEMINI.md` files. +You can use the [`/memory` command](../reference/commands.md) to `show`, `add`, +and `refresh` the content of loaded `GEMINI.md` files. ## Citations diff --git a/docs/core/subagents.md b/docs/core/subagents.md index 7e17da94ae..3619609e95 100644 --- a/docs/core/subagents.md +++ b/docs/core/subagents.md @@ -17,7 +17,7 @@ the main agent's context or toolset. > ``` > > **Warning:** Subagents currently operate in -> ["YOLO mode"](../get-started/configuration.md#command-line-arguments), meaning +> ["YOLO mode"](../reference/configuration.md#command-line-arguments), meaning > they may execute tools without individual user confirmation for each step. > Proceed with caution when defining agents with powerful tools like > `run_shell_command` or `write_file`. diff --git a/docs/extensions/reference.md b/docs/extensions/reference.md index eec5b82025..b4a0df7336 100644 --- a/docs/extensions/reference.md +++ b/docs/extensions/reference.md @@ -130,7 +130,7 @@ The manifest file defines the extension's behavior and configuration. - `description`: A short summary shown in the extension gallery. - `mcpServers`: A map of Model Context Protocol (MCP) servers. Extension servers follow the same format as standard - [CLI configuration](../get-started/configuration.md). + [CLI configuration](../reference/configuration.md). - `contextFileName`: The name of the context file (defaults to `GEMINI.md`). Can also be an array of strings to load multiple context files. - `excludeTools`: An array of tools to block from the model. You can restrict diff --git a/docs/get-started/authentication.md b/docs/get-started/authentication.md index 6e2ce5ca05..e8696137cf 100644 --- a/docs/get-started/authentication.md +++ b/docs/get-started/authentication.md @@ -22,8 +22,8 @@ Select the authentication method that matches your situation in the table below: ### What is my Google account type? - **Individual Google accounts:** Includes all - [free tier accounts](../quota-and-pricing/#free-usage) such as Gemini Code - Assist for individuals, as well as paid subscriptions for + [free tier accounts](../resources/quota-and-pricing.md#free-usage) such as + Gemini Code Assist for individuals, as well as paid subscriptions for [Google AI Pro and Ultra](https://gemini.google/subscriptions/). - **Organization accounts:** Accounts using paid licenses through an @@ -317,5 +317,5 @@ configure authentication using environment variables: Your authentication method affects your quotas, pricing, Terms of Service, and privacy notices. Review the following pages to learn more: -- [Gemini CLI: Quotas and Pricing](../quota-and-pricing.md). -- [Gemini CLI: Terms of Service and Privacy Notice](../tos-privacy.md). +- [Gemini CLI: Quotas and Pricing](../resources/quota-and-pricing.md). +- [Gemini CLI: Terms of Service and Privacy Notice](../resources/tos-privacy.md). diff --git a/docs/get-started/index.md b/docs/get-started/index.md index d5cf891381..4d0158b71f 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -54,7 +54,7 @@ Gemini CLI offers several ways to configure its behavior, including environment variables, command-line arguments, and settings files. To explore your configuration options, see -[Gemini CLI Configuration](./configuration.md). +[Gemini CLI Configuration](../reference/configuration.md). ## Use diff --git a/docs/hooks/best-practices.md b/docs/hooks/best-practices.md index 316aacbc29..fd80fc0b40 100644 --- a/docs/hooks/best-practices.md +++ b/docs/hooks/best-practices.md @@ -420,7 +420,7 @@ When you open a project with hooks defined in `.gemini/settings.json`: Hooks inherit the environment of the Gemini CLI process, which may include sensitive API keys. Gemini CLI provides a -[redaction system](/docs/get-started/configuration#environment-variable-redaction) +[redaction system](/docs/reference/configuration.md#environment-variable-redaction) that automatically filters variables matching sensitive patterns (e.g., `KEY`, `TOKEN`). diff --git a/docs/index.md b/docs/index.md index 813cd4047e..81e760fadd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -48,41 +48,8 @@ User-focused guides and tutorials for daily development workflows. ## Features -Technical reference documentation for each capability of Gemini CLI. +Technical documentation for each capability of Gemini CLI. -- **[/about](./cli/commands.md#about):** About Gemini CLI. -- **[/auth](./get-started/authentication.md):** Authentication. -- **[/bug](./cli/commands.md#bug):** Report a bug. -- **[/chat](./cli/commands.md#chat):** Chat history. -- **[/clear](./cli/commands.md#clear):** Clear screen. -- **[/compress](./cli/commands.md#compress):** Compress context. -- **[/copy](./cli/commands.md#copy):** Copy output. -- **[/directory](./cli/commands.md#directory-or-dir):** Manage workspace. -- **[/docs](./cli/commands.md#docs):** Open documentation. -- **[/editor](./cli/commands.md#editor):** Select editor. -- **[/extensions](./extensions/index.md):** Manage extensions. -- **[/help](./cli/commands.md#help-or):** Show help. -- **[/hooks](./hooks/index.md):** Hooks. -- **[/ide](./ide-integration/index.md):** IDE integration. -- **[/init](./cli/commands.md#init):** Initialize context. -- **[/mcp](./tools/mcp-server.md):** MCP servers. -- **[/memory](./cli/commands.md#memory):** Manage memory. -- **[/model](./cli/model.md):** Model selection. -- **[/policies](./cli/commands.md#policies):** Manage policies. -- **[/privacy](./cli/commands.md#privacy):** Privacy notice. -- **[/quit](./cli/commands.md#quit-or-exit):** Exit CLI. -- **[/restore](./cli/checkpointing.md):** Restore files. -- **[/resume](./cli/commands.md#resume):** Resume session. -- **[/rewind](./cli/rewind.md):** Rewind. -- **[/settings](./cli/settings.md):** Settings. -- **[/setup-github](./cli/commands.md#setup-github):** GitHub setup. -- **[/shells](./cli/commands.md#shells-or-bashes):** Manage processes. -- **[/skills](./cli/skills.md):** Agent skills. -- **[/stats](./cli/commands.md#stats):** Session statistics. -- **[/terminal-setup](./cli/commands.md#terminal-setup):** Terminal keybindings. -- **[/theme](./cli/themes.md):** Themes. -- **[/tools](./cli/commands.md#tools):** List tools. -- **[/vim](./cli/commands.md#vim):** Vim mode. - **[Activate skill (tool)](./tools/activate-skill.md):** Internal mechanism for loading expert procedures. - **[Ask user (tool)](./tools/ask-user.md):** Internal dialog system for @@ -97,12 +64,12 @@ Technical reference documentation for each capability of Gemini CLI. - **[Model routing](./cli/model-routing.md):** Automatic fallback resilience. - **[Plan mode 🧪](./cli/plan-mode.md):** Use a safe, read-only mode for planning complex changes. +- **[Subagents 🧪](./core/subagents.md):** Using specialized agents for specific + tasks. - **[Remote subagents 🧪](./core/remote-agents.md):** Connecting to and using remote agents. - **[Sandboxing](./cli/sandbox.md):** Isolate tool execution. - **[Shell (tool)](./tools/shell.md):** Detailed system execution parameters. -- **[Subagents 🧪](./core/subagents.md):** Using specialized agents for specific - tasks. - **[Telemetry](./cli/telemetry.md):** Usage and performance metric details. - **[Todo (tool)](./tools/todos.md):** Progress tracking specification. - **[Token caching](./cli/token-caching.md):** Performance optimization. @@ -134,23 +101,29 @@ Settings and customization options for Gemini CLI. Deep technical documentation and API specifications. -- **[Command reference](./cli/commands.md):** Detailed slash command guide. -- **[Configuration reference](./get-started/configuration.md):** Settings and +- **[Command reference](./reference/commands.md):** Detailed slash command + guide. +- **[Configuration reference](./reference/configuration.md):** Settings and environment variables. -- **[Keyboard shortcuts](./cli/keyboard-shortcuts.md):** Productivity tips. -- **[Memory import processor](./core/memport.md):** How Gemini CLI processes - memory from various sources. -- **[Policy engine](./core/policy-engine.md):** Fine-grained execution control. -- **[Tools API](./core/tools-api.md):** The API for defining and using tools. +- **[Keyboard shortcuts](./reference/keyboard-shortcuts.md):** Productivity + tips. +- **[Memory import processor](./reference/memport.md):** How Gemini CLI + processes memory from various sources. +- **[Policy engine](./reference/policy-engine.md):** Fine-grained execution + control. +- **[Tools API](./reference/tools-api.md):** The API for defining and using + tools. ## Resources Support, release history, and legal information. -- **[FAQ](./faq.md):** Answers to frequently asked questions. +- **[FAQ](./resources/faq.md):** Answers to frequently asked questions. - **[Changelogs](./changelogs/index.md):** Highlights and notable changes. -- **[Quota and pricing](./quota-and-pricing.md):** Limits and billing details. -- **[Terms and privacy](./tos-privacy.md):** Official notices and terms. +- **[Quota and pricing](./resources/quota-and-pricing.md):** Limits and billing + details. +- **[Terms and privacy](./resources/tos-privacy.md):** Official notices and + terms. ## Development diff --git a/docs/redirects.json b/docs/redirects.json new file mode 100644 index 0000000000..5183d0d476 --- /dev/null +++ b/docs/redirects.json @@ -0,0 +1,19 @@ +{ + "/docs/architecture": "/docs/cli/index", + "/docs/cli/commands": "/docs/reference/commands", + "/docs/cli": "/docs", + "/docs/cli/index": "/docs", + "/docs/cli/keyboard-shortcuts": "/docs/reference/keyboard-shortcuts", + "/docs/cli/uninstall": "/docs/resources/uninstall", + "/docs/core/concepts": "/docs", + "/docs/core/memport": "/docs/reference/memport", + "/docs/core/policy-engine": "/docs/reference/policy-engine", + "/docs/core/tools-api": "/docs/reference/tools-api", + "/docs/faq": "/docs/resources/faq", + "/docs/get-started/configuration": "/docs/reference/configuration", + "/docs/get-started/configuration-v1": "/docs/reference/configuration", + "/docs/index": "/docs", + "/docs/quota-and-pricing": "/docs/resources/quota-and-pricing", + "/docs/tos-privacy": "/docs/resources/tos-privacy", + "/docs/troubleshooting": "/docs/resources/troubleshooting" +} diff --git a/docs/cli/commands.md b/docs/reference/commands.md similarity index 98% rename from docs/cli/commands.md rename to docs/reference/commands.md index 6d44659404..ee7ac6d581 100644 --- a/docs/cli/commands.md +++ b/docs/reference/commands.md @@ -217,7 +217,7 @@ Slash commands provide meta-level control over the CLI itself. model. - **Note:** For more details on how `GEMINI.md` files contribute to hierarchical memory, see the - [CLI Configuration documentation](../get-started/configuration.md). + [CLI Configuration documentation](./configuration.md). ### `/model` @@ -254,7 +254,7 @@ Slash commands provide meta-level control over the CLI itself. checkpoints to restore from. - **Usage:** `/restore [tool_call_id]` - **Note:** Only available if checkpointing is configured via - [settings](../get-started/configuration.md). See + [settings](./configuration.md). See [Checkpointing documentation](../cli/checkpointing.md) for more details. ### `/rewind` @@ -293,7 +293,8 @@ Slash commands provide meta-level control over the CLI itself. settings that control the behavior and appearance of Gemini CLI. It is equivalent to manually editing the `.gemini/settings.json` file, but with validation and guidance to prevent errors. See the - [settings documentation](./settings.md) for a full list of available settings. + [settings documentation](../cli/settings.md) for a full list of available + settings. - **Usage:** Simply run `/settings` and the editor will open. You can then browse or search for specific settings, view their current values, and modify them as desired. Changes to some settings are applied immediately, while @@ -380,7 +381,8 @@ Slash commands provide meta-level control over the CLI itself. Custom commands allow you to create personalized shortcuts for your most-used prompts. For detailed instructions on how to create, manage, and use them, -please see the dedicated [Custom Commands documentation](./custom-commands.md). +please see the dedicated +[Custom Commands documentation](../cli/custom-commands.md). ## Input prompt shortcuts diff --git a/docs/get-started/configuration.md b/docs/reference/configuration.md similarity index 99% rename from docs/get-started/configuration.md rename to docs/reference/configuration.md index ba86442a4d..de639f95cf 100644 --- a/docs/get-started/configuration.md +++ b/docs/reference/configuration.md @@ -1234,8 +1234,8 @@ within your user's home folder. Environment variables are a common way to configure applications, especially for sensitive information like API keys or for settings that might change between environments. For authentication setup, see the -[Authentication documentation](./authentication.md) which covers all available -authentication methods. +[Authentication documentation](../get-started/authentication.md) which covers +all available authentication methods. The CLI automatically loads environment variables from an `.env` file. The loading order is: @@ -1254,7 +1254,8 @@ the `advanced.excludedEnvVars` setting in your `settings.json` file. - **`GEMINI_API_KEY`**: - Your API key for the Gemini API. - - One of several available [authentication methods](./authentication.md). + - One of several available + [authentication methods](../get-started/authentication.md). - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env` file. - **`GEMINI_MODEL`**: @@ -1600,15 +1601,15 @@ conventions and context. about the active instructional context. - **Importing content:** You can modularize your context files by importing other Markdown files using the `@path/to/file.md` syntax. For more details, - see the [Memory Import Processor documentation](../core/memport.md). + see the [Memory Import Processor documentation](./memport.md). - **Commands for memory management:** - Use `/memory refresh` to force a re-scan and reload of all context files from all configured locations. This updates the AI's instructional context. - Use `/memory show` to display the combined instructional context currently loaded, allowing you to verify the hierarchy and content being used by the AI. - - See the [Commands documentation](../cli/commands.md#memory) for full details - on the `/memory` command and its sub-commands (`show` and `refresh`). + - See the [Commands documentation](./commands.md#memory) for full details on + the `/memory` command and its sub-commands (`show` and `refresh`). By understanding and utilizing these configuration layers and the hierarchical nature of context files, you can effectively manage the AI's memory and tailor diff --git a/docs/cli/keyboard-shortcuts.md b/docs/reference/keyboard-shortcuts.md similarity index 100% rename from docs/cli/keyboard-shortcuts.md rename to docs/reference/keyboard-shortcuts.md diff --git a/docs/core/memport.md b/docs/reference/memport.md similarity index 100% rename from docs/core/memport.md rename to docs/reference/memport.md diff --git a/docs/core/policy-engine.md b/docs/reference/policy-engine.md similarity index 100% rename from docs/core/policy-engine.md rename to docs/reference/policy-engine.md diff --git a/docs/core/tools-api.md b/docs/reference/tools-api.md similarity index 100% rename from docs/core/tools-api.md rename to docs/reference/tools-api.md diff --git a/docs/faq.md b/docs/resources/faq.md similarity index 98% rename from docs/faq.md rename to docs/resources/faq.md index 2e78f3aa34..eeb0396495 100644 --- a/docs/faq.md +++ b/docs/resources/faq.md @@ -104,7 +104,7 @@ The Gemini CLI configuration is stored in two `settings.json` files: 1. In your home directory: `~/.gemini/settings.json`. 2. In your project's root directory: `./.gemini/settings.json`. -Refer to [Gemini CLI Configuration](./get-started/configuration.md) for more +Refer to [Gemini CLI Configuration](../reference/configuration.md) for more details. ## Google AI Pro/Ultra and subscription FAQs diff --git a/docs/quota-and-pricing.md b/docs/resources/quota-and-pricing.md similarity index 100% rename from docs/quota-and-pricing.md rename to docs/resources/quota-and-pricing.md diff --git a/docs/tos-privacy.md b/docs/resources/tos-privacy.md similarity index 96% rename from docs/tos-privacy.md rename to docs/resources/tos-privacy.md index 0c7073e0fb..e653e59d1d 100644 --- a/docs/tos-privacy.md +++ b/docs/resources/tos-privacy.md @@ -10,8 +10,8 @@ and Privacy Notices applicable to those services apply to such access and use. Your Gemini CLI Usage Statistics are handled in accordance with Google's Privacy Policy. -**Note:** See [quotas and pricing](/docs/quota-and-pricing.md) for the quota and -pricing details that apply to your usage of the Gemini CLI. +**Note:** See [quotas and pricing](/docs/resources/quota-and-pricing.md) for the +quota and pricing details that apply to your usage of the Gemini CLI. ## Supported authentication methods @@ -93,4 +93,4 @@ backend, these Terms of Service and Privacy Notice documents apply: You may opt-out from sending Gemini CLI Usage Statistics to Google by following the instructions available here: -[Usage Statistics Configuration](https://github.com/google-gemini/gemini-cli/blob/main/docs/get-started/configuration.md#usage-statistics). +[Usage Statistics Configuration](https://github.com/google-gemini/gemini-cli/blob/main/docs/reference/configuration.md#usage-statistics). diff --git a/docs/troubleshooting.md b/docs/resources/troubleshooting.md similarity index 99% rename from docs/troubleshooting.md rename to docs/resources/troubleshooting.md index f700d0b74f..9e567652d9 100644 --- a/docs/troubleshooting.md +++ b/docs/resources/troubleshooting.md @@ -93,7 +93,7 @@ topics on: - **Cause:** When sandboxing is enabled, Gemini CLI may attempt operations that are restricted by your sandbox configuration, such as writing outside the project directory or system temp directory. - - **Solution:** Refer to the [Configuration: Sandboxing](./cli/sandbox.md) + - **Solution:** Refer to the [Configuration: Sandboxing](../cli/sandbox.md) documentation for more information, including how to customize your sandbox configuration. diff --git a/docs/cli/uninstall.md b/docs/resources/uninstall.md similarity index 100% rename from docs/cli/uninstall.md rename to docs/resources/uninstall.md diff --git a/docs/sidebar.json b/docs/sidebar.json index 4e95111a13..ef9989884f 100644 --- a/docs/sidebar.json +++ b/docs/sidebar.json @@ -63,13 +63,13 @@ "slug": "docs/extensions/index" }, { "label": "Headless mode", "slug": "docs/cli/headless" }, - { "label": "Help", "link": "/docs/cli/commands/#help-or" }, + { "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/cli/commands/#memory" + "link": "/docs/reference/commands/#memory" }, { "label": "Model routing", "slug": "docs/cli/model-routing" }, { "label": "Model selection", "slug": "docs/cli/model" }, @@ -85,15 +85,15 @@ { "label": "Settings", "slug": "docs/cli/settings" }, { "label": "Shell", - "link": "/docs/cli/commands/#shells-or-bashes" + "link": "/docs/reference/commands/#shells-or-bashes" }, { "label": "Stats", - "link": "/docs/cli/commands/#stats" + "link": "/docs/reference/commands/#stats" }, { "label": "Telemetry", "slug": "docs/cli/telemetry" }, { "label": "Token caching", "slug": "docs/cli/token-caching" }, - { "label": "Tools", "link": "/docs/cli/commands/#tools" } + { "label": "Tools", "link": "/docs/reference/commands/#tools" } ] }, { @@ -148,25 +148,31 @@ { "label": "Reference", "items": [ - { "label": "Command reference", "slug": "docs/cli/commands" }, + { "label": "Command reference", "slug": "docs/reference/commands" }, { "label": "Configuration reference", - "slug": "docs/get-started/configuration" + "slug": "docs/reference/configuration" }, - { "label": "Keyboard shortcuts", "slug": "docs/cli/keyboard-shortcuts" }, - { "label": "Memory import processor", "slug": "docs/core/memport" }, - { "label": "Policy engine", "slug": "docs/core/policy-engine" }, - { "label": "Tools API", "slug": "docs/core/tools-api" } + { + "label": "Keyboard shortcuts", + "slug": "docs/reference/keyboard-shortcuts" + }, + { "label": "Memory import processor", "slug": "docs/reference/memport" }, + { "label": "Policy engine", "slug": "docs/reference/policy-engine" }, + { "label": "Tools API", "slug": "docs/reference/tools-api" } ] }, { "label": "Resources", "items": [ - { "label": "FAQ", "slug": "docs/faq" }, - { "label": "Quota and pricing", "slug": "docs/quota-and-pricing" }, - { "label": "Terms and privacy", "slug": "docs/tos-privacy" }, - { "label": "Troubleshooting", "slug": "docs/troubleshooting" }, - { "label": "Uninstall", "slug": "docs/cli/uninstall" } + { "label": "FAQ", "slug": "docs/resources/faq" }, + { + "label": "Quota and pricing", + "slug": "docs/resources/quota-and-pricing" + }, + { "label": "Terms and privacy", "slug": "docs/resources/tos-privacy" }, + { "label": "Troubleshooting", "slug": "docs/resources/troubleshooting" }, + { "label": "Uninstall", "slug": "docs/resources/uninstall" } ] }, { diff --git a/docs/tools/index.md b/docs/tools/index.md index 42304ef008..f496ad591a 100644 --- a/docs/tools/index.md +++ b/docs/tools/index.md @@ -98,5 +98,5 @@ Always review confirmation prompts carefully before allowing a tool to execute. ## Next steps - Learn how to [Provide context](../cli/gemini-md.md) to guide tool use. -- Explore the [Command reference](../cli/commands.md) for tool-related slash - commands. +- Explore the [Command reference](../reference/commands.md) for tool-related + slash commands. diff --git a/docs/tools/internal-docs.md b/docs/tools/internal-docs.md index f87099b2f3..0d30655fcd 100644 --- a/docs/tools/internal-docs.md +++ b/docs/tools/internal-docs.md @@ -14,8 +14,8 @@ provides direct access to the Markdown files in the `docs/` directory. `get_internal_docs` takes one optional argument: - `path` (string, optional): The relative path to a specific documentation file - (for example, `cli/commands.md`). If omitted, the tool returns a list of all - available documentation paths. + (for example, `reference/commands.md`). If omitted, the tool returns a list of + all available documentation paths. ## Usage @@ -40,7 +40,7 @@ Gemini CLI uses this tool to ensure technical accuracy: ## Next steps -- Explore the [Command reference](../cli/commands.md) for a detailed guide to - slash commands. -- See the [Configuration guide](../get-started/configuration.md) for settings +- Explore the [Command reference](../reference/commands.md) for a detailed guide + to slash commands. +- See the [Configuration guide](../reference/configuration.md) for settings reference. diff --git a/docs/tools/shell.md b/docs/tools/shell.md index 7d8e407434..34fd7c8490 100644 --- a/docs/tools/shell.md +++ b/docs/tools/shell.md @@ -131,9 +131,9 @@ configuration file. commands. Including the generic `run_shell_command` acts as a wildcard, allowing any command not explicitly blocked. - `tools.exclude` [DEPRECATED]: To block specific commands, use the - [Policy Engine](../core/policy-engine.md). Historically, this setting allowed - adding entries to the `exclude` list under the `tools` category in the format - `run_shell_command()`. For example, + [Policy Engine](../reference/policy-engine.md). Historically, this setting + allowed adding entries to the `exclude` list under the `tools` category in the + format `run_shell_command()`. For example, `"tools": {"exclude": ["run_shell_command(rm)"]}` will block `rm` commands. The validation logic is designed to be secure and flexible: diff --git a/scripts/generate-keybindings-doc.ts b/scripts/generate-keybindings-doc.ts index 600a989936..eea7ef9af3 100644 --- a/scripts/generate-keybindings-doc.ts +++ b/scripts/generate-keybindings-doc.ts @@ -22,7 +22,7 @@ import { const START_MARKER = ''; const END_MARKER = ''; -const OUTPUT_RELATIVE_PATH = ['docs', 'cli', 'keyboard-shortcuts.md']; +const OUTPUT_RELATIVE_PATH = ['docs', 'reference', 'keyboard-shortcuts.md']; const KEY_NAME_OVERRIDES: Record = { return: 'Enter', diff --git a/scripts/generate-settings-doc.ts b/scripts/generate-settings-doc.ts index 32d9d47c0b..1d27eb962a 100644 --- a/scripts/generate-settings-doc.ts +++ b/scripts/generate-settings-doc.ts @@ -47,7 +47,7 @@ export async function main(argv = process.argv.slice(2)) { path.dirname(fileURLToPath(import.meta.url)), '..', ); - const docPath = path.join(repoRoot, 'docs/get-started/configuration.md'); + const docPath = path.join(repoRoot, 'docs/reference/configuration.md'); const cliSettingsDocPath = path.join(repoRoot, 'docs/cli/settings.md'); const { getSettingsSchema } = await loadSettingsSchemaModule();