Skip to content

Antigravity Data Source

ccusage reads Antigravity's local SQLite conversation databases as a standalone source. It uses the antigravity namespace, so Antigravity rows remain separate from Gemini CLI rows in focused and unified reports.

Focused Views

bash
# Daily Antigravity usage
ccusage antigravity daily

# Monthly Antigravity usage
ccusage antigravity monthly

# Antigravity sessions
ccusage antigravity session

These views support the shared report options, including --json, --breakdown, --mode, --offline, --since, and --until.

Data Source

By default, ccusage scans these local conversation roots:

  • ~/.gemini/antigravity/conversations/
  • ~/.gemini/antigravity-cli/conversations/
  • ~/.gemini/antigravity-ide/conversations/
  • ~/.gemini/antigravity-backup/conversations/
  • ~/.config/antigravity/conversations/

Each root is independent from Gemini CLI discovery. To use one or more custom roots, set ANTIGRAVITY_DATA_DIR to comma-separated directories. A configured directory can be either an Antigravity data root containing conversations/ or the conversation directory itself:

bash
ANTIGRAVITY_DATA_DIR="$HOME/.gemini/antigravity-cli,/backup/antigravity" \
  ccusage antigravity daily

Only .db files are read. ccusage opens them read-only and reads the gen_metadata rows in ascending idx order. When present, the real steps schema contributes step and retry usage, and trajectory_metadata_blob supplies the timestamp fallback. SQLite, row-iteration, and protobuf failures are reported instead of becoming empty or partial reports.

What Gets Calculated

  • Input tokens - The fresh-input bucket is reported independently.
  • Cache writes and reads - Both cache buckets remain separate from uncached input.
  • Output and reasoning - Total output is split into visible output and thinking/reasoning tokens.
  • Model names - Antigravity display names and known internal aliases are normalized to stable model IDs. Effort variants remain visible; for example, Gemini 3.8 Flash High is reported as gemini-3.8-flash-high.
  • Costs - calculate and auto use the pricing catalog when a matching model is available. Effort variants use their base model's pricing when the catalog does not list a separate variant. Use --offline to avoid a pricing refresh.

Continuation rows inherit the most recently observed model in their database. Usage in generation metadata and step metadata is combined, including retry records. Successful, retry, and source copies are deduplicated by their response, provider-assigned message, or message identity.

Configuration

Use the antigravity namespace for source-specific defaults and command overrides in ccusage.json:

json
{
	"antigravity": {
		"defaults": {
			"offline": true
		},
		"commands": {
			"daily": {
				"timezone": "UTC"
			}
		}
	}
}

Troubleshooting

No Antigravity usage data found

Check that the conversation databases exist below one of the default roots, or set ANTIGRAVITY_DATA_DIR to the directory containing conversations/. The databases must contain the gen_metadata table.

A database error is reported

ccusage does not turn unreadable or incomplete SQLite databases into an empty report. Check the path in the error and ensure the database is readable and has the expected gen_metadata (idx, data) schema.

Costs show as zero

Use ccusage antigravity daily --mode calculate and check the model name in --json output. A model that is not in the embedded pricing catalog is reported without an estimate; you can provide a pricing override through the normal pricingOverrides configuration.

Released under the MIT License.