Get Started with Antigravity on Google Cloud

1. Overview

In this quickstart codelab, you set up your Google Cloud environment and start building with Antigravity on Google Cloud:

  1. Claim Google Cloud credits through the Google Developer Program, or use an existing Cloud Billing account.
  2. Create a Google Cloud project and set up your Google Cloud Shell and Cloud Code Editor environments.
  3. Launch Antigravity CLI in Cloud Code Editor using built-in Application Default Credentials (ADC), select your preferred model, and run sample prompts.
  4. (Optional) Link the same Google Cloud project in the local Antigravity desktop app using Pay As You Go billing.

What you'll learn

  • How to claim Google Cloud credits from the Google Developer Program or connect your own Cloud Billing account
  • How to create a Google Cloud project, enable the Agent Platform API, and save your workspace configuration in Google Cloud Shell
  • How to authenticate Antigravity CLI with Application Default Credentials, select Gemini 4 Argon (High), and run agentic coding prompts
  • How to link your Google Cloud project in the Antigravity desktop app using Pay As You Go billing on Agent Platform

What you'll need

  • A Google account (use a personal @gmail.com account if you are claiming workshop event credits)
  • Either a workshop credit claim link provided by your instructor (plus a mobile phone with a camera to scan the verification QR code) or an active Cloud Billing account
  • A web browser, such as Google Chrome (opening an Incognito window is recommended so you do not mix personal and work accounts)

2. Claim Google Cloud credits (Optional)

Every Google Cloud project requires an active billing account. If you are attending a workshop with an event credit link, claiming credits from the Google Developer Program automatically provisions a Google Cloud billing account on your personal Gmail account without requiring a credit card.

Claim your event credit

  1. Open the credit claim link provided by your workshop instructor (in an Incognito browser window).
  2. Sign in with your personal Gmail account (@gmail.com) if you are not signed in yet.
  3. On the Claim Your Benefit page in Google Builders Hub, click the Claim Credit button:

Google Builders Hub Claim Your Benefit card showing the Claim Credit button

  1. If prompted to create a Google Developer Program profile, complete the profile creation form to continue.
  2. A Scan to Verify You're Human QR code dialog appears on screen. If the QR code does not appear automatically after creating your profile, refresh the page and click the Claim Credit button again:

Google Developer Program Scan to Verify You're Human QR code dialog

  1. Scan the QR code displayed on your screen using your phone and complete the verification prompt on your mobile device.
  2. Once verified, you see a Successfully claimed your event credit! confirmation banner and an Open Billing Account button:

Google Builders Hub showing Successfully claimed your event credit and the Open Billing Account button

🔍 Check your work

Provisioning your new Google Cloud billing account takes about 3 minutes:

  1. Click Open Billing Account to open Billing account management in the Google Cloud Billing console.
  2. Monitor Your billing accounts (refreshing after a minute or two if needed) until your GDP Credit billing account appears with status Active:

Google Cloud Billing account management showing an active GDP Credit billing account

Once your billing account is visible, proceed to the next step to create your Google Cloud project.

3. Create and set up a Google Cloud project

Now that you have an active Cloud Billing account (from your claimed workshop credits or your own billing setup), create a Google Cloud project and use Google Cloud Shell to enable the required API and save your workspace configuration.

Create a Google Cloud project

  1. In the same browser window, go to https://console.cloud.google.com/projectcreate.
  2. Enter your project details:
    • Project name: Enter a descriptive name (for example, antigravity-workshop).
    • Billing account (if shown): Accounts with a single billing account link it automatically without displaying a dropdown. If you do see a Billing account dropdown, select your GDP Credit billing account (or your own active Cloud Billing account).
    • Parent resource: Leave as No organization (or select your organization if required).
  3. Take note of the generated Project ID displayed below the project name field. You will need it later:

Create a Google Cloud Project screen showing Project name, Project ID, Parent resource, and Create button

  1. Click Create and wait a few seconds for Google Cloud to provision your new project.
  2. Once the project is created, click the Notifications icon in the top-right toolbar and click Select Project:

Google Cloud console Notifications menu showing Create Project: antigravity-workshop and the Select Project link

Configure your project in Google Cloud Shell

  1. In the top-right toolbar of the Google Cloud console, click Activate Cloud Shell (>_ icon) to open the Cloud Shell terminal pane at the bottom of your browser window:

Activate Cloud Shell button in the Google Cloud console toolbar

  1. Click Authorize if an Authorize Cloud Shell dialog appears:

Authorize Cloud Shell dialog

  1. Confirm your selected Project ID appears highlighted in yellow in the Cloud Shell terminal prompt:

Cloud Shell terminal showing selected Project ID highlighted in yellow

  1. If your new project is not yet shown in yellow in your Cloud Shell prompt, copy and paste the following snippet into Cloud Shell and type the number next to your project (for example, 1), and press Enter:
unset CLOUDSDK_CORE_PROJECT
PS3="Select your project (e.g. 1): "
select PROJECT_ID in $(gcloud projects list --format="value(projectId)"); do
  [ -n "$PROJECT_ID" ] && gcloud config set project "$PROJECT_ID" && break
done

Enable the Agent Platform API

Execute the following command in Cloud Shell to enable the Agent Platform API for your project, allowing Antigravity CLI and the Antigravity app to access Gemini models:

gcloud services enable aiplatform.googleapis.com

Cloud Shell terminal running gcloud services enable aiplatform.googleapis.com on the active project

Wait a few seconds until Operation/... finished successfully is printed in your terminal.

Save your workspace configuration

In Cloud Shell, gcloud preferences are stored in a temporary folder per browser tab and do not carry over when you open Cloud Code Editor in a new tab. Create your ~/antigravity-workspace folder in $HOME (which persists across all Cloud Shell and Cloud Code Editor sessions) and save your project settings to .env:

mkdir -p ~/antigravity-workspace
cat <<EOF > ~/antigravity-workspace/.env
AGY_ADC_AUTH=true
CLOUDSDK_CORE_PROJECT=$(gcloud config get-value project)
GOOGLE_CLOUD_QUOTA_PROJECT=$(gcloud config get-value project)
EOF

🔍 Check your work

Load your saved .env file and confirm that an active gcloud account is selected, your project ID is populated, an active billing account (such as GDP Credit or your own billing account name) is linked, and the Agent Platform API is enabled:

set -a && source ~/antigravity-workspace/.env && set +a
ACTIVE_ACCOUNT=$(gcloud auth list --filter=status:ACTIVE --format="value(account)" 2>/dev/null)
if [ -z "$ACTIVE_ACCOUNT" ]; then
  echo "No active account selected. Refresh this browser tab and click Authorize (or run 'gcloud auth login --update-adc'), then re-run this check."
else
  BILLING_ACCOUNT=$([ -n "$GOOGLE_CLOUD_QUOTA_PROJECT" ] && gcloud billing projects describe "$GOOGLE_CLOUD_QUOTA_PROJECT" --format="value(billingAccountName)" 2>/dev/null)
  echo "Account: $ACTIVE_ACCOUNT"
  echo "Project: $GOOGLE_CLOUD_QUOTA_PROJECT"
  echo "Billing account: $([ -n "$BILLING_ACCOUNT" ] && (gcloud billing accounts describe "${BILLING_ACCOUNT##*/}" --format="value(displayName)" 2>/dev/null || echo "${BILLING_ACCOUNT##*/}"))"
  echo "Enabled API: $([ -n "$GOOGLE_CLOUD_QUOTA_PROJECT" ] && gcloud services list --enabled --filter="config.name=aiplatform.googleapis.com" --format="value(config.name)" 2>/dev/null)"
fi

You should see output similar to:

Account: your-account@gmail.com
Project: antigravity-workshop-513111
Billing account: [YYYY-MM-DD] GDP Credit: XXXX-XXXX-XXXX-XXXX
Enabled API: aiplatform.googleapis.com

Troubleshooting

  • If No active account selected is printed, refresh your browser tab to re-open the Authorize Cloud Shell dialog and click Authorize (or run gcloud auth login --update-adc), then re-run the check above.
  • If Project: is empty or shows a different project, run the project selection snippet and the workspace configuration snippet from above again.
  • If Billing account: is empty or shows the wrong account, open Billing account management, select your project, and choose Change billing (see Enable, disable, or change billing for a project).
  • If Enabled API: is empty, run the gcloud services enable command again.

4. Launch Antigravity CLI

Antigravity CLI (agy) is Google's terminal-based AI coding agent and comes pre-installed in Cloud Code Editor. In this step, you open Cloud Code Editor, load your saved workspace folder, and start Antigravity CLI.

Open Cloud Code Editor

  1. In your browser window, open a new tab and go to https://ide.cloud.google.com.
  2. If prompted with an Authorize Cloud Shell dialog, click Authorize:

Authorize Cloud Shell dialog in Cloud Code Editor

  1. Once Cloud Code Editor finishes loading, confirm that a terminal pane is visible at the bottom of the window. If not, open one from the top menu bar with View > Terminal. You should see a terminal:

Terminal pane open at the bottom of Cloud Code Editor

Load your workspace

  1. Open ~/antigravity-workspace as your active workspace in Cloud Code Editor by running the following command:
cloudshell workspace ~/antigravity-workspace
  1. Cloud Code Editor reloads with antigravity-workspace open in the Explorer sidebar. If the terminal pane closes, reopen it with View > Terminal.
  2. (Optional) Press Cmd + Option + B on macOS or Ctrl + Alt + B on Windows and Linux to close the Secondary Side Bar (Gemini Code Assist) and give yourself more room.

Start Antigravity CLI

  1. In the Cloud Code Editor terminal, load the .env file you saved in ~/antigravity-workspace so Antigravity CLI authenticates with Application Default Credentials and bills model usage to your project:
cd ~/antigravity-workspace
set -a && source .env && set +a
echo "Project: $GOOGLE_CLOUD_QUOTA_PROJECT"

You should see output similar to:

Project: antigravity-workshop-513111
  1. From your ~/antigravity-workspace directory, start Antigravity CLI with --dangerously-skip-permissions so file edits and terminal commands run without manual confirmation prompts during the workshop:
agy --dangerously-skip-permissions

Terminal running agy --dangerously-skip-permissions

Complete the first-run prompts

When you launch agy for the first time in Cloud Code Editor:

  1. Select your preferred color scheme using the Up and Down arrow keys and press Enter:

Antigravity CLI welcome screen and color scheme selector

  1. If Migration options ([ ] Import extensions from Gemini CLI) appears below the color scheme list, pressing Enter moves focus onto that checkbox rather than continuing. Press the Down arrow key (or Tab) to highlight Next, then press Enter:

Antigravity CLI Migration options prompt with the Next button highlighted below Import extensions from Gemini CLI

  1. On the Terms of Service & Data Use screen, press Enter to select Done.
  2. When asked whether you trust the files in ~/antigravity-workspace, press Enter to confirm Yes, I trust this folder.

🔍 Check your work

Once the interactive session loads, confirm that the Antigravity CLI banner displays your Google account under ADC: (Agent Platform), your active GCP Project:, and the interactive > prompt. You should see output similar to:

Antigravity CLI 1.4.7
ADC: your-account@gmail.com (Agent Platform)
GCP Project: antigravity-workshop-513111
Gemini 4 Argon (High)
~/antigravity-workspace

>

Cloud Shell terminal launching Antigravity CLI authenticated via ADC

Keep Antigravity CLI open at the > prompt and continue to the next step to select your model and run sample prompts.

5. Switch model and try prompts

Inside an active Antigravity CLI session, you can switch models at any time with the /model slash command before sending coding or research tasks to the agent.

Switch to Gemini 4 Argon (High)

Copy and paste the following command into the Antigravity CLI > prompt and press Enter to select Gemini 4 Argon (High):

/model gemini-4-argon-high

Antigravity CLI confirms Model set to Gemini 4 Argon (High) (or Model already set to Gemini 4 Argon (High) if it is already active), and the bottom-right corner of the terminal displays Gemini 4 Argon · high.

Try sample prompts

Copy and paste one or more of the prompts below into Antigravity CLI and press Enter. Each prompt relies only on Python's standard library or pre-installed Cloud Shell tools so it completes in under a minute.

Build and test a CLI task tracker

Create a Python CLI task tracker in todo.py using only the standard library that lets me add, list, and complete tasks saved to tasks.json. Write unit tests in test_todo.py and run them to verify everything passes.

Generate a Cloud Shell environment report

Inspect this Cloud Shell environment (Python version, gcloud version, active Google Cloud project, and available disk space) and save a clean Markdown summary to environment-report.md.

Analyze simulated server logs

Write a Python script in log_analyzer.py using only the standard library that generates 200 sample HTTP access log lines, calculates request counts by status code and p95 latency, prints a summary table, and runs the script.

🔍 Check your work

  1. Open the Explorer sidebar in Cloud Code Editor to inspect the files Antigravity CLI generated for you.
  2. When you are ready to exit back to your Cloud Code Editor terminal prompt, paste /exit and press Enter (or press Ctrl + D twice):
/exit
  1. List the files Antigravity CLI created in your workspace:
ls -la ~/antigravity-workspace

You should see output similar to (depending on which prompt you ran):

total 20
drwxr-xr-x 2 user user 4096 Oct 30 04:30 .
drwxr-xr-x 8 user user 4096 Oct 30 04:25 ..
-rw-r--r-- 1 user user  118 Oct 30 04:26 .env
-rw-r--r-- 1 user user 1420 Oct 30 04:30 test_todo.py
-rw-r--r-- 1 user user 1850 Oct 30 04:30 todo.py

Whenever you want to return to your agent session later from a new terminal, run cd ~/antigravity-workspace && set -a && source .env && set +a, start agy --dangerously-skip-permissions, and type /resume to pick up an earlier conversation.

6. Link Antigravity app (Optional)

If you also want to run agents locally on your laptop, you can link the Antigravity desktop app (macOS, Windows, or Linux) to the same billing-enabled Google Cloud project you set up earlier.

Install the app or sign out of a personal plan

  1. Download and install Antigravity for your operating system from https://antigravity.google/download, then open the app.
  2. If you previously signed in with Continue with Google (the personal starter plan), click Settings in the bottom-left corner, open Account, and click Sign Out to return to the Welcome to Antigravity screen.

Sign in and select Pay As You Go

  1. On the Welcome to Antigravity screen, click Use Business Account:

Welcome to Antigravity screen with Use Business Account highlighted

  1. On the Business Account Sign In screen, click Continue with Google Cloud and complete the browser sign-in using the same Google account that owns your Google Cloud project:

Business Account Sign In screen with Continue with Google Cloud highlighted

  1. When your browser prompts Open Antigravity?, click Open Antigravity:

Browser dialog prompting to click Open Antigravity

  1. Return to the Antigravity app. On the Select Billing Model screen, click the Pay As You Go card:

Select Billing Model screen showing Gemini Enterprise and Pay As You Go with Pay As You Go highlighted

  1. Under Provide Google Cloud Project, paste your Project ID from earlier (for example, antigravity-workshop-513111) and click Next:

Select Billing Model screen with Project ID entered under Provide Google Cloud Project and Next highlighted

  1. Under Choose Region, select Global and click Next:

Select Billing Model screen with Global selected under Choose Region and Next highlighted

  1. Complete any remaining first-run theme or terms prompts to open your Antigravity workspace.

🔍 Check your work

  1. In the bottom-left corner of the Antigravity app, click Settings and open Account.
  2. Confirm that Your Plan shows Gemini Enterprise Pay-as-you-go and Project ID displays your Google Cloud project. You should see output similar to:
Your Plan: Gemini Enterprise Pay-as-you-go
Project ID: antigravity-workshop-513111

You can switch or update your linked Google Cloud project at any time by clicking Manage next to Your Plan in Settings > Account.

7. Congratulations

You have set up your Google Cloud environment, run your first agentic prompts with Gemini 4 Argon in Antigravity CLI, and learned how to link your Google Cloud project in the Antigravity desktop app!

What you accomplished

  • (Optional) Claimed Google Cloud credits from the Google Developer Program, or connected an existing Cloud Billing account
  • Created a billing-enabled Google Cloud project, enabled the Agent Platform API, and saved your workspace configuration in ~/antigravity-workspace/.env
  • Authenticated Antigravity CLI with Application Default Credentials and launched it in Cloud Code Editor
  • Selected Gemini 4 Argon (High) using /model gemini-4-argon-high and ran sample prompts in your workspace
  • (Optional) Linked your Google Cloud project in the Antigravity desktop app using Pay As You Go billing

Next steps