# Antigravity CLI

> Google's terminal client for Antigravity agents: it reads your codebase, edits with your permission and runs commands, sharing one agent engine with the Antigravity desktop app. Run it in EnvHaven from any browser, signed in once with your own account, and keep it working 24/7; or install it on your own machine.

_Updated November 23, 2026 · Checked against Antigravity CLI 1.4.7 in EnvHaven v1.9.0_

| At a glance |  |
| --- | --- |
| Made by | Google |
| Command | `agy` |
| Version checked | 1.4.7, in EnvHaven v1.9.0 |
| Documentation | [antigravity.google/docs/cli](https://antigravity.google/docs/cli) |

## Use Antigravity CLI in EnvHaven

1. Open your workspace in any browser, on a laptop, a tablet or a phone.
2. Tap **Launch**, choose Antigravity CLI and tap **Sign in**: it starts Antigravity CLI, which asks you to sign in the first time. For an API key, choose **Set key** instead and paste `GEMINI_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, Antigravity CLI gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (1.4.7), so there is nothing to install or update.
4. Give it a task. The image launches `agy` with `--dangerously-skip-permissions`, and sets the Gemini provider whenever a `GEMINI_API_KEY` is present.
5. Close the tab whenever you like. The workspace is an always-on Linux machine, so Antigravity CLI keeps working, and every device you open it from shows the same session.

Every agent signs in with your own account: EnvHaven never resells tokens or adds a markup.

## Install Antigravity CLI on another machine

macOS, Linux:

```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```

Windows (PowerShell):

```bash
irm https://antigravity.google/cli/install.ps1 | iex
```

## Sign in from the terminal

In a workspace the Launch menu does this for you. On any other machine, or when you would rather type it:

- Run `agy` and sign in with your Google account. Over SSH it prints a URL; open it on any device and paste the code back.
- For a Gemini API key, set `"modelProvider": "gemini"` in `~/.gemini/antigravity-cli/settings.json` and export `GEMINI_API_KEY`; the key alone does nothing, and `GOOGLE_API_KEY` is ignored.
- Personal Google accounts on the free tier, Google AI Pro or Google AI Ultra; teams use Gemini Enterprise licenses or pay as they go through Google Cloud. Its README notes that using it means agreeing to Google collecting interaction data, with an opt-out in settings.

## Run Antigravity CLI without permission prompts

For one session:

```bash
agy --dangerously-skip-permissions
```

As the default, in ~/.gemini/antigravity-cli/settings.json:

```json
{
  "toolPermission": "always-proceed"
}
```

Both auto-approve every tool permission request. Ask and deny rules still take precedence, and `--sandbox` runs it with terminal restrictions.

**In EnvHaven:** The image launches `agy` with `--dangerously-skip-permissions`, and sets the Gemini provider whenever a `GEMINI_API_KEY` is present. The details, and when full access is safe, are on the [Antigravity CLI full-access page](https://envhaven.com/yolo/antigravity-cli).

## Instructions file

Antigravity CLI reads `AGENTS.md`, `GEMINI.md`, `.agents/AGENTS.md`, `.agents/rules/*.md`, `~/.gemini/AGENTS.md`.

## Add MCP servers

```bash
agy mcp add <name> <command> [args...]
```

Servers live under `mcpServers` in `~/.gemini/config/mcp_config.json`, or `.agents/mcp_config.json` in a workspace.

The [MCP config converter](https://envhaven.com/mcp-config) writes the same server for every agent at once.

## Run it from scripts

```bash
agy -p "<prompt>"
```

Headless runs cannot stop to ask, so they need the full-access setting above.

## Antigravity CLI away from your desk

Antigravity CLI keeps working only while the machine it runs on is awake. In EnvHaven that machine is the workspace, which never sleeps: start a task, close the laptop and check on it from a phone.

- [Antigravity CLI in the browser](https://envhaven.com/agents/antigravity-cli/browser)
- [Antigravity CLI on iPhone](https://envhaven.com/agents/antigravity-cli/iphone)
- [Antigravity CLI on iPad](https://envhaven.com/agents/antigravity-cli/ipad)
- [Antigravity CLI on Android](https://envhaven.com/agents/antigravity-cli/android)
- [Antigravity CLI on a Chromebook](https://envhaven.com/agents/antigravity-cli/chromebook)
- [Antigravity CLI on Windows](https://envhaven.com/agents/antigravity-cli/windows)
- [Antigravity CLI on a VPS](https://envhaven.com/agents/antigravity-cli/vps)
- [Antigravity CLI in Docker](https://envhaven.com/agents/antigravity-cli/docker)
- [Antigravity CLI on a Raspberry Pi](https://envhaven.com/agents/antigravity-cli/raspberry-pi)
- [Antigravity CLI 24/7](https://envhaven.com/agents/antigravity-cli/24-7)

Google's own options:

- Remote Control (`agy --remote-control`, or `agy remote-control start` as a background daemon): drive the session from any browser signed in to the same Google account, phones included.
- Remote agents (`--remote-agent`) run in a Google-managed environment, for Google AI Pro and Ultra accounts as it rolls out.

## Compare Antigravity CLI

- [Antigravity CLI vs Claude Code](https://envhaven.com/compare/antigravity-cli-vs-claude-code)

## When Antigravity CLI misbehaves

- [Antigravity CLI: authentication failed or timed out](https://envhaven.com/errors/antigravity-cli/authentication-failed-or-timed-out)
- [Is Antigravity CLI down?](https://envhaven.com/status/antigravity-cli) Live status of the providers it depends on.

## Keep reading

- [Antigravity CLI full-access mode](https://envhaven.com/yolo/antigravity-cli)
- [Antigravity CLI in the browser](https://envhaven.com/agents/antigravity-cli/browser)
- [Antigravity CLI on iPhone](https://envhaven.com/agents/antigravity-cli/iphone)
- [Antigravity CLI on iPad](https://envhaven.com/agents/antigravity-cli/ipad)
- [Antigravity CLI vs Claude Code](https://envhaven.com/compare/antigravity-cli-vs-claude-code)

Source: https://envhaven.com/agents/antigravity-cli
