tokentop agent plugin for Gemini — the canonical plugin for all tools built on Google's gemini-cli-core session format, including Gemini CLI and Antigravity.
| Capability | Status |
|---|---|
| Session parsing | Yes |
| Credential reading | Yes |
| Real-time tracking | Yes |
| Multi-provider | No |
- Parses Gemini sessions from
~/.gemini/tmp/<project-hash>/chats/*.json - Extracts token usage (input, output, cached, thoughts) per message
- Watches for real-time activity via filesystem watchers with dirty-path optimization
- Reads credentials from both
~/.gemini/oauth_creds.json(Gemini CLI) and~/.config/opencode/antigravity-accounts.json(Antigravity) - Two-layer caching — TTL-based result cache + per-session LRU aggregate cache
This plugin covers any tool that writes the ConversationRecord JSON format to ~/.gemini/tmp/:
| Tool | Detected |
|---|---|
| Gemini CLI | Yes |
| Antigravity IDE | Yes |
Any gemini-cli-core consumer |
Yes |
This plugin is bundled with tokentop — no separate install needed. If you need it standalone:
bun add @tokentop/agent-gemini- Gemini CLI or Antigravity installed
- Bun >= 1.0.0
@tokentop/plugin-sdk^1.0.0 (peer dependency)
| Type | Access | Paths |
|---|---|---|
| Filesystem | Read | ~/.gemini |
This plugin supersedes both @tokentop/agent-gemini-cli and @tokentop/agent-antigravity. Both read from the same ~/.gemini/tmp directory with identical session formats — there is no way to distinguish which tool created a given session file.
bun install
bun run build
bun test
bun run typecheckSee the Contributing Guide. Issues for this plugin should be filed on the main tokentop repo.
MIT