Skip to content

Menu

Antigravity

Migrate from Gemini CLI to Antigravity CLI

Inventory your context, Skills, extensions, and MCP configuration against the official timeline, then migrate with a rollback path.

min read
15
Level
Intermediate
Last verified

This is not a matter of renaming the executable from gemini to agy. You need to migrate accounts, authentication, context, Skills, extensions and plugins, Model Context Protocol (MCP) configurations, and team scripts separately, with rollback evidence for each item.

Google’s May 19, 2026 announcement describes two paths:

  • For users on the Gemini Code Assist for individuals free tier or a Google AI Pro or Google AI Ultra subscription, the legacy Gemini CLI stopped serving requests on June 18, 2026. These users should migrate to Antigravity CLI.
  • For Gemini Code Assist Standard and Enterprise, existing access remained unchanged at the June 18, 2026 individual-user deadline. However, new sales ended on October 9, 2026, and existing standalone subscriptions are supported only until their contracts end, subject to annual and monthly renewal cutoffs. Existing entitlements included with Gemini Enterprise remain available through March 31, 2027.

The announcement also states that Antigravity CLI will not initially have 1:1 feature parity. Do not treat the individual-user migration deadline as an enterprise upgrade mandate. Enterprises should work backward from their contracts, renewals, and entitlement end dates instead of continuing to cite the May announcement’s statement that access “remained unchanged.”

Copy this table first. Enter only paths and purposes—never tokens or secrets:

Item Previous location or status Users Migration action Regression evidence
Sign-in Account type, Cloud project Individual/organization Select the correct identity at first launch Can complete a read-only request
Context GEMINI.md, AGENTS.md Team Retain the original files Rules take effect in a new session
Workspace Skills .gemini/skills/ Project Move to .agents/skills/ Visible in /skills
Global Skills ~/.gemini/skills/ Individual Continue using them or reorganize them under team conventions Names and sources are correct
Extensions Legacy extension inventory Individual/team Convert to Antigravity plugins Plugins and included capabilities are visible
MCP Servers in settings.json Individual/team Move to a separate mcp_config.json Each server connects successfully
Automation gemini in shell scripts or CI Team Adapt separately; do not replace blindly Both expected failures and successes are tested

Store backups in a controlled location and preserve file permissions. Do not commit the entire ~/.gemini/ directory because it may contain personal settings or credentials.

Minimal migration: verify context and read access only

Section titled “Minimal migration: verify context and read access only”

Start with a synthetic repository:

demo-migrate/
├── GEMINI.md
├── README.md
└── sample.txt

GEMINI.md:

# Demo migration rules
- Read files only; do not modify anything without explicit confirmation.
- In each response, list the relative paths you read.
- sample.txt contains synthetic data and no real user information.

Install Antigravity CLI from the official getting-started page, then check the version:

终端窗口
agy --version

Launch agy from the repository root, confirm workspace trust, and enter:

Following GEMINI.md, read only README.md and sample.txt.
Summarize them in three lines and list the relative paths you actually read. Do not modify files or run shell commands.

The expected output is a three-line summary and two relative paths, with no changes to the workspace. The official migration guide says both CLIs follow the same workspace context rules, so existing GEMINI.md and AGENTS.md files do not need to be rewritten for the migration.

When you run agy for the first time, the official documentation says it detects existing configuration and presents an interactive checklist for selecting assets to migrate. Session tokens are transferred to the operating system’s native keyring. When validating sign-in, record only the account type and project, not the token.

Run the official import command for the Gemini CLI extensions in your inventory:

终端窗口
agy plugin import gemini

Review ok, skipped, and error entries in the output; do not rely on the exit status alone. The official example shows that commands from legacy extensions can be converted to Skills and MCP definitions can be moved into the new configuration. This does not guarantee that every third-party extension will work without changes.

Scope Gemini CLI Antigravity CLI
Shared globally ~/.gemini/skills/ Still supported; a dedicated global directory is also supported
Within a project .gemini/skills/ .agents/skills/

Move each project Skill to .agents/skills/<name>/SKILL.md, then start a new conversation or run:

/skills reload

Use /skills to check its source and name. The presence of the directory alone does not prove that the Skill loaded successfully.

The official migration guide moves MCP out of the inline configuration in the old settings.json and into:

  • Global: ~/.gemini/config/mcp_config.json.
  • Workspace: .agents/mcp_config.json.

For remote WebSocket or SSE configurations, change the old url or httpUrl field to serverUrl as required by the current schema. Migrate and test one server at a time instead of enabling every server at once. Continue to obtain credentials from a secure environment or secrets service; never put them in JSON.

Run each item on this synthetic task card:

Task A: Read two Markdown files and produce a summary that includes their paths.
Task B: Invoke the demo-review Skill and return review suggestions only.
Task C: Connect to a local synthetic MCP service and read its fixed health resource.
Task D: After explicit confirmation, modify a temporary file and inspect the diff.
Stop if the client accesses a path outside the repository, requests an unknown permission,
includes a secret in its output, runs a destructive command without confirmation,
or produces a result that cannot be verified against the source or diff.

The expected output records success or failure, permission prompts, actual paths, and diffs for every item—not a single “migration complete” message.

Anti-pattern: “Copy all configuration, replace paths in bulk, and then delete the old directory.”

Rewrite: “Inventory and back up first. Validate sign-in and GEMINI.md in a synthetic repository. Then migrate extensions, Skills, MCP, and scripts one category at a time. Move to the next category only after regression tests pass. Keep the old configuration as a read-only backup during the observation period, and require the responsible owner to approve its final retirement.”

  • The selected client matches the account entitlement.
  • Key stop conditions from GEMINI.md and AGENTS.md are observable.
  • /skills shows the correct names, scopes, and sources.
  • Plugin import logs are saved, and each skipped item has an owner.
  • Each MCP server has been tested individually, and no configuration contains plaintext secrets.
  • Automation scripts were not moved directly into production after a mechanical replacement.
  • Read, write, tool-call, and expected-failure paths all have regression evidence.
  • The old configuration backup can be located and restored, and access to it is controlled.

If authentication selects the wrong account, rules are missing, permissions expand, or a critical extension is incompatible, stop expanding the rollout. Preserve logs from the new client and, while the contract remains valid, return to the legacy CLI configuration that the organization still supports. Handle each failure separately. Do not delete old keys, tokens, configuration directories, or CI variables before you understand the impact. A rollback is not a substitute for a final retirement plan.

Next, read CLI paths at a glance to confirm account routing. For context details, see GEMINI.md project context. To migrate repeated tasks to the current slash command format, see Custom CLI commands. For a separate MCP check, see MCP and plugins.