feat(#775): ship a gemini-extension.json extension package (#818)

Add a Gemini CLI extension package so users can install, update, and
remove GSD through Gemini's own extension lifecycle and have it appear in
`gemini extensions list`:

  gemini extensions install https://github.com/open-gsd/gsd-core
  gemini extensions update gsd-core
  gemini extensions uninstall gsd-core
  gemini extensions link /path/to/gsd-core   # dev

This mirrors the additive Claude Code plugin manifest (#766): a thin,
version-stamped manifest enforced by an in-repo drift test. The extension
ships the context-file payload (GEMINI.md), loaded into every Gemini
session; slash-command/agent/hook TOML projection into the extension is a
documented follow-up. The manual `npx gsd-core --gemini` installer (which
provides the /gsd:* commands) is unchanged — purely additive, no breaking
change.

- gemini-extension.json: name=binName, version tracks package.json,
  description, contextFileName=GEMINI.md (minimal; no mcpServers — gsd
  ships no MCP server)
- GEMINI.md: Gemini-session context payload
- package.json: add both artifacts to files[] so they publish
- CONTEXT.md: add "Gemini Extension Package" glossary entry
- docs: USER-GUIDE + install-on-your-runtime how-to
- tests/issue-775-gemini-extension.test.cjs: manifest validity, version
  parity with package.json, contextFileName existence, files[] publication

Closes #775

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-07 18:54:08 -04:00
committed by GitHub
parent 2860e995b5
commit a3aa0ae142
8 changed files with 240 additions and 0 deletions

View File

@@ -733,6 +733,43 @@ npx @opengsd/gsd-core --codebuddy --global
npx @opengsd/gsd-core --qwen --global
```
### Installing as a Gemini CLI extension (#775)
GSD ships a `gemini-extension.json` extension manifest at the repository root, so
Gemini CLI users can install, update, and remove GSD through Gemini's own
extension lifecycle — and have it show up in `gemini extensions list`:
```bash
# Install (Gemini clones the repo and copies the extension)
gemini extensions install https://github.com/open-gsd/gsd-core
# Update to the latest released manifest version
gemini extensions update gsd-core
# Remove
gemini extensions uninstall gsd-core
```
For local development against a checkout, symlink it instead of copying:
```bash
gemini extensions link /path/to/gsd-core
```
**What the extension delivers today:** it loads GSD's operating context
(`GEMINI.md`) into every Gemini session in the project, and gives you the
discoverable install/update/remove lifecycle above. The `/gsd:*` slash commands,
agents, and hooks are still installed via the dedicated installer:
```bash
npx @opengsd/gsd-core --gemini --global
```
The two paths are complementary and additive — installing the extension does not
change or replace the `npx gsd-core --gemini` install, and either can be used on
its own. (Slash-command/agent/hook projection into the extension package itself
is a planned follow-up.)
### Installing for Prerelease Editions
Set the runtime's `*_CONFIG_DIR` env var to the prerelease directory before running the installer:

View File

@@ -104,6 +104,21 @@ GEMINI_CONFIG_DIR=~/.gemini-alt npx @opengsd/gsd-core@latest --gemini --global
---
### Gemini CLI — native extension install (#775)
GSD also ships a `gemini-extension.json` extension manifest, so you can manage GSD through Gemini's own extension lifecycle and see it in `gemini extensions list`:
```bash
gemini extensions install https://github.com/open-gsd/gsd-core # install
gemini extensions update gsd-core # update
gemini extensions uninstall gsd-core # remove
gemini extensions link /path/to/gsd-core # dev: symlink a checkout
```
The extension loads GSD's operating context (`GEMINI.md`) into every session and gives you the discoverable install/update/remove lifecycle. The `/gsd:*` slash commands, agents, and hooks are installed separately by `npx @opengsd/gsd-core --gemini --global` (above). The two paths are complementary and additive — neither replaces the other, and slash-command projection into the extension is a planned follow-up.
---
### OpenCode
```bash