The Antigravity CLI let a developer stitch together an Angular front-end, Firebase’s Hybrid Web SDK and on-device Gemini Nano models to ship an image-analysis app that runs in Chrome without touching the cloud. The same code falls back to Gemini 3.5 Flash for browsers that cannot run the Nano model, keeping the experience functional everywhere.
Why the combo matters
AI-powered image tagging, alt-text generation and CSS suggestions improve accessibility and design, but sending every frame to a remote model quickly adds up. By running Gemini Nano directly in the browser, the demo avoids token-based billing for most users. Only Safari or other non-Chrome browsers trigger the cloud fallback, incurring a charge.
The pieces that made it click
- Antigravity CLI – an AI-driven assistant that lives in the developer’s terminal. It invokes specialized “skills” such as documentation generation, domain modeling or code review without leaving the command line.
- Stitch MCP Server – a Google-provided service that turns natural-language prompts into interactive UI screens. In the demo it produced the initial design, which the CLI exported as a
DESIGN.mdtoken file. - Angular MCP Server – supplies best-practice scaffolding and tooling for the Angular development server, ensuring the project follows modern patterns like Signals.
- Firebase Hybrid Web SDK – bridges the front-end to Firebase’s AI Logic layer and the Prompt API used to call Gemini models.
The Prompt API decides whether the request stays on the device (Gemini Nano) or is sent to the cloud (Gemini 3.5 Flash). Chrome 148+ includes the runtime needed for the Nano model; other browsers automatically trigger the cloud path.
How the developer kept quality high
Four AI skills ran repeatedly:
- grill-with-docs – produced an Architecture Decision Record (ADR) that captured the high-level design and trade-offs.
- domain-modeling – outlined the data structures that feed the image-analysis pipeline.
- code-review – a pair of sub-agents scanned the repository for smells, mismatches to the ADR and any drift from the original specification.
- angular / firebase – verified that the code followed modern Angular idioms and that Firebase AI Logic calls were correctly formed.
Two workflows emerged. First, the ADR generated automatically with /grill-with-docs; then /goal instructed the AI to implement the decision record end-to-end. Second, the developer wrote the ADR manually and ran /code-review to let the AI check the implementation. The manual route builds “muscle memory” while still catching regressions early.
The UI pipeline in practice
The developer typed a short description of the desired screen into Stitch. Stitch returned a mockup. The Antigravity CLI parsed the mockup, extracted design tokens and wrote them to DESIGN.md. Those tokens mapped designs to production-ready Angular components.
The front-end loads the Gemini Nano model locally on Chrome 148+ and falls back to Gemini 3.5 Flash via Firebase when the required runtime is missing, incurring a token charge.
The trade-offs
On-device models limit you to tasks that fit within the Nano’s capacity—simple classification, captioning and style suggestions. More complex vision work still needs a cloud model.
Takeaway
The Antigravity CLI shows that developers can now assemble a full-stack AI image-analysis flow—Angular UI, Firebase backend and on-device Gemini inference—without paying for most inference calls. The approach hinges on Chrome’s on-device model support, but it offers a clear blueprint for cost-sensitive apps that can tolerate a cloud fallback for edge cases.
