Skip to main content

Antigravity CLI

Tracks the local Antigravity CLI (agy) through its documented custom status-line JSON feed. OpenUsage does not read Antigravity credentials or call a separate usage API.

At a glance​

  • Provider ID — antigravity
  • Detection — agy on PATH plus ~/.gemini/antigravity-cli/settings.json or brain/
  • Auth — local status-line feed; no API key required
  • Type — coding agent
  • Dashboard color — mauve
  • Tracks:
    • model and workspace
    • context-window percentage
    • cumulative session input, output, and total tokens
    • current input, output, and cache token parts
    • per-bucket quota remaining and reset time
    • plan tier, agent state, CLI version, and session identity

Setup​

Auto-detection​

OpenUsage detects Antigravity when both conditions are true:

  1. agy is available on PATH.
  2. ~/.gemini/antigravity-cli/ contains settings.json or brain/.

Install the status-line bridge​

openusage integrations install antigravity

The installer backs up settings.json to settings.json.bak, registers openusage antigravity statusline, and enables stack_with_default so Antigravity's built-in line remains visible. If a different custom statusLine.command already exists, installation stops rather than replacing it.

Start or refresh an Antigravity session after installation. The command stores the latest payload at:

${XDG_STATE_HOME:-~/.local/state}/openusage/antigravity-status.json

The state file is written atomically with 0600 permissions.

Manual configuration​

{
"accounts": [
{
"id": "antigravity",
"provider": "antigravity",
"auth": "local",
"binary": "agy"
}
]
}

For an alternate state location, add a provider path:

{
"provider_paths": {
"status_file": "~/path/to/antigravity-status.json"
}
}

Status-line data​

Antigravity runs the configured command whenever agent state changes, pipes a JSON document to its standard input, and renders the command's standard output below the prompt. OpenUsage accepts that same document through:

openusage antigravity statusline

The bridge prints a compact line such as AGY · Gemini Pro · quota 94% · context 14% while saving the structured payload for the dashboard and telemetry daemon.

Quota windows whose reset time has already passed are hidden, because they have refilled since the snapshot was taken and their old fraction no longer describes the account. If every window in the latest snapshot has expired, the tile shows "Quota windows expired, waiting for fresh data" until Antigravity sends a new payload.

What is not tracked​

  • Dollar spend. The status-line contract exposes tokens, context, and quota fractions, not a reliable public price surface.
  • Full transcript content. OpenUsage does not parse or store the Antigravity brain/transcript directory in this integration.
  • Credentials. OAuth tokens, API keys, and cookies are never extracted.

Troubleshooting​

  • Provider missing: run which agy and confirm ~/.gemini/antigravity-cli/ exists.
  • No status data: run openusage integrations list --all, install the integration, then start an Antigravity session.
  • Existing status command: back up or remove the custom statusLine.command yourself, then rerun the installer. OpenUsage refuses to overwrite it.
  • Stale data: the dashboard reflects the most recent status-line invocation. Start an active session to refresh it.
  • Frozen tile after moving or reinstalling OpenUsage: Antigravity disables a status-line command that keeps failing, so if the absolute OpenUsage binary path in statusLine.command no longer exists (for example after uninstalling a Homebrew copy), the tile stops updating. openusage integrations list reports the integration as outdated with "OpenUsage binary not found"; run openusage integrations upgrade antigravity to re-register the current binary.