Skip to content

Support installing extensions from monorepo / marketplace #28428

Closed as not planned
Closed as not planned

Description

@bendavis78

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:

  1. 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 --ref flag for pinning, and gemini extensions update would re-fetch the same subdir.

  2. 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.json layout that several other agent CLIs already consume.

  3. 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

Activity

  1. added
    status/need-triage
    on Jul 17, 2026
  2. added
    area/extensions
    effort/medium
    and removed
    status/need-triage
    on Jul 17, 2026
  3. gemini-cli commented on Jul 17, 2026

    @gemini-cli
    Contributor

    Effort Analysis:
    The extension installation pipeline in Gemini CLI is primarily implemented in packages/cli/src/config/extension-manager.ts and packages/cli/src/config/extensions/github.ts, with core interfaces defined in packages/core/src/config/config.ts. Supporting monorepo/catalog installs (Proposal 1: --subdir) requires updating the ExtensionInstallMetadata interface to include a subdir property, which must be propagated through the inferInstallMetadata and installOrUpdateExtension functions. Specifically, after cloning a git repository or resolving a local path, the manager must append the subdir to the localSourcePath before attempting to load gemini-extension.json. Furthermore, the unique identifier for the extension, calculated in getExtensionId, must incorporate the subdir into its hash to prevent ID collisions when multiple extensions are installed from the same repository. Handling subdirectories during extraction from GitHub release archives (via downloadFromGitHubRelease in packages/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.

  4. gemini-cli commented on Sep 16, 2026

    @gemini-cli
    Contributor

    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!

  5. gemini-cli commented on Sep 30, 2026

    @gemini-cli
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalearea/extensionseffort/mediumstatus/bot-triaged

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions