MIMICTE/Antigravity-zh-CN
About
Antigravity desktop Chinese localization patch | Google Antigravity Chinese localization patch
AI & Machine LearningMeasured star growth
- in 24h
- +6
- in 7 days
- +28
- in 15 days
- +224
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
OriginalAntigravity-zh-CN
📖 Project Overview
Antigravity v2.21.1 Chinese Localization Patch - Provides complete Chinese interface support for Google Antigravity desktop application.
✨ Key Features
- 🚀 Zero Dependencies - Built-in pure Python ASAR parser and packer using only
structandjsonlibraries, no Node.js or npm required - 🎯 Smart Text Matching - Uses low-level
indexOffragmentation reconstruction and CSS pseudo-class polymorphic matching to bypass Webpack code splitting issues - ⚡ One-Click Deployment - Automatically handles process cleanup and software restart for a seamless "press Enter → enjoy Chinese" experience
- 🛡️ Clean & Reversible - Complete removal of localization with restore script, ensuring "lossless rollback" to official English version at any time
- 🧭 Cross-Platform Compatibility - Automatically detects OS environment, natively supporting path resolution and process management on both Windows and macOS
📦 Download & Installation
Option 1: Standalone Version (Windows / macOS) ⭐ Recommended for Most Users
Download: Download your OS version from Releases (Supports Windows x64, macOS Intel/Apple Silicon)
Features:
- ✅ Ready to use, no Python environment required
- ✅ Native experience, one-click execution with automatic app restart
【For Windows Users】
- Download
Antigravity-zh-CN-v2.21.1-windows-x64.zipand extract - Double-click
Antigravity-Patcher.exeto apply the patch (UseRestore.exeto revert)
【For macOS Users】
- Download the corresponding macOS archive (
arm64for M-series Apple Silicon,x86_64for Intel) and extract - Open Terminal, navigate to the extracted folder, grant execution permissions and run:
chmod +x Antigravity-Patcher-macOS-* ./Antigravity-Patcher-macOS-*
🍎 macOS Note: If blocked by Gatekeeper ("cannot be opened because the developer cannot be verified"), go to "System Settings -> Privacy & Security", scroll down and click "Open Anyway". Alternatively, run
xattr -cr Antigravity-Patcher-macOS-*in Terminal to clear attributes.
Option 2: Install from Source ⭐ Recommended for Developers
Clone the repository:
git clone https://github.com/MIMICTE/Antigravity-zh-CN.git
cd Antigravity-zh-CN
python Antigravity-Patcher.py
Or download source code archive:
Download Source code (zip) or Source code (tar.gz) from Releases page, extract and run Antigravity-Patcher.py.
💡 Technical Approach
This project leverages Electron framework mechanisms:
1. Unpacked Patching
Disables the official app.asar file, forcing the software to read from the unpacked app folder with injected localization code.
2. Dynamic DOM Interception
Injects MutationObserver in preload.js to monitor DOM changes in real-time and replace English text with Chinese.
3. Native ASAR Parser
Pure Python implementation of ASAR file format parser with zero external dependencies.
⚠️ Known Limitations
- Thought Process in English - Due to AI model's streaming output architecture, the agent's backend thinking logs (
Thoughtprocess) cannot be localized, but all final responses and frontend UI elements are 100% localized - Platform Support - Fully supports Windows and macOS (Intel & Apple Silicon). Linux is currently not supported
- Version Specific - Deeply optimized for Antigravity v2.21.1 with robust compatibility across versions
📸 Screenshots

Antigravity with Chinese interface - All text fully localized
Fully localized interface includes:
- ✅ Sidebar menu (New conversation, History, Scheduled tasks, Projects)
- ✅ Top navigation bar (File, Audio, Window)
- ✅ Input placeholder text and model selector
- ✅ All options and descriptions in Settings page
- ✅ Underlying terminal permission request prompts and dynamic status text
💡 Tip: To see the actual result, simply double-click
Antigravity-Patcher.exeorAntigravity-Patcher.pyto experience the complete Chinese interface!
🔐 Security
This project is completely open-source and secure:
✅ What We Do
- UI Text Only - Only replaces display text at the frontend level, no network interception, data collection, or account access
- Open Source - All code is fully open-source with no obfuscation, encryption, or hidden logic
- Reversible - Complete restore mechanism, one-click rollback to original version
- Zero External Dependencies - Pure Python standard library implementation, no external server connections
🛡️ How It Works
- ASAR Unpacking - Pure Python parser for Electron's ASAR package format
- Code Injection - Append translation code to
preload.jsandmenu.js - DOM Monitoring - Use
MutationObserverto watch page changes - Text Replacement - Dictionary-based English to Chinese text replacement
About the Standalone Executables (Windows .exe / macOS binaries)
- Packaged using PyInstaller open-source tool
- Contains complete Python runtime environment (hence file size ~8 MB)
- May be flagged by some antivirus software on Windows, which is a known PyInstaller issue
- macOS may show "cannot be opened because the developer cannot be verified" due to lack of paid Apple Developer signature
- If you have security concerns, use the "Install from Source" method (completely transparent code)
No reverse engineering or cracking involved.
❓ FAQ
Q: macOS version shows "cannot be opened because the developer cannot be verified"?
A: This is triggered by macOS Gatekeeper (because this open-source tool is not signed with a paid Apple Developer certificate). To fix this:
- Option 1: Go to "System Settings -> Privacy & Security", scroll down and click "Open Anyway".
- Option 2: Run
xattr -cr /path/to/downloaded/filein Terminal to clear quarantine attributes.
Q: What's the difference between Python script and standalone versions?
A:
- Python script version: Requires Python environment, small size, transparent code
- Standalone version: No Python needed, ready to use, but larger file size and may trigger false positives
Both versions have identical functionality. Choose based on your needs.
Q: Why is the .exe file so large?
A: The .exe file includes the complete Python runtime environment, so ~8 MB is normal.
Q: Antivirus flagging as virus?
A: This is a known PyInstaller issue, not an actual virus. You can:
- Add to antivirus whitelist
- Use Python script version instead (recommended)
- Upload to VirusTotal for verification
Q: "Python is not recognized as an internal or external command"?
A: Python is not added to your system PATH. Reinstall Python and make sure to check "Add Python to PATH" during installation, or use the standalone .exe version instead.
Q: Why does Antigravity sometimes open without a visible UI? Is the software broken by the script?
A: Usually, this is not caused by the script, but by Electron's background process mechanics:
- The app might have started minimized to the System Tray. Check your tray icon (often a black
^icon) and double-click it to bring up the window. - There might be a "zombie"
Antigravity.exebackground process left in the Task Manager. PressCtrl+Shift+Escto end all Antigravity processes in the Task Manager and try opening it again. - If it's a completely blank screen, your antivirus might have quarantined essential unpacked code files. Run
Restore.exeto revert to the official version, temporarily disable the antivirus, and re-run the patcher to revive it.
Q: Can I still use this localization patch when the official Antigravity app updates?
A: Absolutely! Starting from v2.21.1, the script features an OTA Smart Compatibility Mechanism. When the official app updates, it releases new core files, and the localization will naturally temporarily revert to English. Simply re-run the patcher, and it will automatically detect the new version, clear the old unpacked cache, and re-extract and inject the localization into the latest official code. It is fully forward-compatible!
Q: Does this patch affect software security?
A: No. This patch only modifies UI text display and does not involve network communication, data encryption, account authentication, or core functionality. All changes are at the frontend level and do not affect communication with servers.
Q: How to add new translations?
A: Edit the dictionary in Antigravity-Patcher.py and add key-value pairs:
"English Text": "中文翻译",
Then re-run the patch script.
Q: Does it support other operating systems?
A: Currently Windows only. macOS and Linux versions have different paths and mechanisms that require separate adaptation.
More questions? Welcome to ask in GitHub Issues or Discussions!
🤝 Contributing
Issues and Pull Requests are welcome!
- Found translation errors or omissions? Submit an Issue or PR
- Have better technical solutions? Discuss in Discussions
For detailed contribution guidelines, see CONTRIBUTING.md
📄 License
This project is licensed under the MIT License.
⚠️ Disclaimer
- This project is for educational purposes only
- Users are responsible for any issues arising from using this patch
- Please use official licensed Antigravity software
- Please comply with Antigravity's Terms of Service
🌟 Star History
If this project helps you, please consider giving it a star ⭐️
📧 Contact
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ by Antigravity-zh-CN Contributors
Explore related projects
Loading…