YouMind
Sign in

Stop Using the Antigravity App: Unlock Gemini 4's Full Power with CLI + T3 Code

@leaf_sanren
SIMPLIFIED CHINESENov 22, 2026
192K
844
112
85
1.8K

TL;DR

A comprehensive guide on migrating from the Antigravity App to Antigravity CLI and T3 Code to fully leverage Gemini 4's capabilities for video generation, coding, and agent workflows.

Gemini 4 is powerful, but please don't use it inside the Antigravity App!

This week, I sent a command to Neon in the App. I stepped away for 10 minutes and came back to find the interface still stuck on "Thinking for 78 seconds," with zero output and no visibility into which tools it was calling.

https://x.com/leaf_sanren/status/2124123847230193923

https://x.com/leaf_sanren/status/2124096878300307836

The same Gemini 4, switched to the command line, lets you watch it work step-by-step; switched to T3 Code, it reports progress as it thinks, and you can roll back changes with one click. My viral white cat replication video (seen by over 70k people) and my recent surveillance-style short film (costing only 42 credits) were both produced this way.

This guide covers Antigravity CLI and T3 Code from installation to mastery, with real cases I've run myself. Commands and prompts are ready to copy-paste. For App usage, chasen's comprehensive tutorial already covers it, so I won't repeat that here.

Table of Contents

I. Antigravity CLI: From Installation to Mastery

  1. Install: Which membership tier, bypassing region locks, one-line install
  2. Get Started: Interface basics, model selection, quota checks, first task
  3. Configure: Rules, Skills, MCPs to make it understand you better
  4. Real-World Use: One-sentence video generation, integrating both membership quotas
  5. Advanced: Slash workflows, session management, powering Claude Code, remote control via phone

II. T3 Code: From Installation to Mastery

  1. Why it's smoother than the App: ACP explained through testing
  2. Install: Setup, connecting Antigravity, selecting models and permissions
  3. Real-World Use: One prompt to build a Logo-to-Robot tool
  4. Master It: Multi-agent handoffs, rollback, mobile app remote control, reconnecting after drops
  5. Limits: Three tasks where you should stick to the CLI

III. How to Choose Between Them: Which Tool for Which Task?

───

Before we start, let's distinguish two things.

Many people subscribe to Google AI membership thinking Gemini 4 is just the chat box on the web.

Gemini App (gemini.google.com, mobile, and Mac versions) can chat, read PDFs, generate images, and switch to "Task" mode for new conversations: breaking down search plans, querying multiple sources concurrently, scraping full webpage text, and running code or generating tables in a cloud workspace. I used it once for research; it ran for 20 minutes, and I spent 2 hours reading the results.

Leaf Yeah! - inline image

https://x.com/leaf_sanren/status/2110323436837024132

But it cannot touch your computer: It can't read your project folders, run terminal commands, or use your installed Skills and tools.

Antigravity is an Agent that works inside your computer. It reads/writes local files, runs commands, installs tools, and calls other programs. Its quota is separate from the Gemini App. This article focuses entirely on it.

───

I. Antigravity CLI: From Installation to Mastery

Antigravity CLI is the command-line version of Antigravity: Chat with Gemini 4 in your terminal, and it directly reads/writes files and runs commands on your computer.

Leaf Yeah! - inline image

Official Site:

https://antigravity.google

After installation, the command you type in the terminal is agy, short for Antigravity. Wherever you see agy in the code below, it refers to this.

Don't worry if you're not comfortable with terminals. A terminal is just a typing window. Every command below is copy, paste, enter.

1. Install: Membership Tier, Region Bypass, One-Line Install

Membership: Buy Pro directly.

  • Plus doesn't include Neon; starting Nov 18, Hydrogen is also exclusive to Pro and Ultra. Plus users are left with the previous gen 3.8 Flash in Antigravity.
  • Pro includes Neon, Hydrogen, Argon, Orchestrator, plus Claude Opus 5.5 and Sonnet 5.5.
  • Ultra adds the strongest Carbon, with 5x or 20x the quota of Pro. For daily writing, video analysis, and generation, Pro is sufficient.

Black Friday Pro annual plan is $99.99. My method: Start with monthly, then go to Google One membership management, click "Change Plan," and switch to "Annual US$99.99." Check carefully before clicking; monthly fees are prorated and refunded (I got $4 back).

Leaf Yeah! - inline image

Region: 90% of people get stuck here.

If you see this error upon login, it's a region lock issue:

Leaf Yeah! - inline image

If it persists even with a VPN, check these layers in order:

  1. Node: Use clean US or Japan nodes, avoid shared ones with hundreds of users.
  2. Account's "Associated Country": Google accounts have a backend associated country, distinct from what you entered in Google Play. Changing Play settings alone doesn't work. Submit this form, choosing reasons like "Frequent Traveler" or "Work/Residence in different regions." Avoid selecting VPN or account sharing. My request was approved in under half a day:

https://policies.google.com/country-association-form

Leaf Yeah! - inline image
  1. Node Misidentified as Hong Kong: Speed test sites might say you're in the US, but Google uses its own IP database. Some data center US IPs are flagged as HK by Google. Switch to a node in a different group.

I posted specifically about this earlier, and many readers succeeded following those steps:

https://x.com/leaf_sanren/status/2100897963367334351

Installation: One Command.

Open Terminal (Mac: Applications > Utilities > Terminal; Windows: PowerShell), paste, and hit Enter:

Mac / Linux:

bash
1curl -fsSL https://antigravity.google/cli/install.sh | bash

Windows:

bash
1irm https://antigravity.google/cli/install.ps1 | iex

Note: Do NOT add sudo before the command. It bypasses your proxy and causes download hangs.

After installation, close and reopen the terminal. Type agy --version. If a version number appears (mine is 1.5.14), it worked.

Login:

Navigate to the folder where you want it to work, then type agy:

bash
1cd ~/Downloads/my_project
2agy

First time asks for color scheme/display preferences, then "Trust this folder?" Select Trust. It opens a browser; log in with your Pro-linked Google account. Return to the terminal, and you're good.

On remote servers, it prints a URL. Open it on your local machine, log in, and paste the code back into the terminal.

One-Click Prompt: First Command After Install

text
1Run a health check:
21. Tell me my current membership tier and available models;
32. Run /usage and explain each quota pool's remaining balance and refresh time in Chinese;
43. Check if network access to google.com redirects to .hk. If so, remind me to change nodes.

How to verify success: If it reports your membership tier and model list, installation, login, and region checks are all passed.

2. Get Started: Interface, Models, Quotas, First Task

Interface: Remember these keys.

It's just an input box. Type and press Enter to assign tasks.

  • @: Reference files/folders, e.g., @script.md help me edit paragraph 3;
  • /: Call commands (detailed in section 5);
  • Shift + Tab: Cycle permission modes. Default asks for every command. Next: Auto-accept edits, Auto, Plan-only. Beginners should stick to default;
  • Ctrl + C: Interrupt. Press twice when idle to exit;
  • Shift + Enter: New line without sending;
  • Ctrl + O: Expand tool outputs to see exactly what it ran;
  • Ctrl + G: Write long prompts in your editor; save to send.

Models: Hydrogen for Daily, Neon for Hard Tasks.

Use /model to select, /effort to adjust thinking depth. My recipe:

  • Daily, video analysis, prompt reverse-engineering: Hydrogen. Despite complaints about slowness, Hydrogen feels quite fast;
  • Hard tasks, need it right first try: Neon, set effort to XHigh;
  • Critiquing plans: Claude Opus 5.5. Separate quota pool, usually empty, discussed later.
Leaf Yeah! - inline image

Quotas: /usage reveals three pools.

Leaf Yeah! - inline image
  • Gemini Pool: Neon, Hydrogen, 3.8 Flash, Orchestrator draw from here. Refills every 5 hours, with a weekly cap outside;
  • Claude & GPT Pool: Opus/Sonnet have their own small pool. Pro users report ~1.6M tokens for Opus before depletion. Use for short, critical tasks;
  • Argon Pool: Argon has its own weekly quota.

All three reset weekly independently. Unused quota expires. When writing this, my Claude and Argon pools were at 100%.

Key insight: CLI quota is separate from Gemini Web quota. I ran a 3-hour long-video analysis via CLI in September; checking the web portal later showed only 1% usage:

https://x.com/leaf_sanren/status/2101146259415515595

First Task: Analyze a Video.

Gemini 4 excels at video understanding. Put a video in the current folder and say:

text
1@clip.mp4 Watch this video. Break it down into a shot list: timestamp, visual, camera movement, subtitles for each shot. Finally, reverse-engineer a prompt to replicate it and write it to shots.md.

For a 10-second clip, Hydrogen took 52-60 seconds in my tests, outputting the shot list, descriptions, and prompts to the file.

Note: Place videos in pure English paths (e.g., ~/Downloads/agy_input/). Chinese paths caused repeated disconnects and no output for me.

3. Configure: Rules, Skills, MCPs

Once basic tasks work, you'll notice repetitive instructions like "Answer in Chinese" or "Backup before editing." This section saves those habits.

Rules: Make it remember your preferences.

Antigravity CLI reads rule files at startup. Global rules go in either location (applies to all projects):

text
1~/.gemini/GEMINI.md
2~/.gemini/AGENTS.md

Project rules go in AGENTS.md or GEMINI.md in the project root. Max 24KB per file.

My Method: Maintain one source of truth. I use Antigravity, Claude Code, Codex, and Grok. Previously, I updated rules separately for each, often forgetting one. Now I update Claude Code's file and run a sync script to regenerate Antigravity's GEMINI.md.

To achieve this, give it this prompt:

text
1Write a sync script: Use my primary rule file as the single source of truth to generate ~/.gemini/GEMINI.md. Replace tool-specific names with generic terms. Don't rewrite if content hasn't changed.

Verify: Start a new chat and ask, "What is your first global rule?" Mine responds with "My Lord" immediately.

Skills: Save workflows as commands.

A Skill is a folder containing SKILL.md describing how to do something. Once added, it becomes a slash command and auto-triggers when relevant.

Global skills go here; project-level in project/.agents/skills/:

text
1~/.gemini/antigravity-cli/skills/

Run /skills reload to activate.

I have 15 skills, symlinked from Claude Code so one definition works for both. Example: A Douyin video downloader skill takes a link, downloads it, and analyzes it automatically.

Packaged skill sets are plugins. Install with one line:

bash
1agy plugin install https://github.com/<author>/<repo>

Verify: Type / and check if your new skill name appears.

MCPs: Connect external tools.

MCPs are plugs for Agents to call external services (browsers, DBs, Notion, video gen). Manage via /mcp in chat. Config file:

text
1~/.gemini/config/mcp_config.json

Concepts are abstract. The next section shows a real case using one MCP + one Skill to integrate video generation quotas.

4. Real-World Use: One-Sentence Video Generation

Gemini 4 understands video but doesn't generate it. Google's Omni and Veo models do, and Google AI Pro membership includes two quotas for them:

  • Flow Credits: Google Flow is the official AI video web app. Pro gets 1000 credits/month;
  • AI Studio Grant: Pro gets $10/month Google Cloud credit, usable for Gemini API video models.

I integrated both into Antigravity CLI:

  • MCP for Flow: Installed open-source gflow-cli, registered as MCP. Antigravity can check Flow credits and call Omni/Veo;
  • Skill for Routing: Created a "Video Gen Router" Skill: Use Flow credits first. When depleted, alert me and switch to AI Studio API (using grant credits).

Now I just say "Generate a video based on this reference," and it handles everything: analyzing reference, breaking down shots, creating character sheets, writing prompts, selecting models, generating, and downloading.

Grant Credit Line: White Cat Video (70k+ views).

I saw a viral video of a white cat riding an invisible motorcycle on a highway. I gave it the original. It analyzed, broke down shots, swapped in my custom fat cat character sheet, wrote scripts calling Omni 1.2 Flash via Gemini API. My takeaway: Hydrogen handled all breakdown and prompting; no need for Neon/Carbon.

https://x.com/leaf_sanren/status/2123687539642933402

Its prompt had a clever trick: Written specifically for Omni's "Universal Reference" feature, feeding reference video, character sheet, and keyframes in order, plus "Only change the cat, keep every other frame identical." I shared the full prompt in that post for reuse.

Flow Line: Surveillance Style Short (42 credits).

New trend: 2001 late-night surveillance footage aesthetic. Fully generated by Antigravity calling Google Flow. I didn't write a single word of the prompt.

https://x.com/leaf_sanren/status/2124435220929867952

Workflow:

  1. Nano Banana Pro generates first frame: Ceiling corner camera view, black-and-white grain, wide-angle distortion;
  2. Omni 1.2 Flash turns first frame into 15s video, actions timed second-by-second;
  3. Takes last frame of segment 1, continues with 13s segment 2;
  4. Post-processes into 4:3 surveillance aspect ratio, adding date/timecode/camera ID overlays.

Total cost: 42 Flow credits (out of 1000/month). Last week's "1999 Digimon Tape" video, done in one Neon XHigh pass, cost 36 credits:

https://x.com/leaf_sanren/status/2123434753504477660

Choosing Lines:

  • Flow Credits: Accepts 15s reference videos, outputs 720p. No official API; requires MCP/browser automation. Strict moderation;
  • AI Studio Grant: Pure backend execution, easiest. Reference max 10s. 360p is best for trial/error.

Note: Grants aren't automatic. Claim manually in AI Studio bottom-left, then pre-load $5 to enable API calls. Full setup guide, claim steps, and prompts are here:

https://x.com/leaf_sanren/status/2122673250778194327

One-Click Prompt: Build Video Router

text
1Set up a video generation router in Antigravity:
21. Check if gflow (open-source Google Flow CLI) is installed. If not, install and register as global MCP;
32. Create a Skill: Prioritize Flow credits for video gen. If insufficient, alert me and switch to AI Studio Gemini API (read key from env var GEMINI_API_KEY, do not print it);
43. Generate a test video at 360p, shortest duration, and report cost in credits/dollars.

5. Advanced: Workflows, Sessions, Claude Integration, Remote

Slash Workflows: Don't Chat for Hard Tasks.

  • /plan: Assess situation, list plan, wait for approval before acting; prevents reckless changes
  • /grill-me: Ask questions one by one before starting; clarifies vague requirements
  • /goal: Give objective, it runs until verified complete; clear acceptance criteria
  • /swarm: Parallel agents with checker; batch independent tasks
  • /boost: Deep reasoning with multi-agents; hard bugs, cross-file issues
  • /teamwork: Larger teams, longer cycles; expensive, use cautiously
  • /btw: Background side-question without interrupting main task
  • /learn: Save corrections as rules/skills; useful after repeating mistakes
  • /schedule: Timed/periodic wake-ups; daily checks
  • /browser: Spawn browser sub-agent to click/screenshot; verify web effects

Use /swarm for batches, not Orchestrator. I made this mistake: Batch downloading 15 viral videos + 89 images, then reverse-engineering prompts. Used Orchestrator, took 1.5 hours.

https://x.com/leaf_sanren/status/2122115933514965116

Later realized: Orchestrator runs serially (Plan->Execute->Feedback loops). For independent tasks like download+analyze, /swarm parallelizes dozens of agents, much faster.

/teamwork is risky. @chasen_liao tested it: Pro's 5-hour quota wasn't enough for one task. He uses /boost blindly for hard tasks.

Session Management: Continue Previous Work.

  • agy -c: Resume last conversation;
  • /resume: Pick from history;
  • /fork: Branch current convo to try alternative approach without ruining original;
  • /rewind: Go back to specific step;
  • /compact: Compress long conversations to continue.

Powering Claude Code: Use it as Eyes.

agy -p is "Ask, Output, Exit" mode. No interactive UI, ideal for scripts or other agents:

bash
1agy -p "Watch @clip.mp4, break down into shot list" --model gemini-4-hydrogen-high

My Common Combo: Claude Code as main driver, calls local Antigravity CLI for video tasks. Claude Code can't watch videos natively. Let Gemini 4 analyze and write to file, then Claude reads and proceeds. 10s video analysis takes ~1 minute.

Add --output-format json for structured results; --print-timeout 900s to prevent hangs.

Instruction for Claude Code:

text
1When encountering video tasks, don't guess visuals. Use agy -p to call local Antigravity CLI with gemini-4-hydrogen-high. Have it write shot list to file. You read file and proceed. Copy video to pure English path first.

Remote Control: Monitor from Phone.

Start with --remote-control or type /remote-control on in chat. View sessions, send commands, approve permissions via mobile browser.

───

II. T3 Code: From Installation to Mastery

T3 Code is an open-source Agent client (GitHub 70k stars, MIT license). It doesn't bundle models but integrates Claude Code, Codex, Antigravity, Cursor, Grok into one interface.

Community consensus: Best experience with Gemini 4 is via T3.

Leaf Yeah! - inline image

1. Why Smoother Than App: ACP Explained

T3 connects to Antigravity via Google's official ACP interface. Think of ACP as a standard plug: Editors and Agents speak the same protocol, allowing any editor to connect to any agent.

Why faster? I tested: Same 10s video, same Hydrogen High.

  • CLI agy -p: 60s (another morning run: 52s);
  • Via ACP (T3): Connect + Session 5s, Work 44s.

Speed is similar; engine is the same. Difference is process visibility: ACP streams thoughts and tool calls live. That round pushed 11 thought segments and 2 tool calls. First formal answer took 35s, but you saw activity throughout.

App feels slow because you see nothing and wait; T3 feels smooth because you always know what it's doing. Plus rollback and multi-agent tabs change the experience completely.

2. Install: Setup, Connect Antigravity, Models/Permissions

Install:

Mac:

bash
1brew install --cask t3-code

Windows:

bash
1winget install T3Tools.T3Code

Or download desktop version from site:

https://t3.codes/download

Connect Antigravity:

  1. Open T3 Code, Gear icon > Settings > Agents > Providers;
  2. Toggle Antigravity ON;
  3. Click Install managed runtime under Runtime;
  4. Click Login under Account, authenticate with Pro Google account;
  5. Status becomes Authenticated · Google account.
Leaf Yeah! - inline image

Note: To use your own installed Antigravity CLI instead of T3's managed one, set Binary path in Settings (Mac: ~/.local/bin/agy), version >= 1.5.12. Beginners should use managed runtime.

Models & Permissions:

Select model/thinking level in bottom-right of input box. List reflects your membership (Pro sees Neon/Hydrogen, plus Claude/GPT).

In input box: @ references files, $ calls Skills, / calls commands.

Permission levels:

  • Supervised: Asks for every step;
  • Auto-accept edits: File changes auto-approved, others asked;
  • Auto: Routine ops auto, uncertain ones asked;
  • Full access: Everything allowed.

Note: New threads default to Full access. Beginners should change default to Supervised in Settings > Threads.

3. Real-World Use: Logo-to-Robot Tool

Settings are abstract; here's a completed case.

Prompt to T3's Gemini 4 Neon: Build a web tool: Upload any logo, auto-transform into breathing, mouse-tracking, jumping robot. Export animated GIF/code. Acceptance criteria: 8 items including format support, 4+ animation states, eye tracking, 11 sample logos displayed, 2 export types working...

Result:

Leaf Yeah! - inline image
  • Pure frontend web page, no backend/API key needed;
  • 11 sample logos transformed, each with 7 state animations, eyes follow mouse;
  • Exports 4 types: Transparent GIF, PNG sequence, runnable HTML code, reproducible params;
  • Self-tested all 8 criteria: Opened browser, uploaded files, clicked states, measured eye offset, screenshotted evidence, marked "Pass".

After v1, it self-reviewed in browser, identified 5 ugly robots (e.g., misjudged shapes), fixed algorithm, regenerated. Effective dev time: 26 minutes.

It disconnected 4 times mid-run (T3/Antigravity service reconnects). Each time I said "Continue," it resumed without rework.

Takeaway: In T3, you watch Neon break down requirements, code, self-test, critique itself, rather than staring at a spinning "Thinking..." indicator.

4. Master It: Multi-Agent, Rollback, Mobile, Reconnect

Multi-Agent Handoff: Switch anytime in one thread.

T3's killer feature: Switch models/agents mid-thread. Community workflow: Fable plans, Opus designs, Antigravity UX, GPT executes. No need for 3-4 clients:

https://x.com/dasungta_zhang/status/2123963654207140238

Each thread can use git worktree: Agent works in isolated copy, main dir stays clean. Review diff, merge, commit, push, PR with one click.

Slash commands work: Type / during session. Antigravity commands appear under Provider group (/plan, /goal, /compact).

Rollback: Undo bad changes.

Every turn has checkpoints. Rollback restores files to that turn.

Detail: Antigravity can't rewind conversation itself, so T3 starts new session and feeds preserved context. Seamless for user, though first turn after long-convo rollback is slower.

Mobile App Remote: Monitor from bed.

T3 has iOS/Android apps. On PC terminal:

bash
1t3 up

Choose T3 Connect (no router config) or LAN. Runs in background. Open T3 App on phone, login, select PC. View progress, send commands, approve permissions. Tailscale users can also use that.

Reconnecting: Just say "Continue."

Long tasks drop occasionally (like LogoBot above). Don't panic or restart thread: Type "Continue" in original thread. It resumes from break point; prior work remains.

5. Limits: Stick to CLI for These

Deep comparisons show T3 disadvantages:

  • /swarm barely usable: Sub-agents visible but unmanageable in T3;
  • Large MCP tools dropped: Antigravity ACP interface discards MCP tools with descriptions > ~1280 bytes;
  • Skills imprecise: Model guesses which skill to use, no exact targeting.

So for heavy batch video analysis/auto-gen using /swarm and MCPs, stick to Antigravity CLI.

One-Click Prompt: Throw at T3's Antigravity

text
1Do not modify files yet.
21. Read project, tell me purpose and entry points;
32. List top 3 areas needing improvement;
43. Wait for my choice, then create worktree, implement, show diff.

───

III. How to Choose: Which Tool for Which Task?

  • Watch videos, break down virals, reverse prompts: Both; use CLI /swarm for batches
  • One-sentence auto-gen (Flow + Grant integration): CLI (needs MCP + Skill)
  • Give Claude Code/Codex Gemini 4's eyes: CLI agy -p
  • Build tools, edit projects, want visibility: T3 Code
  • Rollback bad changes: T3 Code (CLI has /rewind too)
  • Handoff between Claude, Codex, Gemini in one task: T3 Code
  • Monitor from phone: Both; choose T3 for native App
  • Chat, research, surveys: Neither; use Gemini App "Task" mode

My Combo: T3 Code as daily cockpit, Antigravity CLI as backend worker. Build/edit in T3 with visibility; batch analyze/gen/power Claude via CLI in background.

───

Final Thoughts

I migrated from App: Waiting 10 mins with no feedback -> CLI with step-by-step visibility -> T3 with live thinking and instant rollback. Gemini 4 is the same model; changing the entry point unlocks its true potential.

If this freed Gemini 4 from the App trap, share with friends still waiting in the App. Questions? Comment below 👇

Remix in YouMind

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles