Antigravity CLI is built for modern development environments. Verify that your system has either
Node.js 18+ or Python 3.10+ available in your terminal PATH.
(Missing runtime? Windows: winget install OpenJS.NodeJS.LTS · macOS: brew install node · Linux: sudo apt install -y nodejs npm)
On Windows, verify that PowerShell allows script execution so the installer can unpack dependencies.
On macOS and Linux, inspect your default shell and environment paths.
Download and install the official Antigravity CLI using the platform installer script (curl on Linux/macOS or irm on Windows).
The script installs the binary to your user local directory (~/.antigravity/bin or AppData\Local\agy\bin) and registers shell completions.
Confirm that the agy executable is properly linked in your system PATH and outputs a valid version number.
Authenticate your CLI session with your Google account. Run agy auth login to launch the secure OAuth
browser verification window and authorize Gemini API access.
For CI/CD servers, cloud virtual machines, or automated background workers, configure Google Application Default
Credentials (ADC) or provide a direct GOOGLE_API_KEY environment variable.
(Optional for local workstation users: if you completed Step S05 interactive browser sign-in, you can verify this step or proceed directly to S07.)
Inspect your active session details, token quota, and confirmed model bindings (e.g. Gemini 1.5 Pro and Flash).
Antigravity CLI configuration resides in ~/.gemini/antigravity-cli/settings.json. Inspect default models,
telemetry settings, and tool policies.
Enforce safety boundaries by setting permissions.require_command_confirmation: true to ensure dangerous
operations require interactive human approval.
Use the -p or --print flag to execute single prompts non-interactively, streaming answers
directly to stdout for script pipelines.
Pipe file contents, logs, or git diffs directly into Antigravity CLI to perform instant summaries, security scans,
or code audits without leaving the terminal.
Create an isolated, disposable directory to test agent actions without endangering your active repositories.
Instruct Antigravity CLI to create code and run tests inside the sandbox directory. Observe tool calls and verification.
Inspect conversation transcripts in ~/.gemini/antigravity-cli/brain/, then remove the test sandbox
directory to verify that your system remains clean and controllable.
Review the quick reference card below for daily slash commands, model switching shortcuts, and troubleshooting tips.
Enforce onboarding checklists, variable-limit delete guards, and off-volume profile backups.
Ensure Antigravity CLI agent workspaces remain fail-closed and wipe-resistant.
⚠️ The 2026-09-23 Incident Lesson
Prompt rules and text guards miss variable-stored paths (e.g. $tmp = $env:USERPROFILE; Remove-Item $tmp). Always employ PreToolUse path inspection and maintain off-volume backups.
1. Six-Line Onboarding Checklist
$check = Join-Path $env:TEMP "bbb-onboarding-checklist.txt"; @("agent:","rules file:","memory location:","permissions:","delete guard:","backup path:","final check:") | Set-Content -Encoding ascii $check; Get-Content $check; Write-Host "Fill every line for this agent. Rerun this checklist for the next agent."
2. Variable-Limit Guard Demo
$tmp = $env:USERPROFILE; $literal = $env:USERPROFILE; foreach ($src in @('$tmp','$env:GROK_HOME','python cleanup.py')) { if ($src -like "*$literal*") { "HIT $src" } else { "MISS $src" } }; if ([IO.Path]::GetFullPath($tmp) -eq [IO.Path]::GetFullPath($env:USERPROFILE)) { "REFUSE resolved tmp: it is the user profile. Text guards miss dollar-variables and python cleanup. 2026-09-23 Remove-Item of user profile is the example." }
3. Off-Volume Profile Backups
$dest = if (Test-Path "D:\") { "D:\Backups\llm-profiles\$(Get-Date -Format yyyyMMdd-HHmm)" } else { "$HOME\Backups\llm-profiles\$(Get-Date -Format yyyyMMdd-HHmm)" }
New-Item -ItemType Directory -Force -Path $dest | Out-Null
foreach ($d in @(".agy", ".claude", ".codex", ".grok", ".grokbot")) {
if (Test-Path "$env:USERPROFILE\$d") {
robocopy "$env:USERPROFILE\$d" "$dest\$d" /E /NFL /NDL /NJH /NJS
Write-Host "Backed up $dest\$d"
}
}
Get-ChildItem $dest
4. Practised Restore Drill
$drill = Join-Path $env:TEMP "bbb-restore-drill"; $src = Join-Path $drill "source"; $bak = Join-Path $drill "backup"; $back = Join-Path $drill "restored"; New-Item -ItemType Directory -Force -Path $src,$bak,$back | Out-Null; Set-Content -Encoding ascii -Path (Join-Path $src "proof.txt") -Value "bbb-restore-proof"; Copy-Item (Join-Path $src "proof.txt") (Join-Path $bak "proof.txt"); Remove-Item (Join-Path $src "proof.txt"); Copy-Item (Join-Path $bak "proof.txt") (Join-Path $back "proof.txt"); Get-Content (Join-Path $back "proof.txt"); Write-Host "Practised restore wrote proof into $back. Do not delete your user profile to test this."