A floating scientist in a lab coat operates a control panel with a lever, a terminal screen reading prompt, a Python logo, and drawers labeled FLOW, DATA, and LOGS, beside a waving robot.

How to Use Google's Antigravity CLI for AI Code Assistance

Antigravity CLI is a terminal-based AI coding tool that brings Google’s agent assistance into your workflow. After installing it and signing in with your Google account, you can ask questions about your code, add new features, track down bugs, and even dispatch multiple subagents to work on separate tasks in parallel, all without leaving your shell:

Antigravity CLI
Antigravity CLI

Antigravity CLI replaced Gemini CLI, which Google retired in June 2026. If you’ve used Gemini CLI, then a lot of this will feel familiar. Your skills, hooks, subagents, and plugins carry over, and the tool still reads its configuration from ~/.gemini/.

You don’t need any of that history to follow along, though. This is a hands-on guide to using Antigravity CLI, not a migration manual. But if you’re switching, then the Coming From Gemini CLI? section rounds up what changed and what to watch out for.

You’re about to install Antigravity CLI, sign in with your Google account, and put it to work on a Python project. It’ll read an unfamiliar module, review it against your conventions, and refactor the code while the agent verifies its own work.

Prerequisites

To follow along with this tutorial, you’ll need the following:

  • Google Account: A Google account lets you sign in to Antigravity CLI. A free account is enough to finish this tutorial, although the free tier’s usage limits are tight and have shifted since launch, so expect to bump into them on longer sessions.
  • Python 3.12 or higher: You’ll work with a small Python command-line application. If you haven’t already, install Python, making sure the minimum version is Python 3.12.

Because Antigravity CLI is a command-line tool, you should feel comfortable navigating your terminal and running basic shell commands. The tool ships as a single binary for macOS, Linux, and Windows, so any of these platforms will work. Unlike Gemini CLI, it doesn’t depend on Node.js, which means there’s no separate runtime to install first.

Go ahead and download the supporting materials for the Python project you’ll work with throughout this tutorial:

Once you’ve extracted the files, you’ll find an expense-report/ directory with a tiny command-line tool that reads a CSV of transactions and prints a per-category spending summary. To get the most out of this tutorial, initialize a new Git repository in that directory and make an initial commit so you have a clean baseline to diff against later:

Language: Shell
$ cd expense-report/
$ git init
$ git add .
$ git commit -m "Initial commit"

This project is the kind of small, undocumented script you might inherit from a teammate, which makes it a good testing ground for Antigravity CLI’s code-reading and refactoring features.

Step 1: Install and Set Up Antigravity CLI

Before you can use Antigravity CLI, you need to install it and sign in with your Google account. In this step, you’ll run the official installer, verify the freshly installed agy command, authenticate, and pick a capable model.

Install the Binary

Antigravity CLI is distributed as a self-contained binary file that ships with the entire Go runtime, so you can download and install it using a single command. Here’s how you can run the official installer script for your platform:

Language: Windows PowerShell
PS> irm https://antigravity.google/cli/install.ps1 | iex
Language: Shell
$ curl -fsSL https://antigravity.google/cli/install.sh | bash

The installer places the agy executable in a local bin/ directory, which is ~/.local/bin/ on macOS and Linux. As part of the same run, the installer’s setup step also tries to wire up your PATH and shell profile for you.

Open a new terminal session, or reload your shell profile, and then confirm that the installation worked by checking the version:

Language: Shell
$ agy --version
1.0.12

If you see a version number, then you’re ready to authenticate. Because it’s a single Go binary, Antigravity CLI updates itself in place whenever a newer release is available. But you can trigger that manually at any time with agy update.

Authenticate With Google

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Article

Already a member? Sign-In

Locked learning resources

The full article is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Article

Already a member? Sign-In

About Bartosz Zaczyński

Bartosz is an experienced software engineer and Python educator with an M.Sc. in Applied Computer Science.

» More about Bartosz

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

What Do You Think?

What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment below and let us know.

Commenting Tips: The most useful comments are those written with the goal of learning from or helping out other students. Get tips for asking good questions and get answers to common questions in our support portal.


Looking for a real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!

Become a Member to join the conversation.

Keep Learning

Related Topics: intermediate ai tools