Antigravity
Di chuyển từ Gemini CLI sang Antigravity CLI
Kiểm kê ngữ cảnh, Skill, tiện ích và cấu hình MCP theo mốc thời gian chính thức, rồi di chuyển với lộ trình hoàn tác.
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.
Xác định bạn có phải di chuyển hay không
Phần tiêu đề “Xác định bạn có phải di chuyển hay không”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.”
Kiểm kê trước khi di chuyển
Phần tiêu đề “Kiểm kê trước khi di chuyển”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 | The CLI still reads it; to use them in the App too, move them to ~/.gemini/config/skills/ |
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.
Di chuyển tối thiểu: chỉ xác minh ngữ cảnh và quyền đọc
Phần tiêu đề “Di chuyển tối thiểu: chỉ xác minh ngữ cảnh và quyền đọc”Start with a synthetic repository:
demo-migrate/├── GEMINI.md├── README.md└── sample.txtGEMINI.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 --versionLaunch 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.
Di chuyển đầy đủ: chuyển đổi theo loại
Phần tiêu đề “Di chuyển đầy đủ: chuyển đổi theo loại”1. Khởi chạy và đăng nhập lần đầu
Phần tiêu đề “1. Khởi chạy và đăng nhập lần đầu”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.
2. Chuyển tiện ích thành plugin
Phần tiêu đề “2. Chuyển tiện ích thành plugin”Run the official import command for the Gemini CLI extensions in your inventory:
agy plugin import geminiReview 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.
3. Di chuyển Skill của workspace
Phần tiêu đề “3. Di chuyển Skill của workspace”| Scope | Gemini CLI | Antigravity CLI |
|---|---|---|
| Shared globally | ~/.gemini/skills/ |
The CLI still reads it (Shared), and also reads ~/.gemini/antigravity-cli/skills/ (Global); the Antigravity App reads neither directory |
| Within a project | .gemini/skills/ |
.agents/skills/ |
| Personal, shared by CLI and App | No equivalent | ~/.gemini/config/skills/ |
Move each project Skill to .agents/skills/<name>/SKILL.md, then start a new conversation or run:
/skills reloadUse /skills to check its source and name. The presence of the directory alone does not prove that the Skill loaded successfully.
Two details from the official Customization discovery page: a Skill with the same name in ~/.gemini/skills/ or ~/.gemini/antigravity-cli/skills/ takes priority over the workspace, personal ~/.gemini/config/, and built-in locations, and a manifest exclude cannot hide it, so if you keep one name in both old and new locations during migration, the former is the one that takes effect. Scanning is only one level deep: skills/<name>/SKILL.md is read, but skills/<group>/<name>/SKILL.md is not; move it up one level or register it in skills.json.
4. Tách cấu hình MCP
Phần tiêu đề “4. Tách cấu hình MCP”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.
The official customization-discovery page lists mcp_config.json under both the .agents/ and ~/.gemini/config/ scopes, the workspace scope is checked upward to the repository root, and an enabled plugin can bring its own mcp_config.json. When troubleshooting, do not look only at the two files above.
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.
5. Chạy kiểm thử hồi quy cho tác vụ thường dùng
Phần tiêu đề “5. Chạy kiểm thử hồi quy cho tác vụ thường dùng”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.
Cách làm sai và cách viết lại
Phần tiêu đề “Cách làm sai và cách viết lại”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.”
Danh sách kiểm tra xác minh và hoàn tác
Phần tiêu đề “Danh sách kiểm tra xác minh và hoàn tác”- The selected client matches the account entitlement.
- Key stop conditions from
GEMINI.mdandAGENTS.mdare observable. /skillsshows the correct names, scopes, and sources.- Plugin import logs are saved, and each
skippeditem 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.