feat(installer): add Antigravity CLI target#1
Closed
BaguetteUhq1 wants to merge 2 commits into
Closed
Conversation
c6ec7b8 to
9faee9f
Compare
Cleboost
requested changes
May 22, 2026
Comment on lines
+14
to
+19
| if let Ok(p) = Utf8PathBuf::from_path_buf(home.join(".gemini").join("antigravity-cli").join("mcp_config.json")) { | ||
| paths.push(p); | ||
| } | ||
| if let Ok(p) = Utf8PathBuf::from_path_buf(home.join(".gemini").join("config").join("mcp_config.json")) { | ||
| paths.push(p); | ||
| } |
| } | ||
|
|
||
| #[cfg(not(windows))] | ||
| fn ensure_in_path(bin_dir: &Path) -> Result<()> { |
Comment on lines
+1
to
+39
| $ErrorActionPreference = "Stop" | ||
|
|
||
| $Repo = "cleboost/codegraph" | ||
| $BinName = "codegraph.exe" | ||
|
|
||
| Write-Host "Detecting latest release..." | ||
| $LatestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/$Repo/releases/latest" | ||
| $Tag = $LatestRelease.tag_name | ||
|
|
||
| if ([string]::IsNullOrEmpty($Tag)) { | ||
| Write-Error "Could not detect the latest tag." | ||
| exit 1 | ||
| } | ||
|
|
||
| $Target = "x86_64-pc-windows-msvc" | ||
| $Url = "https://github.com/$Repo/releases/download/$Tag/codegraph-$Target.zip" | ||
| $TmpDir = Join-Path $env:TEMP "codegraph-install-$(New-Guid)" | ||
| New-Item -ItemType Directory -Path $TmpDir -Force | Out-Null | ||
|
|
||
| try { | ||
| Write-Host "Downloading $Url" | ||
| $ZipPath = Join-Path $TmpDir "codegraph.zip" | ||
| Invoke-WebRequest -Uri $Url -OutFile $ZipPath | ||
|
|
||
| Write-Host "Extracting..." | ||
| Expand-Archive -Path $ZipPath -DestinationPath $TmpDir -Force | ||
|
|
||
| $ExtractedBin = Join-Path $TmpDir $BinName | ||
| if (-not (Test-Path $ExtractedBin)) { | ||
| Write-Error "Could not find $BinName in the downloaded archive." | ||
| exit 1 | ||
| } | ||
|
|
||
| Write-Host "Running self-installer..." | ||
| & $ExtractedBin install | ||
|
|
||
| } finally { | ||
| Remove-Item -Path $TmpDir -Recurse -Force -ErrorAction SilentlyContinue | ||
| } |
Comment on lines
+6
to
+33
| @@ -29,11 +28,6 @@ trap 'rm -rf "$tmp"' EXIT | |||
| echo "Downloading $url" | |||
| curl -fsSL "$url" -o "$tmp/cg.tar.gz" | |||
| tar -xzf "$tmp/cg.tar.gz" -C "$tmp" | |||
| mkdir -p "$INSTALL_DIR" | |||
| install -m 0755 "$tmp/$BIN_NAME" "$INSTALL_DIR/$BIN_NAME" | |||
|
|
|||
| echo "Installed $BIN_NAME $tag to $INSTALL_DIR" | |||
| case ":$PATH:" in | |||
| *":$INSTALL_DIR:"*) ;; | |||
| *) echo "Note: $INSTALL_DIR is not in PATH. Add it or move the binary." ;; | |||
| esac | |||
| echo "Running self-installer..." | |||
| "$tmp/$BIN_NAME" install | |||
Comment on lines
+38
to
+44
| For Windows (PowerShell): | ||
|
|
||
| ```powershell | ||
| irm https://raw.githubusercontent.com/cleboost/codegraph/main/scripts/install.ps1 | iex | ||
| ``` | ||
|
|
||
| The scripts will download the latest binary and run the self-installer, which will copy it to `~/.local/bin` and add it to your system's `PATH`. |
e64a7ca to
d4d7b0d
Compare
Author
|
Désolé pour la confusion ! J'avais poussé de la logique d'installation sans rapport (auto-PATH et binaire auto-installable) sur cette branche par erreur. J'ai fait un force-push pour retirer ces changements. Cette PR est maintenant strictement dédiée à la cible Antigravity CLI. |
Owner
|
pls make an another pr without force push |
Author
|
Closing in favor of the clean PR #3 to avoid force-push history. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the
Antigravity CLIagent in thecodegraph-installercrate. It allows users of Antigravity CLI to automatically integrate thecodegraphMCP server into their global configuration by runningcodegraph install.Changes made
crates/codegraph-installer/src/targets/antigravity.rsimplementingAgentTarget.lib.rsand exposed it inmod.rs.~/.gemini/antigravity-cli/mcp_config.json~/.gemini/config/mcp_config.json(as well as XDG~/.config/gemini/...equivalents for Linux natively).Proof of Functionality
The binary was compiled locally (
cargo build --release) and executed against an existing Antigravity environment.Output after compilation:
The installer correctly resolves the global path and injects the
mcpServersobject pointing to the absolute path of thecodegraphbinary and the current project's workspace.