![[AI Practice] Building blazing-Fast AI Mac OS App with Antigravity CLI](https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0c46l59dnusxpmnao70k.png)
Foreword: A Developer's New Collaboration Model Imagine this scenario: you are...


Imagine this scenario: you are developing a real-time meeting translation App that combines macOS low-level audio (CoreAudio/ScreenCaptureKit) with Gemini Live API WebSocket. During the testing phase, the program suddenly crashed with an error, and the audio stream produced a complete silence of all zeros.
In the past, your troubleshooting process might have been:
README.md, write a blog post, create a GitHub repository, commit the code, and push it.In this development cycle, we adopted the AGY CLI (Antigravity-CLI) agent designed by Google DeepMind. We were surprised to find that all the tedious context switching mentioned above could be fully automated through conversations with the intelligent agent within the terminal. This article will reconstruct the actual Prompt dialogue flow and share how we collaborated with AGY CLI to build a macOS meeting translation App from scratch.
Everything originated from a development idea and a newly released Google API document. The developer pasted a URL into the terminal for AGY CLI and posed the first core question:
User : Following this example, is it possible to create a Mac OS App that can capture audio from the computer and translate it into other languages in real-time? Start helping me think about how to do this. My main goal is to be able to use it for Zoom / Google Meet meetings to directly translate other countries' languages into Traditional Chinese.
Here are other documents for your reference: https://ai.google.dev/gemini-api/docs/live-api/live-translate?hl=zh-tw
Upon receiving the instruction, AGY CLI acted as an architect, quickly analyzing and providing a set of native macOS solutions:
AVAudioConverter to resample multi-channel/stereo 48kHz audio in real-time to the 16kHz mono PCM format supported by Gemini Live.URLSessionWebSocketTask to send PCM audio chunks while receiving Traditional Chinese translation results and broadcast audio.Before starting to write Swift code, the developer raised questions about the macOS compilation environment:
User : Do I absolutely need Xcode to compile?
User : Help me run xcode-select –install
Addressing the developer's environment anxiety, AGY CLI provided the answers:
build_app.sh, which directly calls the terminal's swiftc command-line tool to compile all .swift source files and automatically packages them into a complete .app directory structure.xcode-select --install locally, automatically configuring the Swift compilation environment.After the code was initially completed, the developer ran the App from the command line, but the connection status showed abnormalities, and no characters were translated:
User : Didn't see any error messages~ but the connection status is disconnected
This was the moment for AGY CLI to demonstrate its "autonomous troubleshooting" power. Upon receiving the prompt, it automatically located the debug.log file, called tail to analyze the runtime logs, and identified two critical issues:
models/gemini-3.5-flash, whereas the Live WebSocket API only accepts gemini-3.5-live-translate-preview.v1alpha version SDK, which wrapped inputAudioTranscription within generationConfig; however, the native WebSocket's v1beta endpoint required these two fields to be placed directly under the setup root directory. This was the culprit behind the CloseCode 1007 crash.ScreenCaptureKit was truncated to complete silence (all zeros) during copying in the old code due to insufficient AudioBufferList memory allocation.AGY CLI immediately proactively modified AudioCaptureManager.swift, introducing the "Double-Call" register allocation pointer technique, and refactored the Payload structure of GeminiLiveConnection.swift.
After the modifications were completed, the application ran smoothly, the console log finally printed 是否為靜音(全0): false (Is it silent (all 0s): false), and both real-time bilingual subtitles and real-time broadcast audio functioned correctly!
Once the developer confirmed that the program was working correctly, the final step was to open-source and share the code:
User : I want to check in the swift-demo folder to my own GitHub repo. Give me a suggested repo name and write a README.md under swift-demo.
User : Help me commit all relevant changes in that folder to [email protected]:kkdai/gemini-live-translate-macos.git
AGY CLI immediately took over the final DevOps tasks:
gemini-live-translate-macos as the Repo name and wrote the project's English GitHub description and topics tags.git init in the background, wrote .gitignore, committed all the code, and successfully pushed it to the remote GitHub repository!Through this collaborative development with AGY CLI, we experienced an unprecedentedly rapid development process:
This practical experience proves that in the era of Agentic AI, a single developer, paired with a powerful CLI agent, can deliver a high-quality Native application involving system-level foundations and the latest APIs in an extremely short amount of time. See you next time!
aiHave you ever tried to read a massive pile of reports and summarize them in under 50 words? It’s...
aieIn his keynote on Wednesday, Benoit Schillings, vice president of Technology at Google DeepMind and...
geminiThis article covers the MCP setup and configuration for using Google Omni Preview and underlying...
ai✨ Overview This article explores how Gemini tokenizes data and demonstrates how to count...
aieYesterday, we kicked off our physical newspaper, The Daily Context, at the AI Engineer World’s Fair...
aieWe (at DEV and MLH) are covering AI Engineer's World Fair by printing a physical newspaper called...
Workflows from the Neura Market marketplace related to this Gemini resource