---
title: "Run Antigravity CLI on an always-on server"
description: "Jules is closing. Run Google's Antigravity CLI on your own exe.dev VM: a Remote Control daemon you drive from your phone, GitHub PRs, scheduled runs."
url: https://exe.dev/deploy/antigravity-cli
category: "AI agents"
updated: 2026-11-02
---

# Run Antigravity CLI on an always-on server

Google's terminal agent on an always-on VM, steered from your phone's browser.

- **Software:** Antigravity CLI (https://antigravity.google/product/antigravity-cli)
- **Source:** https://github.com/google-antigravity/antigravity-cli
- **License:** Proprietary (Google Terms of Service)
- **Time:** 10 minutes
- **Example VM name:** `my-antigravity` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe.dev/deploy/antigravity-cli/manifest.json

## What you get

- Antigravity CLI (`agy`) in `~/.local/bin`, on the PATH, printing its version
- A Git repository at `~/project` on persistent disk
- A detached `agy` tmux session in `~/project` for work at the keyboard later

Running on the VM:

- **Antigravity CLI**: `agy`, Google's native Linux build, in ~/.local/bin; it updates itself, data in `~/.gemini`
- **Remote Control daemon**: `agy remote-control start`, a systemd user service that starts at boot
- **Google's relay**: the VM connects out to it; no port is opened on the VM
- **Your project**: a Git repository, data in `~/project`

How it is reached:

- https://antigravity.google.com/ (private): Remote Control, in any browser signed in to the same Google account
- ssh my-antigravity.exe.xyz (private): your terminal, for signing in and upkeep
- https://my-antigravity.exe.xyz/ (private): whatever the agent serves on port 8000, behind your exe.dev login

## Deploy with Shelley

Open https://exe.dev/new?prompt=Set%20up%20Antigravity%20CLI%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Fantigravity-cli.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-antigravity.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-antigravity.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Antigravity%20CLI%20%28%60agy%60%29%20in%20%60~%2F.local%2Fbin%60%2C%20on%20the%20PATH%2C%20printing%20its%20version%0A-%20A%20Git%20repository%20at%20%60~%2Fproject%60%20on%20persistent%20disk%0A-%20A%20detached%20%60agy%60%20tmux%20session%20in%20%60~%2Fproject%60%20for%20work%20at%20the%20keyboard%20later%0A%0ARun%20the%20VM-side%20commands%20in%20%22Install%20Antigravity%20CLI%22%20only%3B%20skip%20creating%0Athe%20VM.%20Do%20not%20start%20%60agy%60%20itself%2C%20and%20do%20not%20run%20%60agy%20remote-control%20start%60%3A%0Asigning%20in%20to%20Google%20is%20the%20owner%27s%20step%20%28a%20link%20and%20a%20code%20they%20paste%29%2C%0Aand%20the%20daemon%20refuses%20to%20start%20until%20they%20have.%20Do%20not%20set%0A%60modelProvider%60%20or%20a%20Gemini%20API%20key.%20Create%20the%20tmux%20session%20detached%0A%28%60tmux%20new%20-d%20-s%20agy%20-c%20~%2Fproject%60%29%20rather%20than%20attaching%2C%20and%20reuse%20it%20if%0Ait%20exists.%20Verify%20with%20%60~%2F.local%2Fbin%2Fagy%20--version%60%2C%20%60git%20-C%20~%2Fproject%0Astatus%60%20and%20%60tmux%20has-session%20-t%20agy%60.%20Skip%20the%20later%20sections%20and%20the%0AFAQ.%20Finish%20by%20telling%20the%20owner%20to%20run%20%60ssh%20my-antigravity.exe.xyz%60%20with%0Athis%20VM%27s%20name%20and%20follow%20%22Sign%20in%20with%20Google%22%20and%20%22Keep%20it%20on%20with%0ARemote%20Control%22.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe.dev/deploy/antigravity-cli/prompt.txt | ssh exe.dev new --prompt=/dev/stdin
```

Or follow the steps below by hand.

[Jules](https://jules.google/), Google's asynchronous coding agent, is
winding down. Google's
[changelog](https://jules.google/docs/changelog/2026-10-29) says you can
finish sessions until November 11, 2026; after that Jules is read-only, and
it shuts down on December 31. Google points to Antigravity, but Antigravity
doesn't run tasks in Google's cloud yet: its agents run on a machine you
provide.

An exe.dev VM is that machine. [Antigravity CLI](https://antigravity.google/product/antigravity-cli)
(`agy`), Google's terminal agent, runs there as a background service you
control from [Antigravity Remote Control](https://antigravity.google/docs/remote-control)
in any browser: start a task from your phone, approve commands, read the
diff, and close the tab. The VM stays on, keeps your checkouts and tools on
its disk between tasks, opens no ports, and pushes to GitHub without a token
on it.

You need a Google account that can use Antigravity. Antigravity CLI is
closed source; this page follows version 1.4.12 (October 30, 2026).

## Install Antigravity CLI

On your computer, create a VM and connect. Pick any free name; if you've
already clicked Deploy or have a VM, skip the first command and use its
name:

```bash
ssh exe.dev new --name=my-antigravity
ssh my-antigravity.exe.xyz
```

On the VM, run Google's installer, which puts `agy` in `~/.local/bin` and
adds that folder to your `PATH` in `~/.bashrc` and `~/.profile`. Then make a
project folder with Git, so you can review and undo what the agent changes,
and a tmux session to work in later:

```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
agy --version
git init ~/project
tmux new -d -s agy -c ~/project
```

The installer's lines starting `ERROR: logging before google.Init` are
noise; it ends with `Antigravity CLI installed successfully`. `agy --version`
prints a version such as `1.4.12`. Antigravity CLI updates
itself in the background from then on.

## Sign in with Google

Sign in once, in your SSH session (not inside tmux, so the long sign-in link
copies in one piece):

```bash
cd ~/project
agy
```

Choose **Google OAuth** (or **Use a Google Cloud project** for a business
account). Antigravity CLI sees there's no browser on the VM and prints a
`https://accounts.google.com/...` link. Open it on your computer, sign in,
copy the code the page shows, and paste it at `authorization code...` in
the terminal. Finish the first-run questions, then type `/exit`.

The VM has no system keyring, so Antigravity CLI keeps the sign-in in a
file under `~/.gemini` instead. The Remote Control daemon,
headless runs and every later `agy` use it.

## Keep it on with Remote Control

Still on the VM, start the Remote Control daemon and name it after the VM:

```bash
agy remote-control start --name "$(hostname)"
agy remote-control status
```

`start` registers a systemd user service, `antigravity-cli-daemon`, and
starts it. exe.dev VMs run user services without anyone logged in, so it
comes back after a reboot and restarts itself after a crash. `status` shows
the daemon and the instance name, `my-antigravity`.

On your phone or computer, open
[antigravity.google.com](https://antigravity.google.com/) in a browser
signed in to the same Google account. Under **Remote Control Instances**,
`my-antigravity` shows as **Online**; tap **Connect**. On a phone you can add the page to your home screen to
get a notification when an agent finishes or needs you.

> [!NOTE]
> The daemon uses your Google sign-in, so it stops working if you sign out
> with `/logout`. Remote Control needs that sign-in: a Gemini API key has no
> account session, and Application Default Credentials (`AGY_ADC_AUTH`)
> aren't supported.

## Give it a task from your phone

In Remote Control, start a conversation in a project on `my-antigravity`
with the `~/project` folder in it, and give it a task. For example:

> Build a tiny website for a lighthouse keeper who reviews passing ships,
> and serve it on port 8000.

The agent works on the VM; you answer its questions, approve commands and
read the implementation plan and diff in the browser, then lock your phone.
Open `https://my-antigravity.exe.xyz/` to see what it built: like every
port on the VM, it's private to you until you share it
([HTTPS proxy](/docs/proxy)).

For several tasks at once, choose new worktree mode when you start each
conversation: every conversation then gets its own Git worktree, so agents
don't trip over each other, much like Jules' parallel tasks.

## Work on a GitHub repository

The [GitHub integration](/docs/integrations-github) lets the VM clone and
push a repository without a GitHub token on it. Connect your GitHub account
on the [Integrations page](https://exe.dev/integrations) once, then, on your
computer, add the repository (replace `you/your-repo`):

```bash
ssh exe.dev integrations add github --name your-repo \
  --repository you/your-repo --attach vm:my-antigravity
```

On the VM, clone it and tell Git who you are:

```bash
git clone https://github.int.exe.xyz/you/your-repo.git ~/your-repo
git config --global user.name "Your Name"
git config --global user.email you@example.com
```

Add `~/your-repo` to a project in Remote Control and ask for a change and a
pull request. The preinstalled `gh` goes through the same integration when
`GH_HOST` points at it:

> Fix the flaky date test on a new branch, commit it, push the branch, and
> open a pull request with `GH_HOST=github.int.exe.xyz gh pr create`.

Pushes show up as the exe.dev GitHub App; add `--act-as-user` to the
`integrations add` command to push as yourself. Put standing instructions,
such as how to set up and test the project, in an `AGENTS.md` at the top of
the repository; Antigravity reads it, as it does `GEMINI.md`.

## Coming from Jules

Your code, branches and pull requests are in GitHub already. What lives only
in Jules (settings, environment variables, scheduled tasks, memories, setup
scripts and every session's prompt, plan, log and patches) can be exported
with Jules Tools until December 31. Google's
[Jules Turndown](https://jules.google/docs/changelog/2026-10-29) post has
the steps: on your computer, run

```bash
npm install -g @google/jules
jules login
```

then paste the export prompt from that post into a coding agent such as
Claude Code, started in your home folder. It writes everything to
`~/jules-export`, with a `summary.md` per session. `env-variables.json` in
there holds your environment variable values, so keep the folder private.

Here's where each Jules habit goes on the VM:

- **Assign a task and get a pull request:** Remote Control plus the GitHub
  integration, as above.
- **Setup scripts:** run them once on the VM. Installed packages and
  toolchains stay on its disk, so later tasks start ready. Put the test
  command in `AGENTS.md`.
- **Environment variables:** non-secret ones in `~/.profile`. For API
  keys, an exe.dev [HTTP proxy integration](/docs/integrations-http-proxy)
  adds the key to requests on the way out, so it never sits on the VM.
- **Memories:** copy what still matters into `AGENTS.md`, or use `/learn`
  in a conversation to turn a correction into a saved rule.
- **Scheduled tasks:** a cron job with headless `agy -p`; see the next
  section.
- **Old sessions:** to let the agent read your old plans, copy the export
  to the VM without the secrets file. On your computer:
  `rm ~/jules-export/env-variables.json && scp -r ~/jules-export my-antigravity.exe.xyz:`

## Run tasks on a schedule

`agy -p` runs one prompt with your saved sign-in and exits, which makes it a
tool for cron. Run `crontab -e` on the VM and add, for example, a review at
06:00 UTC every weekday (cron doesn't read your `PATH`, hence the full path):

```text
0 6 * * 1-5 cd ~/project && ~/.local/bin/agy -p "List the TODOs in this repo, most urgent first" >> ~/agy-todos.log 2>&1
```

In headless mode the agent may read and edit files in the folder, but
commands that would need your approval are refused, and it says which on
stderr. Allow the ones a job needs with rules in
`~/.gemini/antigravity-cli/settings.json`, for example:

```json
{
  "permissions": {
    "allow": ["command(git)", "command(regex:npm run (build|lint|test))"]
  }
}
```

On a VM you can copy and throw away, `--dangerously-skip-permissions`
approves everything for one run. `--output-format json` returns the answer
in `response` plus a `status`; a run that fails exits non-zero. Google's
[headless mode guide](https://antigravity.google/docs/cli/headless) has the
rest, including `--model` and `--print-timeout`.

## At the keyboard

The terminal UI works over SSH too. On your computer:

```bash
ssh -t my-antigravity.exe.xyz 'tmux new -A -s agy -c ~/project'
```

Inside tmux, run `agy`. Press **Shift+Tab** to cycle through modes (accept
edits, plan), and type `/help` for the rest. Detach with **Ctrl-b**, then
**d**; the session keeps running. To pick up this terminal session on your
phone, type `/remote-control` in it: it prints a link to the conversation.
That link lasts as long as the session; the daemon is separate and stays
on.

## Use a Gemini API key instead

<details class="dp-details">
<summary>Bill a Gemini API key, kept off the VM by an exe.dev integration</summary>

For headless runs you can bill a
[Gemini API key](https://aistudio.google.com/app/apikey) instead of your
Google plan. Give the key to exe.dev rather than the VM: open this link on
your computer, keep the name `gemini`, paste the key, and save:

```text
https://exe.dev/integrations/add?service=gemini&attach=vm:my-antigravity
```

On the VM, check that the integration answers:

```bash
curl -fsS https://gemini.int.exe.xyz/v1beta/models | jq -r '.models[0].name'
```

Point Antigravity CLI at it with the two variables it reads. It insists on
a key value, so it gets a placeholder that the integration replaces with
yours:

```bash
cat >> ~/.profile <<'EOF'
export GOOGLE_GEMINI_BASE_URL=https://gemini.int.exe.xyz
export GEMINI_API_KEY=added-by-exe-dev
EOF
. ~/.profile
```

The key is used only when `modelProvider` is `gemini`. Set it for one run
with `--settings`, so the daemon and your other sessions keep your Google
sign-in:

```bash
cd ~/project
agy --settings '{"modelProvider":"gemini"}' --model gemini-3.8-flash-low -p "Reply with exactly: OK"
```

In a cron line, put the two variables in front of the command, since cron
doesn't read `~/.profile`. Putting `"modelProvider": "gemini"` in
`~/.gemini/antigravity-cli/settings.json` switches every session to the key,
which turns Remote Control off. With no model given, Antigravity CLI asks
for Gemini 3.1 Pro, which free-tier keys can't use; `agy models` lists the
others.

</details>

<details class="dp-details">
<summary>Update, back up and stop</summary>

### Update

Antigravity CLI checks for updates in the background as you use it. To
update now, run `agy update`, then `agy remote-control start` so the daemon
runs the new version. To turn automatic updates off, add
`export AGY_CLI_DISABLE_AUTO_UPDATE=true` to `~/.profile`.

### Back up

Commit and push your code. `~/.gemini` holds your settings, conversations
and sign-in. For a copy of the whole VM, run
`ssh exe.dev cp my-antigravity my-antigravity-backup` on your computer. The
copy carries your Google sign-in, so don't run the daemon on both, and
delete the copy when you no longer need it.

### Stop

`agy remote-control stop` stops the daemon and unregisters it, so the VM
disappears from Remote Control. `/logout` in `agy` signs the VM out of your
Google account.

</details>

## Troubleshooting

- **`Error: not signed in: run agy, sign in, then run agy remote-control
  start`**: sign in first, as in "Sign in with Google".
- **`Authentication required. Please visit the URL to log in`** from a
  headless run or cron job: the VM isn't signed in, or the sign-in expired.
  Run `agy` over SSH and sign in again.
- **The VM isn't listed under Remote Control Instances, or isn't Online**: run
  `agy remote-control status`, and check the browser uses the same Google
  account as the VM. `journalctl --user -u antigravity-cli-daemon -n 50`
  shows the daemon's log.
- **`Remote control is not enabled for your account.`**: your account or
  organization doesn't allow Remote Control. Check with your workspace
  admin or plan.
- **A new name doesn't show**: the daemon reads it at start; run
  `agy remote-control start --name <name>` again.
- **`agy: command not found`**: open a new SSH session, or run
  `export PATH="$HOME/.local/bin:$PATH"`.
- **A headless run lists `denied_actions` or says it refused a command**:
  add an `allow` rule for it, as in "Run tasks on a schedule".
- **`GEMINI_API_KEY` errors** with the API key setup: the variables aren't
  in the environment of that run. Antigravity CLI doesn't read `.env`
  files.

For more, see Google's
[CLI troubleshooting](https://antigravity.google/docs/cli/troubleshooting).
The CLI's own log is `~/.gemini/antigravity-cli/cli.log`.

## Frequently asked questions

### Is this a replacement for Jules?

For the main job, yes: you hand an agent a task from your browser or phone, it works on its own computer while you're away, and it opens a pull request. The difference is where it runs. Jules started a fresh Google VM per task; here it's one VM of yours that stays on, keeps its tools and checkouts between tasks, and that you can SSH into. Google says Jules' learnings go into Antigravity, whose own cloud execution hadn't shipped as of November 2, 2026.

### Does it work with exe.dev's LLM gateway, without a Google account?

No. Antigravity CLI talks only to Google: your Google account, a Google Cloud project, or a Gemini API key. The [LLM gateway](/docs/integrations-llm) serves Claude, GPT and open models, not Gemini. You can keep a Gemini API key off the VM with exe.dev's Gemini integration ([see below](#use-a-gemini-api-key-instead)), but Remote Control needs the Google account. For an agent that needs no key at all, see [Claude Code](/deploy/claude-code), [Codex](/deploy/codex) or [OpenCode](/deploy/opencode).

### Which Google plans work?

Google lets personal Google accounts use Antigravity on any plan, including the free one, which gets a weekly quota; Google AI Pro and Ultra get more, refreshed every five hours. Remote Control must also be allowed for your account: if it isn't, `/remote-control` says `Remote control is not enabled for your account.` Business accounts sign in with **Use a Google Cloud project**.

### Who can control the VM?

Anyone signed in to your Google account, from any browser. The VM opens no ports: the daemon keeps an outbound connection to Google, and the dashboard reaches it through that. So keep two-step verification on for the account. The VM's own web address stays behind your exe.dev login.

### Can Shelley or another agent run Antigravity CLI for me?

Not under a personal plan: Google's FAQ says wrapping `agy` in third-party coding agents isn't supported for consumer accounts, and headless `agy -p` is meant for your own scripts and CI. Drive it yourself, from Remote Control or the terminal. [Shelley](/docs/shelley/intro) is on the VM too, as a separate agent.

### I used Gemini CLI. What carries over?

`GEMINI.md` and `AGENTS.md` files are read as before. On the VM, `agy plugin import gemini` converts Gemini CLI extensions to plugins. MCP servers move to `~/.gemini/config/mcp_config.json`; `agy mcp add` writes them there. Workspace skills move from `.gemini/skills/` to `.agents/skills/`. The [Gemini CLI page](/deploy/gemini-cli) still covers Gemini CLI with an API key.

### What does Google collect?

With a personal account, Google collects your Antigravity interactions to improve the product unless you opt out: turn off **Enable Telemetry** in `/config`. Google Cloud sign-ins have it off, and Google never collects prompts or responses for them.


## Related

- [Run Gemini CLI on a remote server](https://exe.dev/deploy/gemini-cli.md): Google's terminal agent on a VM of its own, with the API key kept off it.
- [Run Codex remote control on a server](https://exe.dev/deploy/codex-remote-control.md): Codex on an always-on VM, steered from the ChatGPT app on your phone.
- [Run Claude Code on a remote server](https://exe.dev/deploy/claude-code.md): A computer for Claude. A breather for your laptop.
- [Run OpenCode on a remote server](https://exe.dev/deploy/opencode.md): Every model, one VM, and an agent that works while your laptop sleeps.
- [Host OpenClaw](https://exe.dev/deploy/openclaw.md): An AI sidekick with its own computer. Your laptop can take a nap.
- [Run Codex on a remote server](https://exe.dev/deploy/codex.md): A computer for Codex. An early night for your laptop.
