# Antigravity CLI in Docker

> Run Antigravity CLI in a container: EnvHaven's open-source image with Antigravity CLI built in, a managed workspace with nothing to run, and the folders and keys a container of your own has to keep.

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

A container keeps whatever Antigravity CLI does with full access away from your own files, which makes it the usual home for unattended runs. EnvHaven is built on that idea in two forms: a managed workspace, which is the container already running on a server of its own, and the open-source workspace image, which you run with Docker yourself.

## A managed workspace: nothing to run

1. Open your workspace in any browser. It is the EnvHaven container on its own always-on server, with an HTTPS address for what you build.
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.

## The EnvHaven image, on your own Docker

The workspace image is MIT-licensed and ships Antigravity CLI 1.4.7 beside 16 other agents. Its home is `/config`, so one volume keeps every agent's settings and sign-in when the container is replaced:

```bash
docker run -d \
  --name envhaven \
  -p 8443:8443 \
  -p 2222:22 \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  -v envhaven-config:/config \
  ghcr.io/envhaven/envhaven:latest
```

Open `http://localhost:8443`, run `agy` in the terminal and sign in. The [self-hosted guide](https://envhaven.com/guides/self-hosted-dev-environment) covers SSH and Haven CLI against it.

## What a container for Antigravity CLI has to keep

Antigravity CLI keeps its settings in `~/.gemini/antigravity-cli` and `~/.gemini/config` ([source](https://antigravity.google/docs/install)). Sign-in tokens go to the operating system keyring rather than a file, so a volume does not keep them; in a container, `GEMINI_API_KEY` works once the Gemini provider is selected.

In a container of your own, mount a volume at each of those paths so a rebuilt container stays signed in, or pass `GEMINI_API_KEY` as an environment variable instead of signing in.

## Full access inside the container

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.

## Keep reading

- [Antigravity CLI](https://envhaven.com/agents/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 on Android](https://envhaven.com/agents/antigravity-cli/android)
- [Antigravity CLI on a Chromebook](https://envhaven.com/agents/antigravity-cli/chromebook)
- [Coding agents in Docker](https://envhaven.com/agents/docker)

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