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
/ 25
Use Antigravity CLI non-interactive mode
/ 25
Verify local repository using Git MCP tools
/ 25
Commit project changes using Git MCP server
/ 25
Interact with Antigravity CLI
/ 25
Use Antigravity CLI non-interactive mode
/ 25
Verify local repository using Git MCP tools
/ 25
Commit project changes using Git MCP server
/ 25
Vibe coding is an emerging software development practice that uses artificial intelligence (AI) to generate functional code from natural language prompts, accelerating development, and making app building more accessible, especially for those with limited programming experience.
The term, coined by AI researcher Andrej Karpathy in early 2025, describes a workflow where the primary role shifts from writing code line-by-line to guiding an AI assistant such as Antigravity CLI to generate, refine, and debug an application through a more conversational process. This frees you up to think about the big picture, or the main goal of your app, while the AI handles writing the actual code.
Antigravity CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. The Antigravity CLI project is open source and you can view the public roadmap to learn more about functionality enhancements, upcoming features, and bug fixes.
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.
For the best experience and optimal terminal formatting when running Antigravity CLI, use the Cloud Shell Editor's integrated terminal:
The Antigravity CLI's behavior is controlled by configuration files and environment variables. There are two key files:
.antigravity/settings.json: This file controls the configuration of the CLI including how to connect to external tools.
AGENTS.md (or GEMINI.md): This file provides natural language guidelines and context to the model. The CLI reads this file to understand your project's coding standards and conventions.
When you use Cloud Shell to run Antigravity CLI, 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.
In Cloud Shell, this file is located in the following directory:
~/.antigravity/settings.json.
While you can configure some of Antigravity CLI's behavior through the settings.json file located in the ~/.gemini/ directory, another file you can use to configure Antigravity CLI's behavior is AGENTS.md (or GEMINI.md).
The AGENTS.md (or GEMINI.md) file is the context file (defaulting to AGENTS.md (or GEMINI.md) but configurable via the contextFileName property in settings.json file) that is crucial for configuring the instructional context (also referred to as "memory") provided to the Gemini model.
This file allows you to give project-specific instructions, coding style guides, or any relevant background information to the AI, making its responses more tailored and accurate to your needs.
The AGENTS.md (or GEMINI.md) file is in Markdown format.
What does a AGENTS.md (or GEMINI.md) file contain? Here is the content from an example produced based on the official Antigravity CLI documentation.
Sample AGENTS.md (or GEMINI.md) file:
You may notice that the sample AGENTS.md (or GEMINI.md) file provides some general instructions plus specific instructions for coding style, dependency management and more. In a similar manner, you could write your own guidelines based on your programming language, framework, coding style, and other project-specific preferences.
The AGENTS.md (or GEMINI.md) file is the key to making Antigravity CLI follow your preferences. For more information, you can refer to the Practical Antigravity CLI series, which dives deeper into how you can auto-generate such a file for your project, customize the System Prompt, and more.
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.
antigravity-projects folder, and navigate to it:In Cloud Shell, Antigravity CLI is pre-installed.
In this task, you interact with Antigravity CLI.
antigravity-projects directory (cd ~/antigravity-projects), then run the following command to launch Antigravity CLI:To sign in, select the Use a Google Cloud project option.
Open the authorization URL in a new tab in your browser. Sign in with the lab credentials, click Copy to Clipboard to copy the authorization code, then paste it into the terminal prompt and press ENTER.
Enter Google Cloud Project ID and press ENTER.
Set Google Cloud Location to global.
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.
student-xx-xxxxxxxxxxxx@qwiklabs.net (Antigravity Business). If Antigravity Business is not shown in the startup banner, exit the CLI and relaunch Antigravity.The expected response is as follows.
Output:
You may notice that your query resulted in a GoogleSearch tool (a built-in tool in Antigravity CLI) that gets invoked. You learn more about built-in tools later in this lab.
A quick way to understand Antigravity CLI and the various commands that it supports is to type /help (forward slash) to receive a variety of commands and keyboard shortcuts as follows:
Sample output:
The /help command is one example of a so-called slash command. To learn more about these built-in Antigravity CLI commands, refer to the Slash Commands (/) documentation.
Antigravity CLI equips the underlying model with native capabilities to interact with your local environment, retrieve external information, and perform file and system actions. These built-in tools (such as GoogleSearch, ReadFile, WriteFile, and Shell) allow the agent to assist with software development, web research, and project maintenance.
Can Antigravity CLI simply call these tools whenever it wants? The answer is no. By default, the model requests explicit permission before performing sensitive operations — such as writing files to disk, modifying system state, or executing shell commands.
Can Antigravity CLI simply call these tools, when it wants to? The simple answer is no. By default, the model always asks for permission when it comes to sensitive operations that might involve writing to the local system, reading from an external system, going to the external network, and so on.
While there is a --yolomode available when you start the CLI (not typically recommended), you may find that Antigravity CLI prompts you for permission to run the tool that it has chosen. You can refuse permission, let it run once, or give it blanket permission to always run. You are and should be in full control of things.
In this section, you give Antigravity CLI a prompt to make Gemini choose and execute one of its built-in tools for you to gain a better understanding of how it all works.
Say 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.
The model first invokes the GoogleSearch tool to search the web for solar eclipse dates. Once retrieved, it invokes the WriteFile tool to save the results. Because writing to the filesystem is a sensitive operation, Antigravity CLI prompts you for confirmation.
This writes the retrieved information to eclipse-dates.txt.
Expected output:
To check if a file is written or not, you can use the @file to ask it to read the content. As you type @, it displays a list of files in the current folder, including the file it has just created.
/model command in the Antigravity CLI.While Gemini is running, you can verify the model that's running at the bottom right of the Antigravity CLI terminal as in the following screenshot:
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. This is useful if you use Antigravity CLI in an automated fashion as part of a script or any other automation process.
Quit the session (press CTRL+D or CTRL+C twice, or issue the /quit prompt).
In Cloud Shell integrated terminal, run the following command with the -p parameter:
Remember that in non-interactive mode, there is no scope to continue the conversation with follow-up questions. This mode also does not allow you to authorize tools (including WriteFile) or to run shell commands.
summary_task2.md and upload it to the grading bucket:It's also possible to work directly with the shell from within Antigravity CLI.
! in the prompt box. This toggles to shell mode.When in shell mode, you see the ! at the start of the prompt as shown in the following:
The prompt prefix changes to ! > to indicate that terminal shell mode is active.
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.
Example output:
Press ! again or press the ESC key to exit shell mode.
Exit the agy session by typing /quit and then press ENTER.
An MCP server is an application that exposes tools and resources to the Antigravity CLI through MCP, allowing it to interact with external systems and data sources. MCP servers act as a bridge between the Gemini model and your local environment or other services like APIs.
An MCP server enables the Antigravity CLI to discover and execute tools thereby extending Antigravity CLI's capabilities to perform actions beyond its built-in features, such as interacting with databases, APIs, custom scripts, or specialized workflows.
Antigravity CLI supports configuring MCP servers for discovering and using custom tools.
/mcp command as follows:Executing /mcp inside Antigravity CLI lists all connected MCP servers and their available tools.
If you don't have any MCP servers configured, it launches Antigravity CLI's MCP server documentation.
You can configure MCP servers at the global level in the ~/.antigravity/settings.json file or in your project's root directory.
If you have Antigravity CLI running, you can quit the session by pressing CTRL+D or CTRL+C twice.
.gemini subdirectory is hidden by default, select View > Toggle hidden files to show hidden files and directories..antigravity/settings.json file within your project-specific folder, antigravity-projects.Within the ~/.antigravity/settings.json file, you need to configure the mcpServers configuration block. It takes the following syntax:
You configure this file to support an MCP server in the next task.
Each server configuration supports the following properties, as per the Reference documentation:
The official Model Context Protocol (MCP) Git server (git-mcp-server) allows Antigravity CLI to read, inspect, and perform Git version control operations directly on local repositories.
In this section, you set up a local Git repository and configure the Git MCP server in Antigravity CLI's configuration file.
mcp_config.json with the git MCP server configuration:If prompted, Do you trust the contents of this project?, Press ENTER to select Yes, I trust this folder.
/mcp command:The /mcp command output displays the active git MCP server along with available tools such as git_status, git_log, git_add, and git_commit.
Press ESC to exit the mcp mode.
In this task, you use Antigravity CLI to vibe code a website. You ask Antigravity CLI to generate the structure of the website and set it up.
/model command to select a different model (such as a Flash model).Antigravity CLI proceeds to go through a series of actions at this point.
The next few prompts and responses are a sample flow that was observed. You might get a completely different response.
You need to interact back-and-forth with Antigravity CLI, as needed.
At times, Antigravity CLI may suggest a command that it would like to execute. For the purposes of this lab, you should exert control over the task.
If the model offers to run a command, you can simply press ESC to escape out and redirect its approach with a message such as the following:
On following the instructions to start the server and navigate to the home page, you get a sample site as shown (you should see a variant of a similar site if you used the same prompt):
Feel free to make more changes with the help of Antigravity CLI.
Congratulations, you've successfully explored Antigravity CLI, its capabilities, and applied it to a use case.
Manual Last Updated August 07, 2026
Lab Last Tested August 07, 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