Skip to content

feat(extensions): add programmatic search command#22586

Open
mattKorwel wants to merge 2 commits intomainfrom
mk-extenstions-programatic
Open

feat(extensions): add programmatic search command#22586
mattKorwel wants to merge 2 commits intomainfrom
mk-extenstions-programatic

Conversation

@mattKorwel
Copy link
Copy Markdown
Collaborator

Summary

This PR introduces programmatic extension searching and discovery directly within the Gemini CLI, while preserving the visual gallery exploration via the browser.

Details

  • Programmatic Search: Added /extensions search <query> command to both ACP and interactive UI. This command fetches the live registry from https://geminicli.com/extensions.json and performs fuzzy matching.
  • Restored Explore: Restored /extensions explore to its original purpose of opening the visual extension gallery in the default browser.
  • Improved Metadata: Search results now include capability tags (e.g., [MCP, Skills, Hooks]) and direct installation commands.
  • Search Robustness: Updated the ExtensionRegistryClient fuzzy search selector to include repoDescription. This ensures terms like "tmux" (which might only appear in the repo description) are correctly identified.
  • Fallback Logic: Implemented description fallback logic to use repoDescription when extensionDescription is empty, ensuring consistency with the website gallery.
  • Agent Guidance: Updated the root GEMINI.md with an "Extension Management" section to guide agents on proactively searching and installing extensions for missing capabilities.

Related Issues

N/A

How to Validate

  1. Build the project:
    npm run build
  2. Test browser opening:
    Run /extensions explore. It should open https://geminicli.com/extensions/ in your browser.
  3. Test programmatic listing:
    Run /extensions search. It should display the top 10 ranked extensions.
  4. Test specific query:
    Run /extensions search tmux. It should return 3 results (self-command, run-long-command, and gemini-sleep), correctly matching against the repository descriptions.
  5. Run automated tests:
    npm test -w @google/gemini-cli -- src/acp/commands/extensions.test.ts

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt

@mattKorwel mattKorwel requested review from a team as code owners March 16, 2026 00:25
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Gemini CLI's extension management capabilities by introducing programmatic search functionality, making it easier for users to discover and install extensions directly from the command line. It also refines the existing exploration command to provide a more intuitive browser-based experience. Concurrently, the PR improves internal maintainer tooling by establishing a high-performance remote offload system, complete with Docker images and onboarding documentation, streamlining development and review processes.

Highlights

  • Programmatic Extension Search: Introduced a new /extensions search <query> command for the Gemini CLI, allowing users to programmatically find extensions from the registry with fuzzy matching capabilities.
  • Enhanced Extension Exploration: The /extensions explore command was updated to open the visual extension gallery directly in the user's default browser, restoring its original purpose.
  • Improved Search Results and Robustness: Search results now include capability tags (e.g., [MCP, Skills]) and direct installation commands. The fuzzy search mechanism was also enhanced to include repository descriptions (repoDescription) for better discoverability.
  • Maintainer Tooling and Onboarding: Added new Dockerfile and Cloud Build configurations for a maintainer development environment, along with a dedicated onboarding guide and related npm scripts to streamline development.
  • Documentation Updates: Updated GEMINI.md with a new 'Extension Management' section to guide agents on proactively searching and installing extensions for missing capabilities.
Changelog
  • .gcp/Dockerfile.maintainer
    • Added a Dockerfile for a maintainer development environment, including essential tools and global npm packages.
  • .gcp/maintainer-worker.yml
    • Added a Cloud Build configuration for building and pushing the maintainer Docker image.
  • CONTRIBUTING.md
    • Updated contribution guidelines to reference the new maintainer onboarding guide.
  • GEMINI.md
    • Added a new 'Extension Management' section, providing guidance on using extension commands.
  • MAINTAINER_ONBOARDING.md
    • Added a comprehensive guide for maintainers to set up a remote offload development environment.
  • package-lock.json
    • Removed 'peer: true' from several dependency entries, resolving potential dependency conflicts.
  • package.json
    • Added new npm scripts for managing the maintainer offload system, such as offload:setup and offload:fleet.
  • packages/cli/src/acp/commands/extensions.test.ts
    • Added unit tests for the new SearchExtensionsCommand to ensure its functionality.
  • packages/cli/src/acp/commands/extensions.ts
    • Implemented the SearchExtensionsCommand and modified ExploreExtensionsCommand to open a browser for the visual gallery.
  • packages/cli/src/config/extensionRegistryClient.ts
    • Updated the fuzzy search selector to include repoDescription for improved matching accuracy.
  • packages/cli/src/ui/commands/extensionsCommand.ts
    • Integrated the new search command and adjusted the explore command for the interactive UI.
  • scripts/tests/vitest.config.ts
    • Updated the Vitest configuration to include test files from the new .gemini/skills directory.
Ignored Files
  • Ignored by pattern: .gemini/** (36)
    • .gemini/settings.json
    • .gemini/skills/async-pr-review/SKILL.md
    • .gemini/skills/async-pr-review/scripts/async-review.sh
    • .gemini/skills/async-pr-review/scripts/check-async-review.sh
    • .gemini/skills/fix-pr/README.md
    • .gemini/skills/fix-pr/SKILL.md
    • .gemini/skills/fix-pr/scripts/wait-for-ci.ts
    • .gemini/skills/offload/GEMINI.md
    • .gemini/skills/offload/NEXT_MISSION.md
    • .gemini/skills/offload/README.md
    • .gemini/skills/offload/SKILL.md
    • .gemini/skills/offload/policy.toml
    • .gemini/skills/offload/scripts/TaskRunner.ts
    • .gemini/skills/offload/scripts/attach.ts
    • .gemini/skills/offload/scripts/check.ts
    • .gemini/skills/offload/scripts/clean.ts
    • .gemini/skills/offload/scripts/entrypoint.ts
    • .gemini/skills/offload/scripts/fleet.ts
    • .gemini/skills/offload/scripts/logs.ts
    • .gemini/skills/offload/scripts/orchestrator.ts
    • .gemini/skills/offload/scripts/playbooks/fix.ts
    • .gemini/skills/offload/scripts/playbooks/implement.ts
    • .gemini/skills/offload/scripts/playbooks/ready.ts
    • .gemini/skills/offload/scripts/playbooks/review.ts
    • .gemini/skills/offload/scripts/provision-worker.sh
    • .gemini/skills/offload/scripts/setup.ts
    • .gemini/skills/offload/scripts/status.ts
    • .gemini/skills/offload/scripts/worker.ts
    • .gemini/skills/offload/tests/matrix.test.ts
    • .gemini/skills/offload/tests/orchestration.test.ts
    • .gemini/skills/offload/tests/playbooks/fix.test.ts
    • .gemini/skills/offload/tests/playbooks/ready.test.ts
    • .gemini/skills/offload/tests/playbooks/review.test.ts
    • .gemini/skills/review-pr/README.md
    • .gemini/skills/review-pr/SKILL.md
    • .gemini/skills/review-pr/scripts/extract-failures.ts
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/offload-image-update.yml
Activity
  • No human activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

Size Change: +4.33 kB (+0.02%)

Total Size: 26.1 MB

Filename Size Change
./bundle/chunk-IPNGUQEU.js 0 B -13.4 MB (removed) 🏆
./bundle/chunk-V6WMSUEI.js 0 B -3.62 MB (removed) 🏆
./bundle/core-U5XUMPRG.js 0 B -40.3 kB (removed) 🏆
./bundle/devtoolsService-ZJMCF3KF.js 0 B -27.7 kB (removed) 🏆
./bundle/gemini.js 697 kB +2.15 kB (+0.31%)
./bundle/interactiveCli-EUOWJMPS.js 0 B -1.59 MB (removed) 🏆
./bundle/oauth2-provider-22UOHOOO.js 0 B -9.19 kB (removed) 🏆
./bundle/chunk-AFJ3QTJE.js 3.62 MB +3.62 MB (new file) 🆕
./bundle/chunk-BLR3GLL7.js 13.4 MB +13.4 MB (new file) 🆕
./bundle/core-MVTSD33S.js 40.3 kB +40.3 kB (new file) 🆕
./bundle/devtoolsService-CNDTFR4C.js 27.7 kB +27.7 kB (new file) 🆕
./bundle/interactiveCli-G7RSLRHI.js 1.59 MB +1.59 MB (new file) 🆕
./bundle/oauth2-provider-EDNF2EXC.js 9.19 kB +9.19 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
./bundle/chunk-34MYV7JD.js 2.45 kB
./bundle/chunk-37ZTTFQF.js 966 kB
./bundle/chunk-5AUYMPVF.js 858 B
./bundle/chunk-664ZODQF.js 124 kB
./bundle/chunk-DAHVX5MI.js 206 kB
./bundle/chunk-IUUIT4SU.js 56.5 kB
./bundle/chunk-RJTRUG2J.js 39.8 kB
./bundle/chunk-VN2KBIC6.js 1.95 MB
./bundle/devtools-36NN55EP.js 696 kB
./bundle/dist-T73EYRDX.js 356 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB
./bundle/memoryDiscovery-A4UZQ6IE.js 922 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB
./bundle/src-QVCVGIUX.js 47 kB
./bundle/tree-sitter-7U6MW5PS.js 274 kB
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB
./bundle/undici-4X2YZID5.js 360 B

compressed-size-action

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 16, 2026
@mattKorwel mattKorwel force-pushed the mk-extenstions-programatic branch from 9564140 to 2eb8c0f Compare March 16, 2026 01:21
@mattKorwel mattKorwel self-assigned this Mar 16, 2026
@mattKorwel mattKorwel added area/extensions Issues related to Gemini CLI extensions capability and removed status/need-issue Pull requests that need to have an associated issue. labels Mar 16, 2026
Copy link
Copy Markdown
Collaborator Author

@mattKorwel mattKorwel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated Review Assessment (via Gemini CLI)

Functional verification and behavioral analysis for this PR have completed successfully.

✅ Key Improvements

  • Programmatic Search: The new search command was verified to correctly handle and return machine-readable output for extensions.
  • Stability & Diagnostics: All automated checks, including build, CI, and local diagnostics (lint/typecheck), passed.

Recommendation: LGTM. Ready to merge.

@mattKorwel mattKorwel enabled auto-merge March 16, 2026 07:48
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Issues related to Gemini CLI extensions capability status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant