Make reviewed code changes with Antigravity CLI
Install Google's Antigravity CLI, have its agent plan a code change, review the plan and each edit, then set project rules in about 25 minutes.

What you need
Step 1: Install the CLI
3 minThe
agycommand runs Google's coding agent right in your terminal.- Mac or Linux: run the command below in a terminal.
- Windows: in PowerShell, run
irm https://antigravity.google/cli/install.ps1 | iex. - Run
agy --versionto check the install.
Mac or Linux: run thiscurl -fsSL https://antigravity.google/cli/install.sh | bash
You should see a version number, with no error.
The terminal says
agy: command not found?The install folder isn't on your PATH. Add
export PATH="$HOME/.local/bin:$PATH"to~/.zshrcor~/.bashrc, then open a new terminal.Step 2: Start the agent in your project
3 minThe folder where you start
agybecomes the agent's workspace.- In the terminal, go to your project folder with
cd, then runagy. - Sign in with your Google account in the browser window that opens.
- Pick a color scheme and a rendering mode, then confirm that you trust the folder.
You should see the agent's prompt box, with your account email in the header.
Sign-in fails with
secret keyring is locked?On a Mac, allow
agyin the keychain item's Access Control tab. On Linux, unlock your keyring. Then runagyagain.Working over SSH?
agyprints a link instead. Open it on your own computer, sign in and paste the code back.- In the terminal, go to your project folder with
Step 3: Ask for a plan first
5 minA plan shows you the agent's approach before it writes any code.
- Type
/plan, then describe the task in one or two sentences, as below. - Type
@and part of a file name to point the agent at the right file. - Press Enter and wait while it reads your code.
Your prompt/plan Add input checks to [YOUR FORM OR FUNCTION] in @[FILE]. Reject empty and badly formatted values with a clear error message. Add a test for each case. Don't change any other behavior.
You should see an Implementation Plan in the terminal, and
/artifact to reviewin the status bar.The plan touches files you didn't expect?
Mention the right files with
@and say what is out of scope, such as "Don't edit the database code." Then run/planagain.Mentions match loosely:
@bkjscan findsrc/routes/bookmarks.js.- Type
Step 4: Review and approve the plan
4 minThis is your checkpoint. Fixing a plan is much easier than undoing code.
- Press Ctrl+R to open the artifact picker, then press Enter on the plan to read it.
- To change a step, move to its line, press
c, type your note and press Esc. - Press
yto approve, ornto reject. Then press Esc to send your review to the agent.
You should see the plan marked approved, and the agent starting on the first task.
The agent didn't act on your notes?
Add each note as a line comment, reject the plan with
nand press Esc. If it still misses, type the change as a normal message.Step 5: Check each edit as it lands
6 minIn the default mode, the agent shows a diff before each file edit and asks before it runs a command.
- Read each diff, then press
yto accept it ornto reject it. - For a terminal command, press
yto run it,nto decline oreto edit it first. - When the agent stops, type
/diffand open Per Turn to see what each turn changed.
You should see your change and its new tests listed in the diff viewer.
It asks about every small edit?
Press Shift+Tab to switch to
accept-editsmode. File edits in your project then go through on their own, but commands still ask first./undorewinds the conversation. To drop file changes, use Git, which is why you committed first.- Read each diff, then press
Step 6: Save rules for every task
4 minThe agent reads an
AGENTS.mdfile on every turn, so you stop repeating the same instructions.- In your project's top folder, create a file named
AGENTS.md. - Paste the rules below, and change the commands to match your project.
- Type
/clearto start a new conversation, then give the agent its next task.
Your rules# Project rules - Before you finish any task, run the tests with `[YOUR TEST COMMAND]` and fix any failures. - Run `[YOUR TYPE CHECK COMMAND]` before you say a task is done. - Keep changes small. Ask before you add a new dependency. - Never open or edit `.env` files or anything that holds keys.
You should see the agent running your tests at the end of its next task, without being asked.
The agent skips a rule?
Check that the file is named
AGENTS.mdand sits in the folder where you startagy. Subfolders below that folder aren't scanned.Never put API keys or tokens in
AGENTS.md. It's plain text that gets shared with your repo.- In your project's top folder, create a file named
You get
A planned and reviewed code change, plus an `AGENTS.md` file that sets the rules for every task after it
Try next
Did this guide work for you?
Thanks. It helps us fix the steps.
Sources
0 of 6Next: Install the CLI


