Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ OpenUsage lives in your menu bar and shows you how much of your AI coding subscr

- [**Amp**](docs/providers/amp.md) / free tier, bonus, credits
- [**Antigravity**](docs/providers/antigravity.md) / all models
- [**Antigravity CLI**](docs/providers/antigravity-cli.md) / gemini pro, gemini flash, claude
- [**Claude**](docs/providers/claude.md) / session, weekly, extra usage, local token usage (ccusage)
- [**Codex**](docs/providers/codex.md) / session, weekly, reviews, credits
- [**Copilot**](docs/providers/copilot.md) / premium, chat, completions
Expand Down
3 changes: 2 additions & 1 deletion docs/plugins/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const resp = ctx.host.http.request({
## Keychain (macOS only)

```typescript
host.keychain.readGenericPassword(service: string): string
host.keychain.readGenericPassword(service: string, account?: string): string
```

Reads a generic password from the macOS Keychain.
Expand All @@ -239,6 +239,7 @@ Reads a generic password from the macOS Keychain.

- **macOS only**: Throws on other platforms
- **Throws if not found**: Returns the password string if found, throws otherwise
- **Optional account**: When `account` is provided, lookup is scoped to both service and account

### Example

Expand Down
36 changes: 36 additions & 0 deletions docs/providers/antigravity-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Antigravity CLI

Tracks Google Antigravity CLI (`agy`) Cloud Code quota.

## Setup

Sign in with the CLI first:

```bash
agy
```

OpenUsage uses the CLI keychain login. It does not start a browser OAuth flow.

## Data Sources

- Non-secret CLI context: `~/.gemini/antigravity-cli/`
- Auth: the Antigravity CLI OS keyring login. On macOS, current CLI builds store this under keychain service `gemini`, account `antigravity`.
- Quota APIs:
- `POST https://daily-cloudcode-pa.googleapis.com/v1internal:loadCodeAssist`
- `POST https://daily-cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels`
- `POST https://daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota`

The provider does not read legacy Gemini OAuth files such as `~/.gemini/oauth_creds.json`.

## Quota Lines

- Gemini model IDs or labels containing `gemini` and `pro` -> `Gemini Pro`
- Gemini model IDs or labels containing `gemini` and `flash` -> `Gemini Flash`
- Other non-Gemini model pools -> `Claude`

When multiple buckets map to the same line, OpenUsage shows the lowest remaining fraction.

## Notes

Official Antigravity docs describe a shared agent harness and shared settings between the CLI and Antigravity 2.0. OpenUsage tracks Antigravity CLI separately because the CLI uses different state and auth paths.
15 changes: 15 additions & 0 deletions plugins/antigravity-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Antigravity CLI

This provider reads Google Antigravity CLI (`agy`) usage from the Cloud Code quota APIs used by the CLI. It is separate from the Antigravity IDE and Gemini providers because `agy` stores state and auth differently.

Authenticate with `agy` before enabling this provider:

```sh
agy
```

OpenUsage reads non-secret context only from `~/.gemini/antigravity-cli/`. It does not read legacy Gemini OAuth files such as `~/.gemini/oauth_creds.json`.

Authentication comes from the Antigravity CLI OS keyring login. On macOS, current CLI builds store it under keychain service `gemini` and account `antigravity`. The provider accepts raw tokens, JSON OAuth-style payloads, and `go-keyring-base64:` wrapped values when the keychain returns them.

Official Antigravity docs describe a shared agent harness and shared settings between the CLI and Antigravity 2.0. OpenUsage tracks Antigravity CLI separately so the auth path and implementation remain clear.
3 changes: 3 additions & 0 deletions plugins/antigravity-cli/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading