# Antigravity CLI custom status bar

> Source: <https://gist.github.com/ABIvan-Tech/1c979e29a378a67b88a313dfaee18464>
> Published: 2026-06-03 13:50:49+00:00

| #!/bin/bash | |
| # Read JSON payload from stdin | |
| payload=$(cat) | |
| # Extract basic model information | |
| model=$(echo "$payload" | jq -r '.model.display_name // "N/A"') | |
| # Extract token usage data | |
| input=$(echo "$payload" | jq -r '.context_window.total_input_tokens // 0') | |
| output=$(echo "$payload" | jq -r '.context_window.total_output_tokens // 0') | |
| used_pct=$(echo "$payload" | jq -r '.context_window.used_percentage // 0 | round') | |
| # Extract remaining quotas for Gemini, convert to percentages, and round | |
| gem_5h=$(echo "$payload" | jq -r '.quota["gemini-5h"].remaining_fraction // 0 | (. * 100) | round') | |
| gem_wk=$(echo "$payload" | jq -r '.quota["gemini-weekly"].remaining_fraction // 0 | (. * 100) | round') | |
| # Extract remaining quotas for Claude/GPT (3p), convert to percentages, and round | |
| p3_5h=$(echo "$payload" | jq -r '.quota["3p-5h"].remaining_fraction // 0 | (. * 100) | round') | |
| p3_wk=$(echo "$payload" | jq -r '.quota["3p-weekly"].remaining_fraction // 0 | (. * 100) | round') | |
| # Build the final status bar string showing all limits | |
| echo "🤖 ${model} | Context ↓ ${input} (${used_pct}%) | Output ↑ ${output} | Quota(5h/wk) Gemini: ${gem_5h}%/${gem_wk}% | Claude & GPT: ${p3_5h}%/${p3_wk}%" |
