Skip to content

feat(installer): add Gemini CLI + Antigravity IDE targets (#399)#458

Merged
colbymchenry merged 1 commit into
mainfrom
feat/installer-gemini-antigravity
May 26, 2026
Merged

feat(installer): add Gemini CLI + Antigravity IDE targets (#399)#458
colbymchenry merged 1 commit into
mainfrom
feat/installer-gemini-antigravity

Conversation

@colbymchenry
Copy link
Copy Markdown
Owner

Summary

Adds two installer targets so codegraph install configures Gemini CLI and the Antigravity IDE out of the box, closes #399.

  • Gemini CLI (covers the rebranded Antigravity CLI too — same config file): ~/.gemini/settings.json + ~/.gemini/GEMINI.md (or project-local equivalents). Preserves pre-existing top-level settings like security.auth and sibling MCP servers.
  • Antigravity IDE: writes to Antigravity's unified MCP config at ~/.gemini/config/mcp_config.json (post-migration, detected via the .migrated marker Antigravity itself drops). Falls back to the legacy ~/.gemini/antigravity/mcp_config.json for pre-migration builds; install migrates a stale legacy entry, uninstall sweeps both. Antigravity-managed sibling fields (e.g. the "disabled": true flag added when a user disables a server through the IDE) survive re-install.

Antigravity quirks the target handles

These caused codegraph to silently fail to appear in Antigravity's MCP server list on initial implementation; both are now in the installer.

  1. type: "stdio" is rejected — Antigravity silently drops MCP entries that carry this field. The working entries it manages itself omit it, so the antigravity target omits it too. (All other targets keep type: "stdio" — only Antigravity is picky about this.)
  2. macOS GUI app PATH problem — macOS gives Dock/Finder-launched apps a stripped PATH (/usr/bin:/bin:/usr/sbin:/sbin) that doesn't include nvm. A bare codegraph command name fails to spawn even when which codegraph works in the user's shell. The target resolves codegraph to its absolute path at install time on macOS. Linux GUI apps inherit user PATH and Windows reads env PATH directly, so both keep the bare command.

End-to-end validation

  • macOS — real Gemini CLI v0.43.0 via tmux: /mcp reports 🟢 codegraph - Ready (10 tools); codegraph_status executed and returned the real index state (188 files, 2854 nodes). Real Antigravity IDE shows codegraph in Customizations → Installed MCP Servers after restart.
  • Linux (Docker node:22-bookworm) — 116 installer tests pass; CLI install + uninstall round-trip verified, including the unified-path detection.
  • Windows (Parallels Win11) — 116 installer tests pass; CLI install + uninstall round-trip verified.

Test plan

  • Parameterized contract tests pick up both new targets (idempotent install, sibling preservation, install/uninstall round-trip)
  • Gemini: preserves security.auth, GEMINI.md sibling content; local path writes to ./.gemini/settings.json + project-root ./GEMINI.md
  • Antigravity: writes to legacy path without marker, writes to unified path WITH marker, writes to unified path when the unified file already exists (even without marker), entry has no type field, sibling disabled flag preserved, install migrates a legacy entry to unified, uninstall sweeps both paths
  • Cross-target: gemini + antigravity coexist in ~/.gemini/; uninstalling one preserves the other's MCP entry
  • Full suite: 972 passing on macOS / Linux / Windows

🤖 Generated with Claude Code

`codegraph install` now detects and configures two more agents:

- Gemini CLI / Antigravity CLI — `~/.gemini/settings.json` (or
  `./.gemini/settings.json`) + `~/.gemini/GEMINI.md` (or project-root
  `./GEMINI.md`). Preserves pre-existing top-level settings like
  `security.auth` and sibling MCP servers.

- Antigravity IDE — writes to Antigravity's unified MCP config at
  `~/.gemini/config/mcp_config.json` (post-migration, detected via
  the `.migrated` marker Antigravity drops). Falls back to the
  legacy `~/.gemini/antigravity/mcp_config.json` on pre-migration
  builds; install migrates a stale legacy entry, uninstall sweeps
  both. Antigravity-managed sibling fields (e.g. the `disabled` flag
  added when users disable a server through the UI) survive re-install.

  Two Antigravity-specific quirks the target handles:
  1. Entries with `type: "stdio"` are silently rejected by
     Antigravity's MCP scanner; we omit the field for this target.
  2. macOS GUI apps launched from Dock/Finder get a stripped PATH
     that excludes nvm — a bare `codegraph` command name fails to
     spawn even when `which codegraph` works in the user's shell.
     The target resolves `codegraph` to its absolute path at install
     time on macOS. Linux + Windows are unaffected.

End-to-end validated:
- macOS: real Gemini CLI v0.43 via tmux — `/mcp` shows codegraph with
  all 10 tools, `codegraph_status` executes and returns real index
  state. Real Antigravity IDE shows codegraph under Customizations
  after restart.
- Linux (Docker node:22-bookworm) + Windows (Parallels Win11): 116
  installer tests pass; CLI install + uninstall round-trip verified.

Test coverage: the new targets inherit the existing parameterized
contract (idempotent install, sibling preservation, install/uninstall
round-trip). Plus 14 target-specific tests covering migration-marker
detection, legacy→unified entry migration, `disabled` flag
preservation, the `type` field omission, gemini+antigravity
coexistence in the same `~/.gemini/`, and macOS-only path resolution.
Full suite: 972 passing.

Closes #399.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding support for Google Anti-gravity

1 participant