Track your Antigravity token usage and cost

Antigravity CLI (agy) keeps every conversation in a local database, with the tokens each response used and the model that answered. agy-powerline reads those databases to show how many tokens you used today, this week and this month, per model, and what they would cost at the public API list prices: in a terminal dashboard, in the editor's Usage tab, and as widgets in the bar. It all happens on your machine, read-only and offline.

The usage dashboard

Run it in any terminal:

npx agy-powerline usage        # the last 90 days
npx agy-powerline usage 7d     # or 14d, 30d, 90d

The same dashboard is the Usage tab (u) of the interactive editor (npx agy-powerline): Enter steps the window through 7, 14, 30 and 90 days, and r reads the conversations again.

agy-powerline usage dashboard: Today, Last 7d and Last 30d cards with tokens, estimated cost and cache hit; a Models card beside the 14-day usage breakdown; an activity heatmap beside Highlights with budgets and pace

What each card shows

Tokens and cost in the bar

Each total is also a widget, so the bar can show it while you work. Add them in the editor's Widgets tab (a), or in ~/.agy-powerline/statusline.config.json:

Tokens and cost in the bar
WidgetShows
tokensToday, costTodayToday, in your time zone
tokensWeek, costWeekThe last 7 days
tokensCycle, costCycleThe current 7-day quota cycle, from its reset time
tokensMonth, costMonthThe last 30 days
totalTokens, costThis session only, as agy reports it

The ready-made configs include a cost budget bar to start from, and Configuration lists every option of these widgets.

Set a budget

Give a token or cost widget a budget, and it shows the share used and turns to the caution and danger colors as you approach it:

{
  "widgets": [
    { "id": "costWeek", "budget": 50 },
    { "id": "tokensToday", "budget": 2000000, "budgetMode": "remaining" }
  ]
}

The dashboard's Highlights card shows the same budgets, so you can check them without opening agy. In the editor, set one under Widgets › a Tokens or Cost widget › Budget.

How the cost is estimated

The cost is an estimate, always shown with a ~. It prices your tokens at the Gemini API and Claude API list prices for the models agy offers (input, output, cache reads and cache writes, each at its own rate). It isn't a bill: an agy plan is a subscription with quotas, so this tells you what the same work would cost at API prices, and which model it went to.

A model without a built-in price uses a fallback rate. To use your own rates, add a pricing map to your config (Configuration shows how); doctor reports any entry it can't use.

Export to JSON or CSV

npx agy-powerline usage 30d --json   # the whole summary, for scripts
npx agy-powerline usage 30d --csv    # one row per day: tokens, cache hits, estimated USD and cache savings

--weekly and --monthly make the CSV one row per week or month.

What it reads, and what it needs

Next steps