@dgxo/mashadevcli 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +393 -0
  3. package/bundle/builtin/skill-creator/SKILL.md +382 -0
  4. package/bundle/builtin/skill-creator/scripts/init_skill.cjs +239 -0
  5. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +131 -0
  6. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +131 -0
  7. package/bundle/docs/CONTRIBUTING.md +1 -0
  8. package/bundle/docs/admin/enterprise-controls.md +115 -0
  9. package/bundle/docs/assets/connected_devtools.png +0 -0
  10. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  11. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  12. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  13. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  14. package/bundle/docs/assets/release_patch.png +0 -0
  15. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  16. package/bundle/docs/assets/theme-ansi.png +0 -0
  17. package/bundle/docs/assets/theme-atom-one.png +0 -0
  18. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  19. package/bundle/docs/assets/theme-ayu.png +0 -0
  20. package/bundle/docs/assets/theme-custom.png +0 -0
  21. package/bundle/docs/assets/theme-default-light.png +0 -0
  22. package/bundle/docs/assets/theme-default.png +0 -0
  23. package/bundle/docs/assets/theme-dracula.png +0 -0
  24. package/bundle/docs/assets/theme-github-light.png +0 -0
  25. package/bundle/docs/assets/theme-github.png +0 -0
  26. package/bundle/docs/assets/theme-google-light.png +0 -0
  27. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  28. package/bundle/docs/changelogs/index.md +867 -0
  29. package/bundle/docs/changelogs/latest.md +208 -0
  30. package/bundle/docs/changelogs/preview.md +187 -0
  31. package/bundle/docs/cli/checkpointing.md +93 -0
  32. package/bundle/docs/cli/cli-reference.md +115 -0
  33. package/bundle/docs/cli/creating-skills.md +80 -0
  34. package/bundle/docs/cli/custom-commands.md +327 -0
  35. package/bundle/docs/cli/enterprise.md +604 -0
  36. package/bundle/docs/cli/gemini-ignore.md +71 -0
  37. package/bundle/docs/cli/gemini-md.md +116 -0
  38. package/bundle/docs/cli/generation-settings.md +210 -0
  39. package/bundle/docs/cli/headless.md +50 -0
  40. package/bundle/docs/cli/model-routing.md +42 -0
  41. package/bundle/docs/cli/model.md +53 -0
  42. package/bundle/docs/cli/plan-mode.md +375 -0
  43. package/bundle/docs/cli/rewind.md +51 -0
  44. package/bundle/docs/cli/sandbox.md +257 -0
  45. package/bundle/docs/cli/session-management.md +184 -0
  46. package/bundle/docs/cli/settings.md +165 -0
  47. package/bundle/docs/cli/skills.md +134 -0
  48. package/bundle/docs/cli/system-prompt.md +125 -0
  49. package/bundle/docs/cli/telemetry.md +922 -0
  50. package/bundle/docs/cli/themes.md +269 -0
  51. package/bundle/docs/cli/token-caching.md +20 -0
  52. package/bundle/docs/cli/trusted-folders.md +126 -0
  53. package/bundle/docs/cli/tutorials/automation.md +283 -0
  54. package/bundle/docs/cli/tutorials/file-management.md +142 -0
  55. package/bundle/docs/cli/tutorials/mcp-setup.md +113 -0
  56. package/bundle/docs/cli/tutorials/memory-management.md +126 -0
  57. package/bundle/docs/cli/tutorials/session-management.md +105 -0
  58. package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
  59. package/bundle/docs/cli/tutorials/skills-getting-started.md +110 -0
  60. package/bundle/docs/cli/tutorials/task-planning.md +93 -0
  61. package/bundle/docs/cli/tutorials/web-tools.md +78 -0
  62. package/bundle/docs/core/index.md +107 -0
  63. package/bundle/docs/core/remote-agents.md +84 -0
  64. package/bundle/docs/core/subagents.md +307 -0
  65. package/bundle/docs/examples/proxy-script.md +83 -0
  66. package/bundle/docs/extensions/best-practices.md +188 -0
  67. package/bundle/docs/extensions/index.md +61 -0
  68. package/bundle/docs/extensions/reference.md +333 -0
  69. package/bundle/docs/extensions/releasing.md +154 -0
  70. package/bundle/docs/extensions/writing-extensions.md +308 -0
  71. package/bundle/docs/get-started/authentication.md +402 -0
  72. package/bundle/docs/get-started/examples.md +139 -0
  73. package/bundle/docs/get-started/gemini-3.md +115 -0
  74. package/bundle/docs/get-started/index.md +82 -0
  75. package/bundle/docs/get-started/installation.md +174 -0
  76. package/bundle/docs/hooks/best-practices.md +709 -0
  77. package/bundle/docs/hooks/index.md +164 -0
  78. package/bundle/docs/hooks/reference.md +330 -0
  79. package/bundle/docs/hooks/writing-hooks.md +474 -0
  80. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  81. package/bundle/docs/ide-integration/index.md +224 -0
  82. package/bundle/docs/index.md +141 -0
  83. package/bundle/docs/integration-tests.md +211 -0
  84. package/bundle/docs/issue-and-pr-automation.md +172 -0
  85. package/bundle/docs/local-development.md +134 -0
  86. package/bundle/docs/mermaid/context.mmd +103 -0
  87. package/bundle/docs/mermaid/render-path.mmd +64 -0
  88. package/bundle/docs/npm.md +62 -0
  89. package/bundle/docs/redirects.json +20 -0
  90. package/bundle/docs/reference/commands.md +526 -0
  91. package/bundle/docs/reference/configuration.md +1786 -0
  92. package/bundle/docs/reference/keyboard-shortcuts.md +164 -0
  93. package/bundle/docs/reference/memport.md +246 -0
  94. package/bundle/docs/reference/policy-engine.md +364 -0
  95. package/bundle/docs/reference/tools.md +106 -0
  96. package/bundle/docs/release-confidence.md +164 -0
  97. package/bundle/docs/releases.md +540 -0
  98. package/bundle/docs/resources/faq.md +175 -0
  99. package/bundle/docs/resources/quota-and-pricing.md +165 -0
  100. package/bundle/docs/resources/tos-privacy.md +102 -0
  101. package/bundle/docs/resources/troubleshooting.md +176 -0
  102. package/bundle/docs/resources/uninstall.md +56 -0
  103. package/bundle/docs/sidebar.json +233 -0
  104. package/bundle/docs/tools/activate-skill.md +43 -0
  105. package/bundle/docs/tools/ask-user.md +95 -0
  106. package/bundle/docs/tools/file-system.md +129 -0
  107. package/bundle/docs/tools/internal-docs.md +46 -0
  108. package/bundle/docs/tools/mcp-server.md +1150 -0
  109. package/bundle/docs/tools/memory.md +35 -0
  110. package/bundle/docs/tools/planning.md +58 -0
  111. package/bundle/docs/tools/shell.md +216 -0
  112. package/bundle/docs/tools/todos.md +35 -0
  113. package/bundle/docs/tools/web-fetch.md +35 -0
  114. package/bundle/docs/tools/web-search.md +32 -0
  115. package/bundle/docs/update/update-guide.md +111 -0
  116. package/bundle/masha.js +563471 -0
  117. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/client/main.js +89 -0
  118. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.d.ts +7 -0
  119. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js +9 -0
  120. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js.map +1 -0
  121. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.d.ts +48 -0
  122. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js +299 -0
  123. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js.map +1 -0
  124. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.d.ts +36 -0
  125. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js +7 -0
  126. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js.map +1 -0
  127. package/bundle/node_modules/@dgxo/mashadevcli-devtools/package.json +32 -0
  128. package/bundle/policies/conseca.toml +6 -0
  129. package/bundle/policies/discovered.toml +8 -0
  130. package/bundle/policies/plan.toml +109 -0
  131. package/bundle/policies/read-only.toml +53 -0
  132. package/bundle/policies/write.toml +80 -0
  133. package/bundle/policies/yolo.toml +54 -0
  134. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  135. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  136. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  137. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  138. package/bundle/sandbox-macos-strict-open.sb +131 -0
  139. package/bundle/sandbox-macos-strict-proxied.sb +133 -0
  140. package/package.json +169 -0
@@ -0,0 +1,184 @@
1
+ # Session management
2
+
3
+ Session management saves your conversation history so you can resume your work
4
+ where you left off. Use these features to review past interactions, manage
5
+ history across different projects, and configure how long data is retained.
6
+
7
+ ## Automatic saving
8
+
9
+ Your session history is recorded automatically as you interact with the model.
10
+ This background process ensures your work is preserved even if you interrupt a
11
+ session.
12
+
13
+ - **What is saved:** The complete conversation history, including:
14
+ - Your prompts and the model's responses.
15
+ - All tool executions (inputs and outputs).
16
+ - Token usage statistics (input, output, cached, etc.).
17
+ - Assistant thoughts and reasoning summaries (when available).
18
+ - **Location:** Sessions are stored in `~/.gemini/tmp/<project_hash>/chats/`,
19
+ where `<project_hash>` is a unique identifier based on your project's root
20
+ directory.
21
+ - **Scope:** Sessions are project-specific. Switching directories to a different
22
+ project switches to that project's session history.
23
+
24
+ ## Resuming sessions
25
+
26
+ You can resume a previous session to continue the conversation with all prior
27
+ context restored. Resuming is supported both through command-line flags and an
28
+ interactive browser.
29
+
30
+ ### From the command line
31
+
32
+ When starting Gemini CLI, use the `--resume` (or `-r`) flag to load existing
33
+ sessions.
34
+
35
+ - **Resume latest:**
36
+
37
+ ```bash
38
+ gemini --resume
39
+ ```
40
+
41
+ This immediately loads the most recent session.
42
+
43
+ - **Resume by index:** List available sessions first (see
44
+ [Listing sessions](#listing-sessions)), then use the index number:
45
+
46
+ ```bash
47
+ gemini --resume 1
48
+ ```
49
+
50
+ - **Resume by ID:** You can also provide the full session UUID:
51
+ ```bash
52
+ gemini --resume a1b2c3d4-e5f6-7890-abcd-ef1234567890
53
+ ```
54
+
55
+ ### From the interactive interface
56
+
57
+ While the CLI is running, use the `/resume` slash command to open the **Session
58
+ Browser**:
59
+
60
+ ```text
61
+ /resume
62
+ ```
63
+
64
+ The Session Browser provides an interactive interface where you can perform the
65
+ following actions:
66
+
67
+ - **Browse:** Scroll through a list of your past sessions.
68
+ - **Preview:** See details like the session date, message count, and the first
69
+ user prompt.
70
+ - **Search:** Press `/` to enter search mode, then type to filter sessions by ID
71
+ or content.
72
+ - **Select:** Press **Enter** to resume the selected session.
73
+ - **Esc:** Press **Esc** to exit the Session Browser.
74
+
75
+ ## Managing sessions
76
+
77
+ You can list and delete sessions to keep your history organized and manage disk
78
+ space.
79
+
80
+ ### Listing sessions
81
+
82
+ To see a list of all available sessions for the current project from the command
83
+ line, use the `--list-sessions` flag:
84
+
85
+ ```bash
86
+ gemini --list-sessions
87
+ ```
88
+
89
+ Output example:
90
+
91
+ ```text
92
+ Available sessions for this project (3):
93
+
94
+ 1. Fix bug in auth (2 days ago) [a1b2c3d4]
95
+ 2. Refactor database schema (5 hours ago) [e5f67890]
96
+ 3. Update documentation (Just now) [abcd1234]
97
+ ```
98
+
99
+ ### Deleting sessions
100
+
101
+ You can remove old or unwanted sessions to free up space or declutter your
102
+ history.
103
+
104
+ **From the command line:** Use the `--delete-session` flag with an index or ID:
105
+
106
+ ```bash
107
+ gemini --delete-session 2
108
+ ```
109
+
110
+ **From the Session Browser:**
111
+
112
+ 1. Open the browser with `/resume`.
113
+ 2. Navigate to the session you want to remove.
114
+ 3. Press **x**.
115
+
116
+ ## Configuration
117
+
118
+ You can configure how Gemini CLI manages your session history in your
119
+ `settings.json` file. These settings let you control retention policies and
120
+ session lengths.
121
+
122
+ ### Session retention
123
+
124
+ By default, Gemini CLI automatically cleans up old session data to prevent your
125
+ history from growing indefinitely. When a session is deleted, Gemini CLI also
126
+ removes all associated data, including implementation plans, task trackers, tool
127
+ outputs, and activity logs.
128
+
129
+ The default policy is to **retain sessions for 30 days**.
130
+
131
+ #### Configuration
132
+
133
+ You can customize these policies using the `/settings` command or by manually
134
+ editing your `settings.json` file:
135
+
136
+ ```json
137
+ {
138
+ "general": {
139
+ "sessionRetention": {
140
+ "enabled": true,
141
+ "maxAge": "30d",
142
+ "maxCount": 50
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ - **`enabled`**: (boolean) Master switch for session cleanup. Defaults to
149
+ `true`.
150
+ - **`maxAge`**: (string) Duration to keep sessions (for example, "24h", "7d",
151
+ "4w"). Sessions older than this are deleted. Defaults to `"30d"`.
152
+ - **`maxCount`**: (number) Maximum number of sessions to retain. The oldest
153
+ sessions exceeding this count are deleted. Defaults to undefined (unlimited).
154
+ - **`minRetention`**: (string) Minimum retention period (safety limit). Defaults
155
+ to `"1d"`. Sessions newer than this period are never deleted by automatic
156
+ cleanup.
157
+
158
+ ### Session limits
159
+
160
+ You can limit the length of individual sessions to prevent context windows from
161
+ becoming too large and expensive.
162
+
163
+ ```json
164
+ {
165
+ "model": {
166
+ "maxSessionTurns": 100
167
+ }
168
+ }
169
+ ```
170
+
171
+ - **`maxSessionTurns`**: (number) The maximum number of turns (user and model
172
+ exchanges) allowed in a single session. Set to `-1` for unlimited (default).
173
+
174
+ **Behavior when limit is reached:**
175
+ - **Interactive mode:** The CLI shows an informational message and stops
176
+ sending requests to the model. You must manually start a new session.
177
+ - **Non-interactive mode:** The CLI exits with an error.
178
+
179
+ ## Next steps
180
+
181
+ - Explore the [Memory tool](../tools/memory.md) to save persistent information
182
+ across sessions.
183
+ - Learn how to [Checkpoint](./checkpointing.md) your session state.
184
+ - Check out the [CLI reference](./cli-reference.md) for all command-line flags.
@@ -0,0 +1,165 @@
1
+ # Gemini CLI settings (`/settings` command)
2
+
3
+ Control your Gemini CLI experience with the `/settings` command. The `/settings`
4
+ command opens a dialog to view and edit all your Gemini CLI settings, including
5
+ your UI experience, keybindings, and accessibility features.
6
+
7
+ Your Gemini CLI settings are stored in a `settings.json` file. In addition to
8
+ using the `/settings` command, you can also edit them in one of the following
9
+ locations:
10
+
11
+ - **User settings**: `~/.gemini/settings.json`
12
+ - **Workspace settings**: `your-project/.gemini/settings.json`
13
+
14
+ Note: Workspace settings override user settings.
15
+
16
+ ## Settings reference
17
+
18
+ Here is a list of all the available settings, grouped by category and ordered as
19
+ they appear in the UI.
20
+
21
+ <!-- SETTINGS-AUTOGEN:START -->
22
+
23
+ ### General
24
+
25
+ | UI Label | Setting | Description | Default |
26
+ | ----------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
27
+ | Vim Mode | `general.vimMode` | Enable Vim keybindings | `false` |
28
+ | Default Approval Mode | `general.defaultApprovalMode` | The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. 'yolo' is not supported yet. | `"default"` |
29
+ | Enable Auto Update | `general.enableAutoUpdate` | Enable automatic updates. | `true` |
30
+ | Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. Currently macOS only. | `false` |
31
+ | Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. | `undefined` |
32
+ | Plan Model Routing | `general.plan.modelRouting` | Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pro for the planning phase and Flash for the implementation phase. | `true` |
33
+ | Max Chat Model Attempts | `general.maxAttempts` | Maximum number of attempts for requests to the main chat model. Cannot exceed 10. | `10` |
34
+ | Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |
35
+ | Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `true` |
36
+ | Keep chat history | `general.sessionRetention.maxAge` | Automatically delete chats older than this time period (e.g., "30d", "7d", "24h", "1w") | `"30d"` |
37
+
38
+ ### Output
39
+
40
+ | UI Label | Setting | Description | Default |
41
+ | ------------- | --------------- | ------------------------------------------------------ | -------- |
42
+ | Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `"text"` |
43
+
44
+ ### UI
45
+
46
+ | UI Label | Setting | Description | Default |
47
+ | ------------------------------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
48
+ | Auto Theme Switching | `ui.autoThemeSwitching` | Automatically switch between default light and dark themes based on terminal background color. | `true` |
49
+ | Terminal Background Polling Interval | `ui.terminalBackgroundPollingInterval` | Interval in seconds to poll the terminal background color. | `60` |
50
+ | Hide Window Title | `ui.hideWindowTitle` | Hide the window title bar | `false` |
51
+ | Inline Thinking | `ui.inlineThinkingMode` | Display model thinking inline: off or full. | `"off"` |
52
+ | Show Thoughts in Title | `ui.showStatusInTitle` | Show Gemini CLI model thoughts in the terminal window title during the working phase | `false` |
53
+ | Dynamic Window Title | `ui.dynamicWindowTitle` | Update the terminal window title with current status icons (Ready: ◇, Action Required: ✋, Working: ✦) | `true` |
54
+ | Show Home Directory Warning | `ui.showHomeDirectoryWarning` | Show a warning when running Gemini CLI in the home directory. | `true` |
55
+ | Show Compatibility Warnings | `ui.showCompatibilityWarnings` | Show warnings about terminal or OS compatibility issues. | `true` |
56
+ | Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `false` |
57
+ | Show Shortcuts Hint | `ui.showShortcutsHint` | Show the "? for shortcuts" hint above the input. | `true` |
58
+ | Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |
59
+ | Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |
60
+ | Hide CWD | `ui.footer.hideCWD` | Hide the current working directory in the footer. | `false` |
61
+ | Hide Sandbox Status | `ui.footer.hideSandboxStatus` | Hide the sandbox status indicator in the footer. | `false` |
62
+ | Hide Model Info | `ui.footer.hideModelInfo` | Hide the model name and context usage in the footer. | `false` |
63
+ | Hide Context Window Percentage | `ui.footer.hideContextPercentage` | Hides the context window usage percentage. | `true` |
64
+ | Hide Footer | `ui.hideFooter` | Hide the footer from the UI | `false` |
65
+ | Show Memory Usage | `ui.showMemoryUsage` | Display memory usage information in the UI | `false` |
66
+ | Show Line Numbers | `ui.showLineNumbers` | Show line numbers in the chat. | `true` |
67
+ | Show Citations | `ui.showCitations` | Show citations for generated text in the chat. | `false` |
68
+ | Show Model Info In Chat | `ui.showModelInfoInChat` | Show the model name in the chat for each model turn. | `false` |
69
+ | Show User Identity | `ui.showUserIdentity` | Show the logged-in user's identity (e.g. email) in the UI. | `true` |
70
+ | Use Alternate Screen Buffer | `ui.useAlternateBuffer` | Use an alternate screen buffer for the UI, preserving shell history. | `false` |
71
+ | Use Background Color | `ui.useBackgroundColor` | Whether to use background colors in the UI. | `true` |
72
+ | Incremental Rendering | `ui.incrementalRendering` | Enable incremental rendering for the UI. This option will reduce flickering but may cause rendering artifacts. Only supported when useAlternateBuffer is enabled. | `true` |
73
+ | Show Spinner | `ui.showSpinner` | Show the spinner during operations. | `true` |
74
+ | Loading Phrases | `ui.loadingPhrases` | What to show while the model is working: tips, witty comments, both, or nothing. | `"tips"` |
75
+ | Error Verbosity | `ui.errorVerbosity` | Controls whether recoverable errors are hidden (low) or fully shown (full). | `"low"` |
76
+ | Screen Reader Mode | `ui.accessibility.screenReader` | Render output in plain-text to be more screen reader accessible | `false` |
77
+
78
+ ### IDE
79
+
80
+ | UI Label | Setting | Description | Default |
81
+ | -------- | ------------- | ---------------------------- | ------- |
82
+ | IDE Mode | `ide.enabled` | Enable IDE integration mode. | `false` |
83
+
84
+ ### Billing
85
+
86
+ | UI Label | Setting | Description | Default |
87
+ | ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
88
+ | Overage Strategy | `billing.overageStrategy` | How to handle quota exhaustion when AI credits are available. 'ask' prompts each time, 'always' automatically uses credits, 'never' disables credit usage. | `"ask"` |
89
+
90
+ ### Model
91
+
92
+ | UI Label | Setting | Description | Default |
93
+ | ----------------------------- | ---------------------------- | -------------------------------------------------------------------------------------- | ----------- |
94
+ | Model | `model.name` | The Gemini model to use for conversations. | `undefined` |
95
+ | Max Session Turns | `model.maxSessionTurns` | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited. | `-1` |
96
+ | Context Compression Threshold | `model.compressionThreshold` | The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3). | `0.5` |
97
+ | Disable Loop Detection | `model.disableLoopDetection` | Disable automatic detection and prevention of infinite loops. | `false` |
98
+ | Skip Next Speaker Check | `model.skipNextSpeakerCheck` | Skip the next speaker check. | `true` |
99
+
100
+ ### Context
101
+
102
+ | UI Label | Setting | Description | Default |
103
+ | ------------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
104
+ | Memory Discovery Max Dirs | `context.discoveryMaxDirs` | Maximum number of directories to search for memory. | `200` |
105
+ | Load Memory From Include Directories | `context.loadMemoryFromIncludeDirectories` | Controls how /memory refresh loads GEMINI.md files. When true, include directories are scanned; when false, only the current directory is used. | `false` |
106
+ | Respect .gitignore | `context.fileFiltering.respectGitIgnore` | Respect .gitignore files when searching. | `true` |
107
+ | Respect .geminiignore | `context.fileFiltering.respectGeminiIgnore` | Respect .geminiignore files when searching. | `true` |
108
+ | Enable Recursive File Search | `context.fileFiltering.enableRecursiveFileSearch` | Enable recursive file search functionality when completing @ references in the prompt. | `true` |
109
+ | Enable Fuzzy Search | `context.fileFiltering.enableFuzzySearch` | Enable fuzzy search when searching for files. | `true` |
110
+ | Custom Ignore File Paths | `context.fileFiltering.customIgnoreFilePaths` | Additional ignore file paths to respect. These files take precedence over .geminiignore and .gitignore. Files earlier in the array take precedence over files later in the array, e.g. the first file takes precedence over the second one. | `[]` |
111
+
112
+ ### Tools
113
+
114
+ | UI Label | Setting | Description | Default |
115
+ | -------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
116
+ | Enable Interactive Shell | `tools.shell.enableInteractiveShell` | Use node-pty for an interactive shell experience. Fallback to child_process still applies. | `true` |
117
+ | Show Color | `tools.shell.showColor` | Show color in shell output. | `false` |
118
+ | Use Ripgrep | `tools.useRipgrep` | Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance. | `true` |
119
+ | Tool Output Truncation Threshold | `tools.truncateToolOutputThreshold` | Maximum characters to show when truncating large tool outputs. Set to 0 or negative to disable truncation. | `40000` |
120
+ | Disable LLM Correction | `tools.disableLLMCorrection` | Disable LLM-based error correction for edit tools. When enabled, tools will fail immediately if exact string matches are not found, instead of attempting to self-correct. | `true` |
121
+
122
+ ### Security
123
+
124
+ | UI Label | Setting | Description | Default |
125
+ | ------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
126
+ | Disable YOLO Mode | `security.disableYoloMode` | Disable YOLO mode, even if enabled by a flag. | `false` |
127
+ | Allow Permanent Tool Approval | `security.enablePermanentToolApproval` | Enable the "Allow for all future sessions" option in tool confirmation dialogs. | `false` |
128
+ | Blocks extensions from Git | `security.blockGitExtensions` | Blocks installing and loading extensions from Git. | `false` |
129
+ | Extension Source Regex Allowlist | `security.allowedExtensions` | List of Regex patterns for allowed extensions. If nonempty, only extensions that match the patterns in this list are allowed. Overrides the blockGitExtensions setting. | `[]` |
130
+ | Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` |
131
+ | Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` |
132
+ | Enable Context-Aware Security | `security.enableConseca` | Enable the context-aware security checker. This feature uses an LLM to dynamically generate and enforce security policies for tool use based on your prompt, providing an additional layer of protection against unintended actions. | `false` |
133
+
134
+ ### Advanced
135
+
136
+ | UI Label | Setting | Description | Default |
137
+ | --------------------------------- | ------------------------------ | --------------------------------------------- | ------- |
138
+ | Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `false` |
139
+
140
+ ### Experimental
141
+
142
+ | UI Label | Setting | Description | Default |
143
+ | -------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
144
+ | Enable Tool Output Masking | `experimental.toolOutputMasking.enabled` | Enables tool output masking to save tokens. | `true` |
145
+ | Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
146
+ | Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
147
+ | Plan | `experimental.plan` | Enable planning features (Plan Mode and tools). | `false` |
148
+ | Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |
149
+ | Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |
150
+ | Enable Gemma Model Router | `experimental.gemmaModelRouter.enabled` | Enable the Gemma Model Router. Requires a local endpoint serving Gemma via the Gemini API using LiteRT-LM shim. | `false` |
151
+
152
+ ### Skills
153
+
154
+ | UI Label | Setting | Description | Default |
155
+ | ------------------- | ---------------- | -------------------- | ------- |
156
+ | Enable Agent Skills | `skills.enabled` | Enable Agent Skills. | `true` |
157
+
158
+ ### HooksConfig
159
+
160
+ | UI Label | Setting | Description | Default |
161
+ | ------------------ | --------------------------- | -------------------------------------------------------------------------------- | ------- |
162
+ | Enable Hooks | `hooksConfig.enabled` | Canonical toggle for the hooks system. When disabled, no hooks will be executed. | `true` |
163
+ | Hook Notifications | `hooksConfig.notifications` | Show visual indicators when hooks are executing. | `true` |
164
+
165
+ <!-- SETTINGS-AUTOGEN:END -->
@@ -0,0 +1,134 @@
1
+ # Agent Skills
2
+
3
+ Agent Skills allow you to extend Gemini CLI with specialized expertise,
4
+ procedural workflows, and task-specific resources. Based on the
5
+ [Agent Skills](https://agentskills.io) open standard, a "skill" is a
6
+ self-contained directory that packages instructions and assets into a
7
+ discoverable capability.
8
+
9
+ ## Overview
10
+
11
+ Unlike general context files ([`GEMINI.md`](./gemini-md.md)), which provide
12
+ persistent workspace-wide background, Skills represent **on-demand expertise**.
13
+ This allows Gemini to maintain a vast library of specialized capabilities—such
14
+ as security auditing, cloud deployments, or codebase migrations—without
15
+ cluttering the model's immediate context window.
16
+
17
+ Gemini autonomously decides when to employ a skill based on your request and the
18
+ skill's description. When a relevant skill is identified, the model "pulls in"
19
+ the full instructions and resources required to complete the task using the
20
+ `activate_skill` tool.
21
+
22
+ ## Key Benefits
23
+
24
+ - **Shared Expertise:** Package complex workflows (like a specific team's PR
25
+ review process) into a folder that anyone can use.
26
+ - **Repeatable Workflows:** Ensure complex multi-step tasks are performed
27
+ consistently by providing a procedural framework.
28
+ - **Resource Bundling:** Include scripts, templates, or example data alongside
29
+ instructions so the agent has everything it needs.
30
+ - **Progressive Disclosure:** Only skill metadata (name and description) is
31
+ loaded initially. Detailed instructions and resources are only disclosed when
32
+ the model explicitly activates the skill, saving context tokens.
33
+
34
+ ## Skill Discovery Tiers
35
+
36
+ Gemini CLI discovers skills from three primary locations:
37
+
38
+ 1. **Workspace Skills**: Located in `.gemini/skills/` or the `.agents/skills/`
39
+ alias. Workspace skills are typically committed to version control and
40
+ shared with the team.
41
+ 2. **User Skills**: Located in `~/.gemini/skills/` or the `~/.agents/skills/`
42
+ alias. These are personal skills available across all your workspaces.
43
+ 3. **Extension Skills**: Skills bundled within installed
44
+ [extensions](../extensions/index.md).
45
+
46
+ **Precedence:** If multiple skills share the same name, higher-precedence
47
+ locations override lower ones: **Workspace > User > Extension**.
48
+
49
+ Within the same tier (user or workspace), the `.agents/skills/` alias takes
50
+ precedence over the `.gemini/skills/` directory. This generic alias provides an
51
+ intuitive path for managing agent-specific expertise that remains compatible
52
+ across different AI agent tools.
53
+
54
+ ## Managing Skills
55
+
56
+ ### In an Interactive Session
57
+
58
+ Use the `/skills` slash command to view and manage available expertise:
59
+
60
+ - `/skills list` (default): Shows all discovered skills and their status.
61
+ - `/skills link <path>`: Links agent skills from a local directory via symlink.
62
+ - `/skills disable <name>`: Prevents a specific skill from being used.
63
+ - `/skills enable <name>`: Re-enables a disabled skill.
64
+ - `/skills reload`: Refreshes the list of discovered skills from all tiers.
65
+
66
+ _Note: `/skills disable` and `/skills enable` default to the `user` scope. Use
67
+ `--scope workspace` to manage workspace-specific settings._
68
+
69
+ ### From the Terminal
70
+
71
+ The `gemini skills` command provides management utilities:
72
+
73
+ ```bash
74
+ # List all discovered skills
75
+ gemini skills list
76
+
77
+ # Link agent skills from a local directory via symlink
78
+ # Discovers skills (SKILL.md or */SKILL.md) and creates symlinks in ~/.gemini/skills
79
+ # (or ~/.agents/skills)
80
+ gemini skills link /path/to/my-skills-repo
81
+
82
+ # Link to the workspace scope (.gemini/skills or .agents/skills)
83
+ gemini skills link /path/to/my-skills-repo --scope workspace
84
+
85
+ # Install a skill from a Git repository, local directory, or zipped skill file (.skill)
86
+ # Uses the user scope by default (~/.gemini/skills or ~/.agents/skills)
87
+ gemini skills install https://github.com/user/repo.git
88
+ gemini skills install /path/to/local/skill
89
+ gemini skills install /path/to/local/my-expertise.skill
90
+
91
+ # Install a specific skill from a monorepo or subdirectory using --path
92
+ gemini skills install https://github.com/my-org/my-skills.git --path skills/frontend-design
93
+
94
+ # Install to the workspace scope (.gemini/skills or .agents/skills)
95
+ gemini skills install /path/to/skill --scope workspace
96
+
97
+ # Uninstall a skill by name
98
+ gemini skills uninstall my-expertise --scope workspace
99
+
100
+ # Enable a skill (globally)
101
+ gemini skills enable my-expertise
102
+
103
+ # Disable a skill. Can use --scope to specify workspace or user (defaults to workspace)
104
+ gemini skills disable my-expertise --scope workspace
105
+ ```
106
+
107
+ ## How it Works
108
+
109
+ 1. **Discovery**: At the start of a session, Gemini CLI scans the discovery
110
+ tiers and injects the name and description of all enabled skills into the
111
+ system prompt.
112
+ 2. **Activation**: When Gemini identifies a task matching a skill's
113
+ description, it calls the `activate_skill` tool.
114
+ 3. **Consent**: You will see a confirmation prompt in the UI detailing the
115
+ skill's name, purpose, and the directory path it will gain access to.
116
+ 4. **Injection**: Upon your approval:
117
+ - The `SKILL.md` body and folder structure is added to the conversation
118
+ history.
119
+ - The skill's directory is added to the agent's allowed file paths, granting
120
+ it permission to read any bundled assets.
121
+ 5. **Execution**: The model proceeds with the specialized expertise active. It
122
+ is instructed to prioritize the skill's procedural guidance within reason.
123
+
124
+ ### Skill activation
125
+
126
+ Once a skill is activated (typically by Gemini identifying a task that matches
127
+ the skill's description and your approval), its specialized instructions and
128
+ resources are loaded into the agent's context. A skill remains active and its
129
+ guidance is prioritized for the duration of the session.
130
+
131
+ ## Creating your own skills
132
+
133
+ To create your own skills, see the [Create Agent Skills](./creating-skills.md)
134
+ guide.
@@ -0,0 +1,125 @@
1
+ # System Prompt Override (GEMINI_SYSTEM_MD)
2
+
3
+ The core system instructions that guide Gemini CLI can be completely replaced
4
+ with your own Markdown file. This feature is controlled via the
5
+ `GEMINI_SYSTEM_MD` environment variable.
6
+
7
+ ## Overview
8
+
9
+ The `GEMINI_SYSTEM_MD` variable instructs the CLI to use an external Markdown
10
+ file for its system prompt, completely overriding the built-in default. This is
11
+ a full replacement, not a merge. If you use a custom file, none of the original
12
+ core instructions will apply unless you include them yourself.
13
+
14
+ This feature is intended for advanced users who need to enforce strict,
15
+ project-specific behavior or create a customized persona.
16
+
17
+ > Tip: You can export the current default system prompt to a file first, review
18
+ > it, and then selectively modify or replace it (see
19
+ > [“Export the default prompt”](#export-the-default-prompt-recommended)).
20
+
21
+ ## How to enable
22
+
23
+ You can set the environment variable temporarily in your shell, or persist it
24
+ via a `.gemini/.env` file. See
25
+ [Persisting Environment Variables](../get-started/authentication.md#persisting-environment-variables).
26
+
27
+ - Use the project default path (`.gemini/system.md`):
28
+ - `GEMINI_SYSTEM_MD=true` or `GEMINI_SYSTEM_MD=1`
29
+ - The CLI reads `./.gemini/system.md` (relative to your current project
30
+ directory).
31
+
32
+ - Use a custom file path:
33
+ - `GEMINI_SYSTEM_MD=/absolute/path/to/my-system.md`
34
+ - Relative paths are supported and resolved from the current working
35
+ directory.
36
+ - Tilde expansion is supported (e.g., `~/my-system.md`).
37
+
38
+ - Disable the override (use built‑in prompt):
39
+ - `GEMINI_SYSTEM_MD=false` or `GEMINI_SYSTEM_MD=0` or unset the variable.
40
+
41
+ If the override is enabled but the target file does not exist, the CLI will
42
+ error with: `missing system prompt file '<path>'`.
43
+
44
+ ## Quick examples
45
+
46
+ - One‑off session using a project file:
47
+ - `GEMINI_SYSTEM_MD=1 gemini`
48
+ - Persist for a project using `.gemini/.env`:
49
+ - Create `.gemini/system.md`, then add to `.gemini/.env`:
50
+ - `GEMINI_SYSTEM_MD=1`
51
+ - Use a custom file under your home directory:
52
+ - `GEMINI_SYSTEM_MD=~/prompts/SYSTEM.md gemini`
53
+
54
+ ## UI indicator
55
+
56
+ When `GEMINI_SYSTEM_MD` is active, the CLI shows a `|⌐■_■|` indicator in the UI
57
+ to signal custom system‑prompt mode.
58
+
59
+ ## Variable Substitution
60
+
61
+ When using a custom system prompt file, you can use the following variables to
62
+ dynamically include built-in content:
63
+
64
+ - `${AgentSkills}`: Injects a complete section (including header) of all
65
+ available agent skills.
66
+ - `${SubAgents}`: Injects a complete section (including header) of available
67
+ sub-agents.
68
+ - `${AvailableTools}`: Injects a bulleted list of all currently enabled tool
69
+ names.
70
+ - Tool Name Variables: Injects the actual name of a tool using the pattern:
71
+ `${toolName}_ToolName` (e.g., `${write_file_ToolName}`,
72
+ `${run_shell_command_ToolName}`).
73
+
74
+ This pattern is generated dynamically for all available tools.
75
+
76
+ ### Example
77
+
78
+ ```markdown
79
+ # Custom System Prompt
80
+
81
+ You are a helpful assistant. ${AgentSkills}
82
+ ${SubAgents}
83
+
84
+ ## Tooling
85
+
86
+ The following tools are available to you: ${AvailableTools}
87
+
88
+ You can use ${write_file_ToolName} to save logs.
89
+ ```
90
+
91
+ ## Export the default prompt (recommended)
92
+
93
+ Before overriding, export the current default prompt so you can review required
94
+ safety and workflow rules.
95
+
96
+ - Write the built‑in prompt to the project default path:
97
+ - `GEMINI_WRITE_SYSTEM_MD=1 gemini`
98
+ - Or write to a custom path:
99
+ - `GEMINI_WRITE_SYSTEM_MD=~/prompts/DEFAULT_SYSTEM.md gemini`
100
+
101
+ This creates the file and writes the current built‑in system prompt to it.
102
+
103
+ ## Best practices: SYSTEM.md vs GEMINI.md
104
+
105
+ - SYSTEM.md (firmware):
106
+ - Non‑negotiable operational rules: safety, tool‑use protocols, approvals, and
107
+ mechanics that keep the CLI reliable.
108
+ - Stable across tasks and projects (or per project when needed).
109
+ - GEMINI.md (strategy):
110
+ - Persona, goals, methodologies, and project/domain context.
111
+ - Evolves per task; relies on SYSTEM.md for safe execution.
112
+
113
+ Keep SYSTEM.md minimal but complete for safety and tool operation. Keep
114
+ GEMINI.md focused on high‑level guidance and project specifics.
115
+
116
+ ## Troubleshooting
117
+
118
+ - Error: `missing system prompt file '…'`
119
+ - Ensure the referenced path exists and is readable.
120
+ - For `GEMINI_SYSTEM_MD=1|true`, create `./.gemini/system.md` in your project.
121
+ - Override not taking effect
122
+ - Confirm the variable is loaded (use `.gemini/.env` or export in your shell).
123
+ - Paths are resolved from the current working directory; try an absolute path.
124
+ - Restore defaults
125
+ - Unset `GEMINI_SYSTEM_MD` or set it to `0`/`false`.