Skip to content

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 TUI executes your command script, pipes a detailed state JSON payload directly to the script’s stdin, reads your formatted string from stdout, and renders the result in the prompt’s status line. Full ANSI color codes are supported.

The block accepts three more optional keys: padding adds blank lines above the status line, enabled set to false suspends the script while keeping the command on file, and stack_with_default set to true renders your script below the built-in line instead of replacing it.

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

FieldTypeDescription
cwdstringCurrent working directory when the CLI was launched.
session_idstringBackward-compatibility alias for conversation_id.
conversation_idstringCurrent unique conversation ID.
transcript_pathstringAbsolute path to the active conversation transcript log file (optional).
modelobjectContains id and display_name of the active model.
workspaceobjectContains current_dir and project_dir paths.
versionstringCLI version string.
context_windowobjectContains token usage details: total_input_tokens, total_output_tokens, context_window_size, used_percentage, remaining_percentage, and current_usage sub-object.
exceeds_200k_tokensboolTrue if the conversation context has exceeded 200k tokens (null before first API call).
productstringApplication name (e.g., antigravity).
quotaobjectMaps model/bucket IDs to their quota status, containing remaining_fraction, reset_time, and reset_in_seconds (optional).
agent_statestringCurrent state: idle, thinking, working, tool_use, initializing.
vcsobjectVersion control info: type (git/jj/hg), branch, client, dirty (optional).
sandboxobjectSandbox configuration: enabled, allow_network (optional).
artifact_countintNumber of artifacts produced in the conversation.
plan_tierstringSubscription tier of the authenticated user (optional).
emailstringEmail/LDAP of the authenticated user.
pending_input_countintNumber of queued user messages.
tool_confirmation_pendingboolTrue when a tool confirmation dialog is showing.
task_countintNumber of running background tasks.
terminal_widthintLive width of the interactive terminal.
execution_modestringCurrent active prompt execution mode (e.g., planning, fast).
vimobjectVim editing state: mode is NORMAL, INSERT, VISUAL, or VISUAL LINE. Present only when Vim editor mode is enabled.

Here is a fully 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",
    "model": {
        "id": "Gemini 3.5 Flash (High)",
        "display_name": "Gemini 3.5 Flash (High)"
    },
    "workspace": {
        "current_dir": "/home/user/my-project",
        "project_dir": "/home/user/my-project"
    },
    "version": "1.0.13",
    "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",
        "branch": "main",
        "dirty": false
    },
    "sandbox": {
        "enabled": false
    },
    "artifact_count": 2,
    "plan_tier": "Pro",
    "email": "developer@email.com",
    "task_count": 1,
    "terminal_width": 111,
    "execution_mode": "planning"
}

You can download a complete, layout-adaptive script from the official statusline.sh example on GitHub. This script renders state badges, handles active branches, and formats context window progress bars dynamically.

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

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