Skip to content
Remote Control
Status line customization - Antigravity CLIcliAntigravity CLIFeaturesStatus line customization - Antigravity CLI Antigravity CLI FeaturesAntigravity CLI
Available on:
Antigravity CLI

Define custom scripting configurations and format dynamic JSON state payloads to customize your TUI status line.

The status line is positioned at the bottom of the TUI prompt panel. It provides at-a-glance context regarding active agent cycles, workspace environments, context token window usages, and background execution tasks.

For advanced terminal layouts or custom status bar displays, you can route active agent metadata into a custom script.

Add a statusLine configuration block to your ~/.gemini/antigravity-cli/settings.json file:

{
    "statusLine": {
        "type": "command",
        "command": "~/.gemini/antigravity-cli/statusline.sh"
    }
}

Whenever the agent state changes, the CLI runs your command with sh -c (cmd /c on Windows), pipes the session state as JSON to its stdin, and shows what the command prints to stdout in the status line. Multi-line output and ANSI color codes are supported, and a leading ~ in command expands to your home directory.

The statusLine block accepts these properties:

  • command (string): Shell command that prints the status line.
  • type (string, default "command"): Optional. "command" is the only supported type.
  • padding (integer, default 0): Number of blank lines above the status line.
  • enabled (boolean, default true): Set to false to stop running command and show the built-in status line instead. The command stays in settings.json.
  • stack_with_default (boolean, default false): When true, shows your status line below the built-in one instead of replacing it.

Set statusLine to an object, not to true or false. The CLI reads a boolean as an object without a command, so no script runs.

The JSON payload piped to your script contains the following top-level fields:

FieldTypeDescription
cwdstringDirectory the CLI was started in.
session_idstringSame value as conversation_id, kept for compatibility.
conversation_idstringID of the active conversation (empty before the first one starts).
conversation_titlestringTitle of the active conversation (omitted until it has one).
transcript_pathstringPath where the conversation transcript is written (the file may not exist yet).
modelobjectContains id, display_name, and effort (low through max, only for models with several effort levels). null until a model is selected.
workspaceobjectContains current_dir and project_dir paths.
versionstringCLI version string.
context_windowobjectContains token usage details: total_input_tokens, total_output_tokens, context_window_size (0 if unknown), used_percentage, remaining_percentage, and current_usage (null before the first model response).
exceeds_200k_tokensboolTrue if the conversation context has exceeded 200,000 tokens (null before the first model response).
agentobjectContains the name of the active agent (omitted for the default agent).
productstringApplication name (antigravity).
quotaobjectMaps quota bucket IDs to their status: remaining_fraction or remaining_amount, reset_time, reset_in_seconds, and disabled (optional).
agent_statestringCurrent state: idle, working, tool_use, reviewing, authenticating, initializing, or error.
vcsobjectVersion control type: git, jj, or hg (omitted outside a repository).
cycle_modestringMode selected with Shift + Tab: accept-edits, auto, or plan (omitted in the default mode).
sandboxobjectContains enabled, which is true while the terminal sandbox is on.
subagentsarrayRunning and finished subagents, each with name, role, and status (running or completed).
artifact_countintNumber of artifacts produced in the conversation (omitted when 0).
plan_tierstringSubscription tier of the authenticated user (optional).
emailstringEmail address of the signed-in account.
pending_input_countintNumber of queued user messages (omitted when 0).
tool_confirmation_pendingboolTrue when a tool confirmation dialog is showing (omitted otherwise).
task_countintNumber of running background tasks (omitted when 0).
terminal_widthintLive width of the interactive terminal.
vimobjectVim editing state: mode is NORMAL, INSERT, VISUAL, or VISUAL LINE. Present only when Vim editor mode is enabled.
costobjectEstimated spend in US dollars: total_usd (including subagents), subagent_usd, and estimated. These are estimates based on list prices, not billed amounts (omitted until a cost is reported).

Here is a sanitized, typical JSON payload piped to your status line script:

{
    "cwd": "/home/user/my-project",
    "session_id": "12345678-abcd-ef01-2345-6789abcdef01",
    "conversation_id": "12345678-abcd-ef01-2345-6789abcdef01",
    "transcript_path": "/home/user/.gemini/antigravity/brain/12345678-abcd-ef01-2345-6789abcdef01/.system_generated/logs/transcript.jsonl",
    "conversation_title": "Explain the factorial function",
    "model": {
        "id": "Gemini 4 Argon (Medium)",
        "display_name": "Gemini 4 Argon (Medium)",
        "effort": "medium"
    },
    "workspace": {
        "current_dir": "/home/user/my-project",
        "project_dir": "/home/user/my-project"
    },
    "version": "1.4.5",
    "context_window": {
        "total_input_tokens": 88244,
        "total_output_tokens": 61074,
        "context_window_size": 1048576,
        "used_percentage": 14.24,
        "remaining_percentage": 85.76,
        "current_usage": {
            "input_tokens": 63382,
            "output_tokens": 346,
            "cache_creation_input_tokens": 0,
            "cache_read_input_tokens": 20857
        }
    },
    "exceeds_200k_tokens": false,
    "product": "antigravity",
    "quota": {
        "gemini-weekly": {
            "remaining_fraction": 0.9378,
            "reset_time": "2026-07-06T07:50:32Z",
            "reset_in_seconds": 560580
        }
    },
    "agent_state": "idle",
    "vcs": {
        "type": "git"
    },
    "cycle_mode": "plan",
    "sandbox": {
        "enabled": false
    },
    "artifact_count": 2,
    "plan_tier": "Pro",
    "email": "developer@example.com",
    "task_count": 1,
    "terminal_width": 111,
    "cost": {
        "total_usd": 0.4213,
        "subagent_usd": 0,
        "estimated": false
    }
}

You can download a complete, layout-adaptive script from the official statusline.sh example on GitHub. This script shows the agent state, the model, a context window usage bar, and counts of artifacts, subagents, and background tasks.

Save the script to ~/.gemini/antigravity-cli/statusline.sh and make it executable:

chmod +x ~/.gemini/antigravity-cli/statusline.sh

With the script configured, your status line replaces the built-in one below the prompt box:

A custom status line below the prompt box showing READY, Gemini 4 Argon (Medium), a context usage bar at 1.0%, artifact, subagent, and task counts, and the sandbox state

Explore the following guides to customize other CLI elements: