You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5ef50ce
Browse filesBrowse the repository at this point in the historyBrowse files
docs(antigravity): document the data source and its accuracy limits
Adds the Antigravity guide and lists the source across the READMEs, the
getting-started and all-reports pages, the environment variable
reference, and the VitePress sidebar.
The guide states the limitations rather than leaving them implied: cost
is an equivalent public API cost and never a billed amount, unnamed model
ids cannot be priced, `--offline` has no Gemini rates to use, and the
retry, subagent and model-comparison paths are handled by design but have
not yet been exercised against real data.
Antigravity was previously listed as investigated and unsupported,
because it stored conversations as opaque `.pb` payloads that needed an
unpublished schema. It now writes SQLite databases whose protobuf field
numbers can be recovered from the descriptors in its own binary, so that
entry moves to a new section recording how the blocker was resolved.
Antigravity support is experimental. ccusage can read Antigravity CLI usage from the per-conversation SQLite databases it writes locally, opening them read-only.
4
+
5
+
Read the [accuracy notes](#accuracy-notes) before relying on these numbers. Antigravity stores usage as protobuf with no published schema, and some of its recording paths could not be verified against real data yet.
6
+
7
+
## Quick Start
8
+
9
+
```bash
10
+
ccusage antigravity daily
11
+
ccusage antigravity monthly
12
+
ccusage antigravity session
13
+
```
14
+
15
+
Antigravity is also included in unified reports when supported databases are detected:
16
+
17
+
```bash
18
+
ccusage daily
19
+
```
20
+
21
+
## Data Locations
22
+
23
+
By default, ccusage reads every conversation database under:
24
+
25
+
```text
26
+
~/.gemini/antigravity-cli/conversations/*.db
27
+
```
28
+
29
+
Antigravity is a Gemini-family tool, so its CLI state lives under the shared `.gemini` directory rather than a directory of its own.
30
+
31
+
Set `ANTIGRAVITY_DATA_DIR` when Antigravity is stored somewhere else:
|`thinking_output_tokens` + `response_output_tokens`| Output tokens, when the recorded total is absent |
56
+
|`response_model`| Model |
57
+
58
+
`input_tokens` and `cache_read_tokens` are disjoint in the source, matching how ccusage reports them, so a cache read is never also counted as input. `output_tokens` already includes thinking tokens, so reasoning is not added on top of it.
59
+
60
+
Usage is read from two tables per conversation. `steps` is the primary source and holds one row per invocation, including background calls. `gen_metadata` is the only place a human-readable model name appears, and it also keeps usage visible for a step Antigravity has since pruned.
61
+
62
+
## Cost Calculation
63
+
64
+
Antigravity leaves its `model_cost`, `credit_cost` and `consumed_credits` fields unset on consumer accounts, so there is no recorded cost to read. ccusage estimates cost from token counts and LiteLLM pricing for the recorded model name.
65
+
66
+
That figure is the equivalent public API cost, not an amount you were billed. Antigravity is quota-based, so the actual charge for this usage may well be zero.
67
+
68
+
`--mode display` therefore reports no cost, because there is nothing precomputed to display:
69
+
70
+
```bash
71
+
ccusage antigravity daily --mode calculate
72
+
```
73
+
74
+
Use `--offline` to rely on cached pricing data:
75
+
76
+
```bash
77
+
ccusage antigravity daily --offline
78
+
```
79
+
80
+
The embedded offline snapshot covers Anthropic and OpenAI models. Gemini rates are only available from a runtime pricing fetch, so `--offline` reports no cost for Gemini models.
81
+
82
+
## Accuracy Notes
83
+
84
+
Antigravity ships no `.proto` files, so ccusage decodes its stored blobs by protobuf field number. Those numbers were recovered from the schema descriptors embedded in the Antigravity binary rather than guessed from the data, and Antigravity has to read the same blobs back after an upgrade, so it cannot renumber a field without breaking its own persistence.
85
+
86
+
Within those constraints, the following limitations apply:
87
+
88
+
-**Unnamed models cannot be priced.** Antigravity records the model as a numeric id, and background invocations get no `gen_metadata` row to name them. These appear as `antigravity-model-<id>`, and ccusage warns that pricing is missing for them. Their tokens are still counted, so token totals stay complete while the cost total is understated.
89
+
-**Cost is an estimate, never a billed amount.** See [Cost Calculation](#cost-calculation).
90
+
-**Retries are handled by design but unverified.** Failed attempts consume tokens and are recorded separately from the attempt that succeeded. ccusage collects both and deduplicates on the server-assigned response id, which is correct whether or not Antigravity repeats the successful attempt in its retry list — but this has not yet been checked against a conversation that actually retried.
91
+
-**Subagents and model comparisons are unverified.** Sub-conversations get their own database, so reading every database is what makes them visible, and the same response-id dedupe prevents double counting a call a parent also recorded. Neither path has been exercised against real data.
92
+
-**Historical totals depend on retention.** Antigravity trims what it keeps per conversation. If it prunes rows for an older day, that day's total will shrink; ccusage can only report what is still on disk.
93
+
94
+
## Troubleshooting
95
+
96
+
If no Antigravity data appears, check that conversation databases exist under the default path or set `ANTIGRAVITY_DATA_DIR`.
The tool automatically detects available data and aggregates all supported coding CLIs by default.
94
95
Each source-specific environment variable can also contain comma-separated directories, which lets unified reports combine current profiles and archives.
95
96
96
-
Some coding agents have been investigated but are not supported because their local files do not contain reliable token usage. See [Source Support Q&A](/guide/source-support-qa) for the current notes on Antigravity CLI, Grok CLI, and Devin CLI.
97
+
Some coding agents have been investigated but are not supported because their local files do not contain reliable token usage. See [Source Support Q&A](/guide/source-support-qa) for the current notes on Grok CLI and Devin CLI.
0 commit comments