Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Interact with Antigravity CLI
/ 10
Prompt the CLI to use a built-in tool
/ 10
Test the application
/ 20
Improve the application CSS
/ 20
Generate unit tests and run them
/ 20
Add docstrings to application files
/ 20
Interact with Antigravity CLI
/ 10
Prompt the CLI to use a built-in tool
/ 10
Test the application
/ 20
Improve the application CSS
/ 20
Generate unit tests and run them
/ 20
Add docstrings to application files
/ 20
Imagine for a moment you work as a Software Development Engineer for Cymbal Software. Cymbal wants to adopt a partner application development program for their marketplace and many of the partners are single, independent developers. However, Cymbal needs a mechanism to review new partner generated apps and ensure that the apps are built and tested to certain standards, including: a consistent user experience, inline code documentation, and adherence to Cymbal's stylistic and branding guidelines.
In this hands-on lab, you will learn about the basics of Antigravity CLI. You will also take what you have learned, and use it to review and improve a partner-built Tic Tac Toe application using the Antigravity CLI to explain the codebase, apply a stylesheet, generate professional Google-style docstrings, and build a robust unit testing suite.
Antigravity CLI is an open-source, agent-first development terminal tool built in Go. It brings multi-agent orchestration directly into your workspace and terminal environment, enabling faster execution and background processing.
Explore other content in the Gemini Enterprise Agent Ready (GEAR) program.
In this lab, you learn how to perform the following tasks:
This lab can be run entirely within Google Cloud Shell, which comes pre-installed with Antigravity CLI.
This lab is designed for users and developers of all levels (including beginners).
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Output:
gcloud, in Google Cloud, refer to the gcloud CLI overview guide.
Since Antigravity CLI is currently being integrated into Google Cloud Shell, you need to manually install it for this lab.
In Cloud Shell, run the following command to download and install the Antigravity CLI:
Add the installation directory to your environment PATH so the agy binary can be executed from anywhere, and reload your bash profile:
To support scoring for some of the tasks in this lab, you need to enable Cloud Logging on Antigravity CLI.
In Cloud Shell, run the following command to update ~/.bashrc with custom Antigravity CLI error handling. This will help you with troubleshooting the application.
Once the commands are complete, you will notice the prompt change to green. This confirms bash is using the new file.
Run the following commands to configure Cloud Logging for Antigravity CLI:
The Antigravity CLI's behavior is controlled by configuration files and environment variables. There are two key global directories and a workspace configuration you need to be aware of:
ANTIGRAVITY.md: This file provides natural language guidelines and context to the agent. The CLI reads this file to understand your project's coding standards and conventions.
~/.gemini/antigravity-cli/settings.json: This file controls the global configuration of the CLI, including telemetry parameters.
~/.gemini/config/hooks.json: Global hooks mapping specific lifecycle events (such as model response parsing) to custom scripts.
When you use Cloud Shell to run Antigravity, a default theme for Antigravity CLI and the authentication method is already selected and configured for you.
The file that Antigravity CLI uses to "remember" your preferences is called settings.json and you can also use it to customize Antigravity CLI.
Create (if it does not exist yet) and access the global Antigravity CLI config directory with the following command:
Use nano to create a new settings.json file:
To facilitate advanced partner review automation, telemetry logging, and graceful capacity error fallback handling, you will install the custom Cymbal Developer plugin.
Copy the custom plugin package files from the Google Cloud Storage bucket to a temporary directory and grant execute permissions to the hook script:
Install the custom plugin using the Antigravity CLI:
In Cloud Shell, verify that the plugin has been successfully loaded by listing the active plugins:
You should see the cymbal-developer plugin listed as enabled and active.
Before you get started in Antigravity CLI, you need to create a folder to use as your home folder for all the projects that you may create inside of it. This is a starting point for the Antigravity CLI to work with, although it may reference some other folders on your system, as needed.
Run the following commands in Cloud Shell to create a sample folder, antigravity-projects, and navigate to it:
In this task, you interact with Antigravity CLI. To use Antigravity CLI, you must first authenticate and log in.
Run the following command to launch Antigravity CLI and start a new session:
To sign in, select the Use a Google Cloud project option, and then Continue with Google Cloud.
Complete the interactive authentication flow:
When prompted to Select billing model, use the arrow keys to select 2. Pay As You Go – Pay only for the tokens you use, billed through Gemini platform, and press ENTER.
Copy and paste your Google Cloud Project ID (
Select global for the Google Cloud Location and press ENTER.
Continue with Agent Platform if prompted.
On the setup wizard screens (Choose your color scheme and Terms of Service & Data Use), use the arrow keys to navigate and press ENTER to select Next and then Done to accept the default settings.
Before sending your first prompt, switch the active model to Gemini 3.8 Flash so it complies with the lab environment's organization policy. Type the following command and press ENTER:
Use the arrow keys to select Gemini 3.8 Flash and press ENTER.
Copy and paste the following and then press ENTER to prompt Antigravity CLI with your first query:
The GoogleSearch tool (a built-in tool in Antigravity CLI) will be invoked to search the web, returning the quote.
A quick way to understand Antigravity CLI and the various commands that it supports is to type /help (forward slash) inside the active agy session to receive a list of commands and keyboard shortcuts.
Exit the interactive Antigravity CLI session to return to your standard Cloud Shell prompt:
Type /exit (or press CTRL+D).
In this task, you will test Antigravity CLI's non-interactive mode and explore its built-in tools.
An interesting option is to run Antigravity CLI in a non-interactive mode. This means that you directly provide it the prompt and it goes ahead and responds to it, without the Antigravity CLI interactive terminal opening up. Since you have already completed your authentication in the previous task, the cached OAuth tokens will be used, allowing the non-interactive command to run instantly.
Run the following command with the -p (prompt) parameter:
Note that in non-interactive mode, you cannot continue the conversation with follow-up questions. This mode also does not allow you to authorize tools (including WriteFile) or to run shell commands.
Antigravity CLI comes with a set of built-in tools, which the agent uses to interact with your local environment, access information, and perform actions.
Launch Antigravity CLI interactive mode again to explore these tools:
Run the following command to get a list of current built-in tools:
Can Antigravity CLI simply call these tools when it wants to? The simple answer is no. By default, the agent always asks for permission when performing sensitive operations, such as writing files or executing terminal commands. You remain in full control.
Press ESC to exit the mcp mode.
In this section, you give Antigravity CLI a prompt to choose and execute one of its built-in tools.
Suppose you want to get information on the dates of the next total solar eclipse and save that into a file in the local working directory from where you launched Antigravity CLI.
Give Antigravity CLI the following prompt:
First, it will search the web using GoogleSearch. Then, it will use the WriteFile tool to write to a local file. You will be asked to authorize this write operation.
Go ahead and press ENTER to allow once for now.
To check if a file is written, you can use @ in the prompt box to open the file auto-complete helper.
It's also possible to work directly with the shell from within Antigravity CLI.
Press ! in the prompt box. This toggles to shell mode.
When in shell mode, you can use standard commands like pwd, cat, and ls, for example.
Now try printing the contents of a file via the cat command.
Give the following prompt to Antigravity CLI:
In this task and the remaining tasks within this hands-on lab you will explore how to use Antigravity CLI to assist you with partner code reviews and improvements to meet these standards.
While still in shell mode, run the command below to download, extract, and list the Tic Tac Toe codebase.
Give the following prompt to the agent:
The agent should respond with output containing a summary explaining what the app is (a tic-tac-toe game) and how it uses a 1D array of 9 elements, checks 8 winning combinations, and exposes /, /move (expecting {"position": int}), and /reset.
Now that you have a general understanding of the application, it is time to test it.
Give the following prompt to the agent:
You should see various Action Required messages, review each change and accept it by choosing Allow once. The agent will then load the dependencies, and create a virtual environment for the application and launch it via a local URL.
Click the link for the application URL. You see the application running in a new tab within your browser.
Test the Tic Tac Toe game first as a draw between X and O.
Test the Tic Tac Toe game as a win for X.
Are the results of the two games as expected? If so, the logic for the app is working as designed.
During your test you noticed that the User Interface for the Tic Tac Toe game was very basic and was effectively using only black and white. After a deeper review of the index.html file you notice that a cascading style sheet has not been applied to the page, and believe the app would be improved by applying a stylesheet. Also applying a stylesheet would help ensure the new app adheres to Cymbal's branding guidelines.
In this task you will use Antigravity CLI to modify index.html and suggest a stylesheet to be applied to it.
Give the following prompt to the agent:
The agent will suggest improving the index.html page with the addition of a CSS script at the top of the file.
Review and accept the changes so that they are applied.
Open the index.html file in the Editor, and review the changes the agent made.
Once you complete reviewing the changes access the application at http://localhost:5000 to observe how they actually were applied. Notice how color has been added to the X and O symbols.
Now that you have improved the application with the addition of a stylesheet, it is time to generate your own unit tests.
Give the following prompt to the agent:
As with previous tasks you will be asked to allow the changes. Review these and accept them.
The result is you should see the test_app.py file is generated and the agent will run the test_app.py file to perform the testing on your behalf. You should see a report with the results of the testing.
If you want to review details of the test_app.py you can use the Cloud Shell editor to open the test_app.py file.
You should see that the test_app.py file should look similar to the following:
Optional Step - If you would like to know more detail about the test results, use a prompt like:
The result is you will see further detail about the test results, as interpreted by the agent.
As part of your code review of the application files, you notice that these do not have inline documentation for various features. You can add these now using the Antigravity CLI.
Give the following prompt to the agent:
You see that the agent will attempt to modify each file with inline comments.
Congratulations, you've successfully used Antigravity CLI to review and improve applications. Consider what you have learned in this lab and how it can improve your workflow. Which parts of the Antigravity CLI code review process can you implement today and why? How would these make your workflow more efficient?
Manual Last Updated November 6, 2026
Lab Last Tested November 6, 2026
Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We can notify you via email when it becomes available
Great!
We can contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one