Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(cua-driver-rs)(integrations): support Google Antigravity CLI (`agy`) (#1710)

Francesco Bonacci1f69d6232f24
diff --git a/docs/content/docs/cua-driver/guide/getting-started/integrations.mdx b/docs/content/docs/cua-driver/guide/getting-started/integrations.mdx
index a3f0715470..6ed65a5a45 100644
--- a/docs/content/docs/cua-driver/guide/getting-started/integrations.mdx
+++ b/docs/content/docs/cua-driver/guide/getting-started/integrations.mdx
@@ -160,6 +160,18 @@ Paste the output into `~/.hermes/config.yaml`.
cua-driver mcp-config --client openclaw
```
+## Antigravity CLI (and Antigravity IDE)
+
+Google's [Antigravity CLI](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/) — the `agy` binary that replaced Gemini CLI on May 19, 2026 — reads MCP server configs from `~/.gemini/config/mcp_config.json` (Unix) or `%USERPROFILE%\.gemini\config\mcp_config.json` (Windows). The same file is read by Antigravity IDE.
+
+```bash
+cua-driver mcp-config --client antigravity
+```
+
+Output is a snippet to paste under the top-level `mcpServers` object in that file. If the file doesn't exist yet, create it with `{"mcpServers": {}}` first. Antigravity CLI has no in-shell `mcp add` subcommand — edit the JSON file directly, then restart `agy` to pick up the change.
+
+`--client gemini` is accepted as a legacy alias and emits the same instructions — Antigravity inherited the `~/.gemini/` config tree from the old Gemini CLI install on purpose, so existing setups carry over without re-registration.
+
## Other clients
For any client that accepts the standard `mcpServers` shape:
diff --git a/docs/content/docs/cua-driver/reference/cli-reference.mdx b/docs/content/docs/cua-driver/reference/cli-reference.mdx
index cee47eef1b..99e3bdfc43 100644
--- a/docs/content/docs/cua-driver/reference/cli-reference.mdx
+++ b/docs/content/docs/cua-driver/reference/cli-reference.mdx
@@ -183,7 +183,7 @@ Print MCP server config or a client-specific install command.
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
-| `--client` | String | — | Client to print the install command for: claude \| codex \| cursor \| openclaw \| opencode \| hermes \| pi. Omit for the generic JSON snippet. |
+| `--client` | String | — | Client to print the install command for: claude \| codex \| cursor \| antigravity \| openclaw \| opencode \| hermes \| pi. (`gemini` accepted as a legacy alias for `antigravity` — both read the same `~/.gemini/config/mcp_config.json` after Antigravity inherited the path in May 2026.) Omit for the generic JSON snippet. |
**Flags:**
diff --git a/libs/cua-driver/rust/crates/cua-driver/src/cli.rs b/libs/cua-driver/rust/crates/cua-driver/src/cli.rs
index 8c8328d773..248e463966 100644
--- a/libs/cua-driver/rust/crates/cua-driver/src/cli.rs
+++ b/libs/cua-driver/rust/crates/cua-driver/src/cli.rs
@@ -659,8 +659,8 @@ pub fn run_mcp_via_daemon_proxy(socket: Option<String>) -> anyhow::Result<()> {
/// Print the MCP server config snippet or a client-specific install command.
///
-/// `--client <name>` selects one of: claude, codex, cursor, hermes, openclaw,
-/// opencode. Omit for the generic JSON snippet.
+/// `--client <name>` selects one of: claude, codex, cursor, hermes,
+/// antigravity, openclaw, opencode, pi. Omit for the generic JSON snippet.
pub fn run_mcp_config(client: Option<&str>) {
let binary = std::env::current_exe()
.ok()
@@ -755,6 +755,58 @@ pub fn run_mcp_config(client: Option<&str>) {
println!(" command: \"{binary}\"");
println!(" args: [\"mcp\"]");
}
+ Some("antigravity") | Some("gemini") => {
+ // Google Antigravity CLI (the `agy` binary, successor to Gemini
+ // CLI as of May 2026 — Gemini CLI support sunsets 2026-06-18 for
+ // consumers per the developers.googleblog.com transition post)
+ // has no `agy mcp add` subcommand: MCP servers are registered by
+ // editing JSON directly. Both Antigravity CLI and Antigravity
+ // IDE read from the SAME mcp_config.json at:
+ //
+ // Unix: ~/.gemini/config/mcp_config.json
+ // Windows: %USERPROFILE%\.gemini\config\mcp_config.json
+ //
+ // (Antigravity inherited the `.gemini` directory tree from the
+ // old Gemini CLI install path on purpose — same config carries
+ // over.) An additional CLI-only path at
+ // ~/.gemini/antigravity-cli/mcp_config.json takes precedence
+ // for CLI when present; we register at the shared path so the
+ // IDE picks the same server up.
+ //
+ // Reload after edit: restart `agy` (Antigravity CLI has no
+ // mid-session config-reload hook).
+ //
+ // The `gemini` client alias points at the same instructions
+ // so anyone with old muscle memory typing `--client gemini`
+ // gets the right (forward-compatible) config.
+ let normalised = binary.replace('\\', "/");
+ // Emit the full mcp_config.json envelope so the user can paste
+ // it verbatim into a fresh file (or merge under "mcpServers" in
+ // an existing one). Single pretty-printed JSON object keeps
+ // both shapes — full file and merge fragment — useful.
+ let full = serde_json::json!({
+ "mcpServers": {
+ "cua-driver": {
+ "command": normalised,
+ "args": ["mcp"],
+ }
+ }
+ });
+ let pretty = serde_json::to_string_pretty(&full)
+ .unwrap_or_else(|_| full.to_string());
+ println!(
+ "# Antigravity CLI (the `agy` binary) reads MCP server configs from:\n\
+ # ~/.gemini/config/mcp_config.json (Unix)\n\
+ # %USERPROFILE%\\.gemini\\config\\mcp_config.json (Windows)\n\
+ #\n\
+ # No `agy` subcommand for this — drop the JSON below into that file (or\n\
+ # merge under the existing top-level \"mcpServers\" object if it already\n\
+ # exists), then restart `agy` to pick up the change.\n\
+ #\n\
+ # The same file is shared with the Antigravity IDE.\n\
+ {pretty}",
+ );
+ }
Some("pi") => {
println!(
"Pi (badlogic/pi-mono) does not support MCP natively — the author\n\
@@ -768,7 +820,7 @@ pub fn run_mcp_config(client: Option<&str>) {
);
}
Some(other) => {
- eprintln!("Unknown client '{other}'. Valid: claude, codex, cursor, openclaw, opencode, hermes, pi.");
+ eprintln!("Unknown client '{other}'. Valid: claude, codex, cursor, antigravity, openclaw, opencode, hermes, pi.");
process::exit(2);
}
}
diff --git a/libs/cua-driver/rust/crates/cua-driver/src/skills.rs b/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
index 48706abbb7..04d95974dc 100644
--- a/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
+++ b/libs/cua-driver/rust/crates/cua-driver/src/skills.rs
@@ -39,13 +39,17 @@
//!
//! ## Agent detection
//!
-//! Same four agent dirs as the Swift cua-driver installer detects:
+//! Same agent dirs as the Swift cua-driver installer detects:
//!
//! - Claude Code: `~/.claude/skills/`
//! - Codex: `~/.agents/skills/`
//! - OpenClaw: `~/.openclaw/skills/`
//! - OpenCode: `~/.config/opencode/skills/` (macOS / Linux),
//! `%APPDATA%\opencode\skills\` (Windows)
+//! - Antigravity: `~/.gemini/skills/` — shared between Antigravity CLI
+//! (`agy`) and Antigravity IDE; same dir Google Gemini CLI
+//! used before the May-2026 transition, so existing
+//! installs migrate forward unchanged.
//!
//! Only acts on a given agent when its parent skills dir already
//! exists (i.e. the agent itself is installed). Never clobbers an
@@ -182,6 +186,10 @@ const AGENTS: &[Agent] = &[
Agent { label: "OpenCode", parent: AgentParent::AppData("opencode/skills") },
#[cfg(not(windows))]
Agent { label: "OpenCode", parent: AgentParent::Home(".config/opencode/skills") },
+ // Antigravity CLI + Antigravity IDE share the `.gemini/skills/` dir
+ // (the same path Gemini CLI used pre-May-2026). Registering the
+ // single shared path means both surfaces pick up the same symlink.
+ Agent { label: "Antigravity", parent: AgentParent::Home(".gemini/skills") },
];
impl Agent {
diff --git a/libs/cua-driver/scripts/install.sh b/libs/cua-driver/scripts/install.sh
index f2bb817a2c..6076170493 100755
--- a/libs/cua-driver/scripts/install.sh
+++ b/libs/cua-driver/scripts/install.sh
@@ -310,6 +310,9 @@ fi
# - OpenCode : scans ~/.config/opencode/skills/ (also reads ~/.claude/skills/
# natively, so the Claude Code symlink covers OpenCode for users
# who have both)
+# - Antigravity (CLI + IDE): scans ~/.gemini/skills/ — the dir Google
+# inherited from Gemini CLI in May 2026, so
+# existing setups carry over unchanged.
#
# Not auto-wired (different file format / would clobber user state):
# - Cursor: rules use a different frontmatter shape (description/globs/
@@ -364,6 +367,15 @@ if [[ -d "$HOME/.config/opencode" ]] && [[ ! -d "$HOME/.config/opencode/skills"
fi
link_skill_into "$HOME/.config/opencode/skills" "OpenCode"
+# Antigravity CLI (`agy`) + Antigravity IDE — both surfaces read from
+# ~/.gemini/skills (the dir inherited from Gemini CLI on 2026-05-19).
+# Create it if either Antigravity surface is installed but the skills
+# subdir hasn't been initialized yet, then link.
+if [[ -d "$HOME/.gemini" ]] && [[ ! -d "$HOME/.gemini/skills" ]]; then
+ mkdir -p "$HOME/.gemini/skills"
+fi
+link_skill_into "$HOME/.gemini/skills" "Antigravity"
+
# --- PATH setup ---------------------------------------------------------
#
# If $BIN_DIR is not on the user's PATH (common for ~/.local/bin on macOS,
@@ -462,10 +474,11 @@ Next steps:
}
Or inside gh copilot chat: /mcp add → type=STDIO, command=$BIN_LINK, args=mcp
- • Cursor / OpenCode / Hermes (no add CLI — paste config):
- cua-driver mcp-config --client cursor # JSON for ~/.cursor/mcp.json
- cua-driver mcp-config --client opencode # JSON for opencode.json
- cua-driver mcp-config --client hermes # YAML for ~/.hermes/config.yaml
+ • Cursor / OpenCode / Hermes / Antigravity (no add CLI — paste config):
+ cua-driver mcp-config --client cursor # JSON for ~/.cursor/mcp.json
+ cua-driver mcp-config --client opencode # JSON for opencode.json
+ cua-driver mcp-config --client hermes # YAML for ~/.hermes/config.yaml
+ cua-driver mcp-config --client antigravity # JSON for ~/.gemini/config/mcp_config.json (shared with Antigravity IDE)
For other clients accepting the generic mcpServers shape:
cua-driver mcp-config