Description
What would you like to be added?
A supported way to install an extension from a repository that contains more than one installable extension. Today gemini extensions install <source> requires gemini-extension.json at the repo root, so one repo can only ever be one extension.
Three shapes would solve this, and any one of them unblocks the use case:
-
Subdirectory install primitive. Treat a subdirectory as the extension root:
gemini extensions install https://github.com/org/skills-catalog --subdir extensions/foo
This was requested in Support installing extensions from a Git repository subdirectory #25676 and closed without plans. It composes with the existing
--refflag for pinning, andgemini extensions updatewould re-fetch the same subdir. -
Catalog-aware install. If the repo root carries a catalog manifest listing extensions and their paths, let the user install by name:
gemini extensions install https://github.com/org/skills-catalog --name foo
The manifest could be a Gemini format, or Gemini could read the
marketplace.jsonlayout that several other agent CLIs already consume. -
Marketplace semantics (the Claude Code / Codex model). Adopt the catalog model the other two major agent CLIs have converged on: a manifest at the repo root lists extensions and their relative-path sources, the CLI registers the repo as a marketplace, and installs/updates are addressed by name against it:
gemini extensions marketplace add https://github.com/org/skills-catalog gemini extensions install foo@skills-catalog
Claude Code implements this with
.claude-plugin/marketplace.json(/plugin marketplace add org/repo, then/plugin install name@marketplace). Codex implements the same shape with.agents/plugins/marketplace.json(repo- or user-scoped catalogs feeding its plugin browser and installs). The two layouts differ only in file location and a few field names — both reduce to a root manifest containing a list of{name, relative source path}entries. A Gemini equivalent — or direct support for reading one of those existing manifests — would let a single catalog repo serve every harness unchanged, and gives Gemini a natural home for update semantics (refresh the marketplace, update installed extensions by name).
Option 1 alone is enough to unblock publishers, since a catalog is just tooling layered on top of subdirectory installs. But option 3 is the preferred shape: Claude Code and Codex — the two largest players alongside Gemini — have independently converged on marketplace semantics, publishers are already structuring catalog repos to that model, and matching it means Gemini gets the whole ecosystem of existing catalogs rather than a Gemini-only primitive.
Why is this needed?
Publishers distributing agent skills/plugins across multiple harnesses have converged on a single catalog repo. The marketplace.json layout is installable from Claude Code, Codex, Copilot CLI, Devin, and OpenCode. Gemini CLI is the notable harness that cannot install from such a repo, because it only looks for gemini-extension.json at the root.
Concrete case: we (O'Reilly Media) are building a curated catalog of expert-authored skills for our customers, published from one repo. Our build pipeline can already emit a valid gemini-extension.json per extension in its subdirectory; there is simply no way to point gemini extensions install at it.
The only current workaround is one repo per extension. For a curated catalog of N extensions that means N repos to version, permission, and keep in sync, which does not scale and makes Gemini the odd surface out. Forking or vendoring the files loses gemini extensions update / --auto-update, which is one of the extension system's best properties.
Additional context
- Support installing extensions from a Git repository subdirectory #25676 requested the subdirectory primitive and was closed citing resourcing; Plugin Marketplace or MCP Server Directory #26032 requested a marketplace/directory and was closed the same way. This is an updated request combining the two from the perspective of a cross-harness publisher, where the gap is now a concrete adoption blocker rather than a nice-to-have.
- The triage bot's effort analysis on Support installing extensions from a Git repository subdirectory #25676 already sketched the implementation surface (extension resolution in
packages/core, flag propagation frompackages/cli, subdir metadata in.gemini-extension-install.json). - Related ecosystem context: multi-agent build tools currently work around this by emitting
gemini-extension.jsonat the repo root, which only works when a repo contains exactly one extension.
Activity
gemini-cli commentedon Jul 17, 2026
Effort Analysis:
The extension installation pipeline in Gemini CLI is primarily implemented in
packages/cli/src/config/extension-manager.tsandpackages/cli/src/config/extensions/github.ts, with core interfaces defined inpackages/core/src/config/config.ts. Supporting monorepo/catalog installs (Proposal 1:--subdir) requires updating theExtensionInstallMetadatainterface to include asubdirproperty, which must be propagated through theinferInstallMetadataandinstallOrUpdateExtensionfunctions. Specifically, after cloning a git repository or resolving a local path, the manager must append thesubdirto thelocalSourcePathbefore attempting to loadgemini-extension.json. Furthermore, the unique identifier for the extension, calculated ingetExtensionId, must incorporate thesubdirinto its hash to prevent ID collisions when multiple extensions are installed from the same repository. Handling subdirectories during extraction from GitHub release archives (viadownloadFromGitHubReleaseinpackages/cli/src/config/extensions/github.ts) adds further complexity, potentially requiring adjustments to the 'lonely directory' detection logic. These changes span multiple packages and involve modifications to the core extension management and ID generation logic, categorizing it as effort/medium according to the guidelines for cross-component refactors and data model changes.gemini-cli commentedon Sep 16, 2026
This item has been automatically marked as stale due to 60 days of inactivity. It will be closed in 14 days if no further activity occurs. Thank you!
gemini-cli commentedon Sep 30, 2026
This item has been closed due to 14 additional days of inactivity after being marked as stale. If you believe this is still relevant, feel free to comment or reopen. Thank you!