Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6800776
fix(docs): fix headless mode docs (#21287)
ame2en Mar 9, 2026
e406dcc
feat/redesign header compact (#20922)
jacob314 Mar 9, 2026
ab64b15
refactor: migrate to useKeyMatchers hook (#21753)
scidomino Mar 9, 2026
1fd4280
perf(cli): cache loadSettings to reduce redundant disk I/O at startup…
sehoon38 Mar 9, 2026
f88488d
fix(core): resolve Windows line ending and path separation bugs acros…
muhammadusman586 Mar 9, 2026
b89944c
docs: fix heading formatting in commands.md and phrasing in tools-api…
campox747 Mar 9, 2026
215f8f3
refactor(ui): unify keybinding infrastructure and support string init…
scidomino Mar 9, 2026
43eb74a
Add support for updating extension sources and names (#21715)
chrstnb Mar 9, 2026
1e1e7e3
fix(core): handle GUI editor non-zero exit codes gracefully (#20376)
reyyanxahmed Mar 9, 2026
4653b12
fix(core): destroy PTY on kill() and exception to prevent fd leak (#2…
nbardy Mar 10, 2026
ec7773e
fix(docs): update theme screenshots and add missing themes (#20689)
ashmod Mar 10, 2026
380fdbf
Include available sessions in error when --resume gets invalid ID
Zahed-Riyaz Mar 10, 2026
323eb61
test(session): add tests for invalid session identifier error message
Zahed-Riyaz Mar 10, 2026
594e493
Omit issue description files
Zahed-Riyaz Mar 10, 2026
05c7c2c
Merge branch 'main' into invalid-sessions
Zahed-Riyaz Mar 10, 2026
db6c5d2
fix(session): use cpLen/cpSlice for Unicode-safe display name truncation
Zahed-Riyaz Mar 10, 2026
18ea580
fix(session): show most-recent sessions in --resume error, clean up t…
Zahed-Riyaz Mar 10, 2026
14412c3
refactor(cli): rename 'return' key to 'enter' internally (#21796)
scidomino Mar 10, 2026
c25ff94
build(release): restrict npm bundling to non-stable tags (#21821)
sehoon38 Mar 10, 2026
02d4451
fix(core): override toolRegistry property for sub-agent schedulers (#…
gsquared94 Mar 10, 2026
6ae6c81
fix(cli): make footer items equally spaced (#21843)
jacob314 Mar 10, 2026
a6b9589
docs: clarify global policy rules application in plan mode (#21864)
jerop Mar 10, 2026
5dd2dab
fix(core): ensure correct flash model steering in plan mode implement…
jerop Mar 10, 2026
f9fc830
fix(core): update @a2a-js/sdk to 0.3.11 (#21875)
adamfweidman Mar 10, 2026
0486a16
refactor(core): improve API response error logging when retry (#21784)
yunaseoul Mar 10, 2026
94ab449
fix(core): treat retryable errors with >5 min delay as terminal quota…
gsquared94 Mar 10, 2026
47e4f6b
fix(ui): handle headless execution in credits and upgrade dialogs (#2…
gsquared94 Mar 10, 2026
e91f86c
feat(telemetry): add specific PR, issue, and custom tracking IDs for …
cocosheng-g Mar 10, 2026
b158c96
feat(core): add OAuth2 Authorization Code auth provider for A2A agent…
SandyTao520 Mar 10, 2026
556825f
feat(cli): give visibility to /tools list command in the TUI and foll…
JayadityaGit Mar 10, 2026
49ea9b0
Handle dirty worktrees better and warn about running scripts/review.s…
jacob314 Mar 10, 2026
a220874
feat(policy): support auto-add to policy by default and scoped persis…
spencer426 Mar 10, 2026
0b78de9
fix(core): handle AbortError when ESC cancels tool execution (#20863)
PrasannaPal21 Mar 10, 2026
80cf2fe
fix(release): Improve Patch Release Workflow Comments: Clearer Approv…
jerop Mar 10, 2026
18112c4
docs: clarify telemetry setup and comprehensive data map (#21879)
jerop Mar 10, 2026
4da0366
feat(core): add per-model token usage to stream-json output (#21839)
yongruilin Mar 10, 2026
13f78bd
docs: remove experimental badge from plan mode in sidebar (#21906)
jerop Mar 10, 2026
7aae543
fix(cli): prevent race condition in loop detection retry (#17916)
skyvanguard Mar 10, 2026
2dd0376
Add behavioral evals for tracker (#20069)
anj-s Mar 10, 2026
d03e324
Merge branch 'main' into invalid-sessions
Zahed-Riyaz Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gemini/commands/strict-development-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Gemini CLI project.
set.
- **Logging**: Use `debugLogger` for rethrown errors to avoid duplicate logging.
- **Keyboard Shortcuts**: Define all new keyboard shortcuts in
`packages/cli/src/config/keyBindings.ts` and document them in
`packages/cli/src/ui/key/keyBindings.ts` and document them in
`docs/cli/keyboard-shortcuts.md`. Be careful of keybindings that require the
`Meta` key, as only certain meta key shortcuts are supported on Mac. Avoid
function keys and shortcuts commonly bound in VSCode.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/publish-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ runs:
INPUTS_A2A_PACKAGE_NAME: '${{ inputs.a2a-package-name }}'

- name: '📦 Prepare bundled CLI for npm release'
if: "inputs.npm-registry-url != 'https://npm.pkg.github.com/'"
if: "inputs.npm-registry-url != 'https://npm.pkg.github.com/' && inputs.npm-tag != 'latest'"
working-directory: '${{ inputs.working-directory }}'
shell: 'bash'
run: |
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/release-patch-0-from-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ jobs:
if (recentRuns.length > 0) {
core.setOutput('dispatched_run_urls', recentRuns.map(r => r.html_url).join(','));
core.setOutput('dispatched_run_ids', recentRuns.map(r => r.id).join(','));
const markdownLinks = recentRuns.map(r => `- [View dispatched workflow run](${r.html_url})`).join('\n');
core.setOutput('dispatched_run_links', markdownLinks);
}
- name: 'Comment on Failure'
Expand All @@ -138,16 +141,19 @@ jobs:
token: '${{ secrets.GITHUB_TOKEN }}'
issue-number: '${{ github.event.issue.number }}'
body: |
**Patch workflow(s) dispatched successfully!**
🚀 **[Step 1/4] Patch workflow(s) waiting for approval!**
**📋 Details:**
- **Channels**: `${{ steps.dispatch_patch.outputs.dispatched_channels }}`
- **Commit**: `${{ steps.pr_status.outputs.MERGE_COMMIT_SHA }}`
- **Workflows Created**: ${{ steps.dispatch_patch.outputs.dispatched_run_count }}
**⏳ Status:** The patch creation workflow has been triggered and is waiting for deployment approval. Please visit the specific workflow links below and approve the runs.
**🔗 Track Progress:**
- [View patch workflows](https://github.com/${{ github.repository }}/actions/workflows/release-patch-1-create-pr.yml)
- [This workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
${{ steps.dispatch_patch.outputs.dispatched_run_links }}
- [View patch workflow history](https://github.com/${{ github.repository }}/actions/workflows/release-patch-1-create-pr.yml)
- [This trigger workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- name: 'Final Status Comment - Dispatch Success (No URL)'
if: "always() && startsWith(github.event.comment.body, '/patch') && steps.dispatch_patch.outcome == 'success' && !steps.dispatch_patch.outputs.dispatched_run_urls"
Expand All @@ -156,16 +162,18 @@ jobs:
token: '${{ secrets.GITHUB_TOKEN }}'
issue-number: '${{ github.event.issue.number }}'
body: |
**Patch workflow(s) dispatched successfully!**
🚀 **[Step 1/4] Patch workflow(s) waiting for approval!**
**📋 Details:**
- **Channels**: `${{ steps.dispatch_patch.outputs.dispatched_channels }}`
- **Commit**: `${{ steps.pr_status.outputs.MERGE_COMMIT_SHA }}`
- **Workflows Created**: ${{ steps.dispatch_patch.outputs.dispatched_run_count }}
**⏳ Status:** The patch creation workflow has been triggered and is waiting for deployment approval. Please visit the workflow history link below and approve the runs.
**🔗 Track Progress:**
- [View patch workflows](https://github.com/${{ github.repository }}/actions/workflows/release-patch-1-create-pr.yml)
- [This workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- [View patch workflow history](https://github.com/${{ github.repository }}/actions/workflows/release-patch-1-create-pr.yml)
- [This trigger workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- name: 'Final Status Comment - Failure'
if: "always() && startsWith(github.event.comment.body, '/patch') && (steps.dispatch_patch.outcome == 'failure' || steps.dispatch_patch.outcome == 'cancelled')"
Expand All @@ -174,7 +182,7 @@ jobs:
token: '${{ secrets.GITHUB_TOKEN }}'
issue-number: '${{ github.event.issue.number }}'
body: |
❌ **Patch workflow dispatch failed!**
❌ **[Step 1/4] Patch workflow dispatch failed!**
There was an error dispatching the patch creation workflow.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ gemini-debug.log
.gemini-clipboard/
.eslintcache
evals/logs/

temp_agents/
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ You can run the review tool in two ways:
./scripts/review.sh <PR_NUMBER> [model]
```

**Warning:** If you run `scripts/review.sh`, you must have first verified
that the code for the PR being reviewed is safe to run and does not contain
data exfiltration attacks.

**Authors are strongly encouraged to run this script on their own PRs**
immediately after creation. This allows you to catch and fix simple issues
locally before a maintainer performs a full review.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![License](https://img.shields.io/github/license/google-gemini/gemini-cli)](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
[![View Code Wiki](https://assets.codewiki.google/readme-badge/static.svg)](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)

![Gemini CLI Screenshot](./docs/assets/gemini-screenshot.png)
![Gemini CLI Screenshot](/docs/assets/gemini-screenshot.png)

Gemini CLI is an open-source AI agent that brings the power of Gemini directly
into your terminal. It provides lightweight access to Gemini, giving you the
Expand Down
Binary file added docs/assets/theme-ansi-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/theme-ansi-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-ansi.png
Binary file not shown.
Binary file added docs/assets/theme-atom-one-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-atom-one.png
Binary file not shown.
Binary file added docs/assets/theme-ayu-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/theme-ayu-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-ayu.png
Binary file not shown.
Binary file added docs/assets/theme-default-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/theme-default-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-default.png
Binary file not shown.
Binary file added docs/assets/theme-dracula-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-dracula.png
Binary file not shown.
Binary file added docs/assets/theme-github-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/theme-github-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/theme-github.png
Binary file not shown.
Binary file modified docs/assets/theme-google-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/theme-holiday-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/theme-shades-of-purple-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/theme-solarized-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/theme-solarized-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/theme-xcode-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions docs/cli/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and parameters.
| Command | Description | Example |
| ---------------------------------- | ---------------------------------- | ------------------------------------------------------------ |
| `gemini` | Start interactive REPL | `gemini` |
| `gemini "query"` | Query non-interactively, then exit | `gemini "explain this project"` |
| `gemini -p "query"` | Query non-interactively | `gemini -p "summarize README.md"` |
| `gemini "query"` | Query and continue interactively | `gemini "explain this project"` |
| `cat file \| gemini` | Process piped content | `cat logs.txt \| gemini`<br>`Get-Content logs.txt \| gemini` |
| `gemini -i "query"` | Execute and continue interactively | `gemini -i "What is the purpose of this project?"` |
| `gemini -r "latest"` | Continue most recent session | `gemini -r "latest"` |
Expand All @@ -20,9 +21,9 @@ and parameters.

### Positional arguments

| Argument | Type | Description |
| -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------ |
| `query` | string (variadic) | Positional prompt. Defaults to one-shot mode. Use `-i/--prompt-interactive` to execute and continue interactively. |
| Argument | Type | Description |
| -------- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
| `query` | string (variadic) | Positional prompt. Defaults to interactive mode in a TTY. Use `-p/--prompt` for non-interactive execution. |

## Interactive commands

Expand All @@ -47,7 +48,7 @@ These commands are available within the interactive REPL.
| `--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` | `-p` | string | - | Prompt text. Appended to stdin input if provided. Forces non-interactive mode. |
| `--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` |
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/headless.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ structured text or JSON output without an interactive terminal UI.
## Technical reference

Headless mode is triggered when the CLI is run in a non-TTY environment or when
providing a query as a positional argument without the interactive flag.
providing a query with the `-p` (or `--prompt`) flag.

### Output formats

Expand Down
21 changes: 21 additions & 0 deletions docs/cli/plan-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,27 @@ Plan Mode's default tool restrictions are managed by the
but you can customize these rules by creating your own policies in your
`~/.gemini/policies/` directory (Tier 2).

#### Global vs. mode-specific rules

As described in the
[policy engine documentation](../reference/policy-engine.md#approval-modes), any
rule that does not explicitly specify `modes` is considered "always active" and
will apply to Plan Mode as well.

If you want a rule to apply to other modes but _not_ to Plan Mode, you must
explicitly specify the target modes. For example, to allow `npm test` in default
and Auto-Edit modes but not in Plan Mode:

```toml
[[rule]]
toolName = "run_shell_command"
commandPrefix = "npm test"
decision = "allow"
priority = 100
# By omitting "plan", this rule will not be active in Plan Mode.
modes = ["default", "autoEdit"]
```

#### Example: Automatically approve read-only MCP tools

By default, read-only MCP tools require user confirmation in Plan Mode. You can
Expand Down
1 change: 1 addition & 0 deletions docs/cli/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ they appear in the UI.
| ------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| Disable YOLO Mode | `security.disableYoloMode` | Disable YOLO mode, even if enabled by a flag. | `false` |
| Allow Permanent Tool Approval | `security.enablePermanentToolApproval` | Enable the "Allow for all future sessions" option in tool confirmation dialogs. | `false` |
| Auto-add to Policy by Default | `security.autoAddToPolicyByDefault` | When enabled, the "Allow for all future sessions" option becomes the default choice for low-risk tools in trusted workspaces. | `false` |
| Blocks extensions from Git | `security.blockGitExtensions` | Blocks installing and loading extensions from Git. | `false` |
| 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. | `[]` |
| Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` |
Expand Down
Loading