Add an adaptive telemetry statusline to Antigravity CLI. It shows session, model, Git, context, quota, sandbox, task, host, and power data, then packs available fields across rows as terminal width changes.
Note
The Weby Homelab community fork of Antigravity CLI installs this statusline by default. Follow this README to install it with another Antigravity CLI build, reinstall it, or change its display mode.
The renderer combines live runtime telemetry from the Antigravity CLI payload with local Git, system diagnostics, and hardware metrics:
- Session & Vim Mode:
- Agent State:
READY(idle),THINKING(processing),WORKING(background ops), orTOOL(running tools). - Vim Editor Mode: dynamic indicator rendered in LINE1 right next to agent state:
- Styled 256-color mode:
NORMAL(Blue),INSERT(Bright Green),VISUAL/VISUAL LINE(Magenta / Purple), and fallback (Cyan). - Classic ASCII mode:
[NORMAL],[INSERT],[VISUAL],[VISUAL LINE].
- Styled 256-color mode:
- Model & Account: active LLM model ID/display name, user plan tier (
PLAN_TIER), authenticated account email (USER_EMAIL), conversation ID prefix (at widths >= 80 cols), and CLI version.
- Agent State:
- Workspace:
- Shortened current working directory path.
- Active VCS/Git branch name with real-time dirty status (
*with red accent when unstaged/staged modifications exist).
- Usage & Metrics:
- Context Window: dynamic usage bar (
ctxwith 10 or 20 segments) with percentage (14.2%) and precise token counters: active used tokens vs context window limit (149.3K / 1.0M). Uses explicittotal_tokenswhen provided by the CLI or falls back to summingtotal_input_tokens + total_output_tokens. - Token Metrics: session tokens sum and turn delta counters (
turn: +IN/OUT) on expanded layouts. - Model-Aware Quota: automatically prioritizes third-party quotas (
3p-5h,3p-weekly) when using Claude, GPT, or OpenAI models, and Gemini quotas (gemini-5h,gemini-weekly) when using Gemini models. Cleanly hides when no quota is active. - Quota Reset Countdown: remaining time until the active quota window resets (
⌛).
- Context Window: dynamic usage bar (
- Execution & Orchestration:
- Sandbox Status: network mode indicator (
ON (net), ON (no-net), or sandbox off). - Artifacts: count of active output artifacts (
). - Subagents: live counter of spawned background subagents (
) reflecting canonical technical truth immediately upon creation (0 -> 1, 0 -> 3). - Background Tasks: count of running asynchronous background tasks (
).
- Sandbox Status: network mode indicator (
- Host & System Diagnostics:
- Hostname and Tailscale IPv4 address when available (
). - Power source (
AC) and battery charge percentage (🔋 BAT). - Linux host diagnostics: real-time CPU 1-minute load average and RAM utilization percentage extracted directly from
/proc/loadavgand/proc/meminfo.
- Hostname and Tailscale IPv4 address when available (
The statusline reads Antigravity CLI data from standard input. The renderer itself does not send session data over the network.
The default preset uses 256-color ANSI styling and Nerd Fonts 3 glyphs. Its line-packing engine measures each telemetry badge and dynamically flows badges into cleanly framed boxed rows (╭─, ├─, ╰─) without line wrapping.
| Terminal width | Layout tier | Context bar | Quota bar | Telemetry density & packing |
|---|---|---|---|---|
| >= 235 columns | Ultra-Wide single/multi-row | 20 segments | 15 segments | Maximized wide-bar with full plan, email, CPU/RAM, battery, and turn tokens. |
| 180 – 234 columns | Maximized wide terminal | 10 segments | 8 segments | Expanded badges with user email, plan tier, full model and branch names. |
| 130 – 179 columns | Medium-Wide 2-row layout | 10 segments | 8 segments | 2-row boxed layout balancing session data on row 1 and usage/host on row 2. |
| 100 – 129 columns | Medium terminal layout | 10 segments | 8 segments | Multiline boxed packing with model, branch, context, and quota. |
| 60 – 99 columns | Compact & dense packing | 10 segments | 8 segments | Responsive truncation of long names with vertical stacking (up to 4+ rows) to prevent overflow. |
Both the Bash and PowerShell renderers share identical adaptive bar sizing, Vim mode styling, and line packing. The final row count dynamically depends on the telemetry available in the current session.
📸 Visual Screenshot Gallery Across All Terminal Widths
3652×243 resolution — Expanded 20-segment context bar and 15-segment quota bar with maximized single-line telemetry.
3054×343 resolution — Full host diagnostics with CPU load average, RAM utilization percentage, UPS battery status, subagents, and turn token deltas.
2848×192 resolution — Expanded wide terminal view showing active user subscription plan, account email, dirty Git branch, and session token sum.
1767×240 resolution — Automatic 2-row boxed layout (╭─, ╰─) gracefully distributing session info on row 1 and context/usage/host on row 2.
1516×187 and 1636×249 resolutions — Balanced multiline packing retaining full telemetry visibility across standard developer terminal splits.
1386×250 and 1599×565 resolutions — Smart dynamic packing adapting to small split panes and mobile SSH sessions; vertically stacks into 4+ rows with zero horizontal clipping.
Use classic mode when your terminal does not have a Nerd Font. It replaces private-use glyphs and 256-color capsules with Unicode labels and 16-color ANSI output.
Install the implementation for your operating system:
| Platform | Renderer | Requirements | Optional integrations |
|---|---|---|---|
| Linux | statusline.sh |
Bash and jq |
Git, GNU timeout, Tailscale, /proc, /sys/class/power_supply |
| macOS | statusline.sh |
Bash and jq |
Git, Tailscale, pmset |
| Windows | statusline.ps1 |
Windows PowerShell 5.1 or newer | Git, Tailscale, Common Information Model (CIM) battery data |
Git is optional. Without it, the statusline omits live branch and dirty-state data.
The installers copy the renderer and uninstaller to ~/.antigravity (or %USERPROFILE%\.antigravity on Windows), configure statusLine.type = "command" in Antigravity CLI settings, stage files atomically using temporary files to avoid race conditions during background runner polling, and maintain a dedicated state snapshot (statusline_installed_state.json) for safe, non-destructive upgrades and uninstalls.
Warning
Run the installer as your normal account. Do not use sudo: the installer writes to your home directory.
Tip
Review install.sh or install.ps1 before executing a remote script.
Install jq, then run the installer with either curl or wget.
curl -fsSL https://raw.githubusercontent.com/weby-homelab/antigravity-cli-statusline/main/install.sh | bashThe equivalent wget command is:
wget -qO- https://raw.githubusercontent.com/weby-homelab/antigravity-cli-statusline/main/install.sh | bashRun the installer from PowerShell:
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm https://raw.githubusercontent.com/weby-homelab/antigravity-cli-statusline/main/install.ps1)"Restart Antigravity CLI after installation. Rerun the same installer to upgrade the statusline.
The installer updates one of these files:
- Linux and macOS:
~/.gemini/antigravity-cli/settings.json - Windows:
%USERPROFILE%\.gemini\antigravity-cli\settings.json
A Linux configuration has this shape:
{
"statusLine": {
"type": "command",
"command": "/home/your_username/.antigravity/statusline.sh",
"enabled": true
}
}On macOS, replace /home/your_username with /Users/your_username. On Windows, use this command value (quoting the path only if it contains spaces):
{
"statusLine": {
"type": "command",
"command": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:/Users/your_username/.antigravity/statusline.ps1",
"enabled": true
}
}Append --classic (or -Classic on Windows) to the configured command:
{
"statusLine": {
"type": "command",
"command": "/home/your_username/.antigravity/statusline.sh --classic",
"enabled": true
}
}The Bash and PowerShell renderers also accept --no-nerdfont and --compatibility.
The Bash and PowerShell renderers accept flags that override the width reported by Antigravity CLI:
| Flag | Effective width | Intended result |
|---|---|---|
--compact / -Compact |
89 columns | Compact packed output |
--medium / -Medium |
120 columns | Medium packed output |
--medium-wide / -MediumWide |
150 columns | Medium-wide packed output |
Append one flag to the command value in settings.json.
Check the installed version and print the live icon legend after installation.
~/.antigravity/statusline.sh --version
~/.antigravity/statusline.sh --legendThe short forms are -v and -l.
powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME\.antigravity\statusline.ps1" -Version
powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME\.antigravity\statusline.ps1" -LegendThe Windows renderer also accepts --version, -v, --legend, and -l.
The repository includes a comprehensive automated test suite with 16 public JSON fixtures and 5 test runners verifying renderer logic, CLI flags, Vim modes, token accounting, and installer migrations:
bash tests/run_all.shThe test runner validates:
tests/test_bash_renderer.sh: 20 unit assertions across 14 terminal widths (60 to 255 columns).tests/test_timeout.sh: Stdin timeout guard and bounded subshell fallback on hung inputs without GNU timeout.tests/test_subagent_cache.sh: State transitions (0 -> 1, 1 -> 0, 0 -> 3) verifying canonical technical truth.tests/test_install_bash.sh: Fresh installation, non-destructive upgrades, state snapshot rollback, and symlink preservation.tests/test_windows.py: Cross-platform Windows UTF-8 BOM,powershell.execommand quoting, andPSCustomObjectmutation checks.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\tests\test_powershell_renderer.ps1
python tests\test_windows.pyThe installation keeps its executable files separate from Antigravity CLI settings:
~/.antigravity/
├── statusline.sh
└── uninstall.sh
~/.gemini/antigravity-cli/
├── settings.json
├── statusline_installed_state.json # State snapshot for safe rollback across upgrades
└── settings.json.bak # Legacy backup file if present
Windows uses the same directory names under %USERPROFILE% and installs statusline.ps1 plus uninstall.ps1. The committed production statusline.ps1 includes a UTF-8 BOM (\xef\xbb\xbf) ensuring compatibility with Windows PowerShell 5.1 across all system locales.
The uninstaller uses the dedicated state snapshot (statusline_installed_state.json) to perform a clean, non-destructive rollback:
- If
statusLinedid not exist before installation, the uninstaller removes only thestatusLinekey. - If
statusLineexisted before installation, the uninstaller restores only its original pre-installation value. - Any unrelated settings added before or after installation (such as theme or keybindings) remain completely intact.
- Symlinks to dotfiles repositories are preserved without breaking link targets.
Run the Linux or macOS uninstaller:
~/.antigravity/uninstall.shRun the Windows uninstaller:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$HOME\.antigravity\uninstall.ps1"Use these checks when the statusline does not render as expected:
- Icons appear as boxes: install and select a Nerd Font 3 font, or add
--classicto the configured command - No statusline appears: confirm that
statusLine.enabledistrue, check the command path, and restart Antigravity CLI - Linux or macOS renderer exits: run
jq --version; the Bash implementation requiresjq - Git data is missing: install Git and confirm the current working directory belongs to a Git repository
- Windows Illegal characters in path: verify your command in
settings.jsondoes not contain literal escaped quotes around-File. The v0.2.4+ installer handles spaces automatically using standard path syntax - Windows PowerShell 5.1 font or encoding errors:
statusline.ps1includes a UTF-8 BOM to prevent mojibake on non-UTF-8 Windows locales. Ensure the BOM is preserved - A narrow terminal adds more rows: increase the terminal width or use a layout override (
--compact,--medium) to test a fixed width - Host fields are missing: the renderer omits diagnostics that the operating system or local tools do not expose
Complete visual map of all Nerd Font icons, classic Unicode fallbacks, state badges, and dynamic layouts supported by the statusline (accessible anytime via statusline.sh --legend or statusline.ps1 -Legend):
See CHANGELOG.md for versioned changes and GitHub Releases for downloadable release records.
Built in Ukraine under air raid sirens and blackouts ⚡
© 2026 Weby Homelab








