跪拜 Guibai
← Back to the summary

Google Antigravity Speaks Chinese: A One-Line Launcher for UI and Thinking-Language Localization

【Open-Source Tool】How to Set Google Antigravity to Chinese? A Lossless Dual-Entry Localization Solution for Mac / Windows

Effect Demo

Screenshot of full Chinese conversation, execution chain and auto Chinese titles

Screenshot of blank new session with Chinese welcome page and input bar

Original English and separate Chinese icons coexisting

Open-source repo: https://github.com/guuguo/antigravity-zh-launcher

Foreword

Lately the Gemini 4 family of models has been climbing the coding and complex reasoning leaderboards, so I switched my primary coding workbench to Google Antigravity Desktop.

It works smoothly, but with heavy daily conversation usage, two small annoyances keep getting under my skin:

I also looked at the common approach online of unpacking and replacing the asar archive. Aside from having to re-apply the patch after every minor official update, on macOS changing the package directly invalidates the code signature, causing system permission popups to keep nagging.

But I'm lazy~~~

I just want an extra, independent 「Antigravity 中文」 icon on my desktop: click it to get full Chinese flow (interface + execution chain + thinking + titles), click the original Antigravity icon to stay 100% original English, and never have them bleed into each other.

So I packaged the whole solution into a one-line command and open-sourced it.

Getting and Installing (One Line for Mac / Windows)

The full installation script, SHA-256 verification notes, source code, and advanced usage live in the GitHub repo (supports macOS Terminal / Windows PowerShell one-line installation and also one-line complete uninstall):

👉 Get the one-command install script & source on GitHub (a Star ⭐️ is welcome): https://github.com/guuguo/antigravity-zh-launcher

How to use it after install:

Highlights and Core Implementation Ideas

This launcher doesn't just slap on a word list. It weaves "filling UI gaps" and "thinking-language syncing" into one complete chain:

  1. CDP dynamic injection + enhanced overlay script (zero-intrusion, no signature breaking) Under the hood it builds on the open-source community's yuexps/Antigravity-Hans (with strict verification against the official SHA256SUMS at install time), injecting the localization via the Chrome DevTools Protocol at runtime without touching app.asar or breaking the code signature. At the same time, it layers an enhanced overlay script via --trust-external-overlay to fill in the details a plain word list often misses:

    • Automatic Chinese titles: generate a concise title from the first Chinese question and replace the English auto-titles at the top breadcrumb and in the history list;
    • Input placeholder and welcome text: covers Ask anything, @ to mention, / for actions and several carousel welcome messages;
    • Compact relative time: localize 8m ago / 45s ago / Just now in the message toolbar and user action bar to 8分钟前 / 45秒前 / 刚刚, while strictly skipping message body content to avoid false positives.
  2. UI localization + Chinese thinking dual linkage, auto-restore on exit A standards-compliant plugin antigravity-zh-prompt is placed in ~/.gemini/config/plugins/ and defaults to enabled: false. Only when launched through the 「Antigravity 中文」 entry does the launcher agy-zh automatically enable it; once the session exits or the monitor stops, it immediately writes back false, ensuring the original English entry stays clean with no cross-contamination.

  3. MacOS / Windows native-experience polish

    • macOS: creates an independent app bundle Antigravity 中文.app and isolates the debug-port process from the original app.
    • Windows: uses wscript.exe to launch the no-window launcher agy-zh-launch.vbs that runs the background script, eliminating the terminal black-flash when double-clicking the shortcut; before launch it automatically enumerates windows via Win32 to identify same-session processes, cleans up hidden background leftovers before relaunching, and when a visible original window exists it pops a system confirmation box for the user to decide whether to restart.
  4. Optional command-line control After installation, an agy-zh command is available. If you prefer the terminal, run agy-zh status to see the state of both entries and the plugin switch, or use agy-zh stop / agy-zh build-overlay to manage running and overlay scripts.

Wrapping Up

The overall idea isn't complicated: it just pulls "don't modify the original package", "fill UI gaps", and "isolate the Chinese-thinking prompt" together into one convenient icon.

I use it every day for coding, and I've also cleaned up both the scripts for both platforms and open-sourced them. If you've also been using Antigravity heavily to run Gemini 4 recently, I hope this little tool saves you some hassle~

Project source and latest install command: https://github.com/guuguo/antigravity-zh-launcher (if it helps you, a Star ⭐️ on GitHub is welcome~)