dondo-donuts
v0.2.1
Published
Minimal local UI for switching Antigravity and Codex accounts.
Downloads
630
Maintainers
Readme
Dondo
Dondo is a small local Bun app for saving and switching local AI tool accounts. It starts a local web UI, stores saved accounts in an encrypted local vault, and currently supports Antigravity, Codex, and MiniMax.
Current platform support is macOS. Dondo uses the macOS security CLI for the local vault key, and Antigravity account switching uses macOS Keychain entries.
Install
Install Bun 1.3 or newer, then run:
bunx dondo-donutsThen open:
http://localhost:3000The server binds to 127.0.0.1 only.
Development
bun install
bun run startUseful checks:
bun run typecheck
bun run lint
bun test
bun build src/server.ts --target=bun --outdir /tmp/dondo-buildStorage
Dondo stores its vault at the platform data directory:
- macOS:
~/Library/Application Support/Dondo/vault.json - Windows:
%LOCALAPPDATA%/Dondo/Data/vault.json - Linux:
$XDG_DATA_HOME/dondo/vault.jsonor~/.local/share/dondo/vault.json
Set DONDO_DATA_DIR to override the directory, or ANTIGRAVITY_VAULT to override the full vault path.
DONDO_VAULT also overrides the full vault path and takes precedence over the historical ANTIGRAVITY_VAULT name.
Vault shape:
{
"antigravity": {
"data": {},
"limits": {}
},
"codex": {
"data": {},
"limits": {}
},
"minimax": {
"data": {},
"limits": {}
}
}antigravity.data stores saved account snapshots. The token-bearing password field is encrypted with AES-256-GCM before writing to disk. Non-secret metadata such as labels, service names, and timestamps remains readable in the vault so the UI can list accounts. The encryption key is a random local secret stored in macOS Keychain as dondo / vault-key.
antigravity.limits stores cached rate-limit data. Dondo fetches missing limits on first load and refreshes cached limits only when the UI Refresh limits button is used.
codex.data stores encrypted snapshots of ~/.codex/auth.json. Loading a saved Codex account writes that snapshot back to ~/.codex/auth.json with 0600 permissions.
codex.limits stores cached Codex ChatGPT usage data. Dondo fetches missing limits on first load and refreshes cached limits only when the UI Refresh limits button is used.
minimax.data stores encrypted snapshots of ~/Library/Application Support/MiniMax Agent/minimax-agent-config.json. Loading a saved MiniMax account writes that snapshot back to the same path with 0600 permissions.
minimax.limits stores mocked MiniMax limit data. The current implementation records the load or refresh time because the MiniMax rate-limit endpoint is not yet known.
Each limit cache entry has this shape:
{
"fetchedAt": "2026-06-02T00:00:00.000Z",
"quota": {
"ok": true,
"tier": "plus",
"expires": "",
"models": {}
}
}Encrypted strings use the enc:v1: envelope: AES-256-GCM with a 12-byte IV, 16-byte auth tag, then ciphertext, base64 encoded.
Environment
DONDO_PORT=3000
PORT=3000
DONDO_DATA_DIR=/custom/data/dir
DONDO_VAULT=/custom/vault.json
ANTIGRAVITY_VAULT=/custom/vault.json
ANTIGRAVITY_SERVICE=gemini
ANTIGRAVITY_ACCOUNT=antigravity
ANTIGRAVITY_KEYCHAIN=login.keychain-db
ANTIGRAVITY_VERSION=2.0.3
ANTIGRAVITY_LANGUAGE_SERVER_PATH=/Applications/Antigravity.app/Contents/Resources/bin/language_server
CODEX_AUTH_PATH=~/.codex/auth.json
MINIMAX_CONFIG_PATH=~/Library/Application Support/MiniMax Agent/minimax-agent-config.jsonDONDO_PORT takes precedence over PORT. ANTIGRAVITY_KEYCHAIN is passed as the keychain argument to macOS security commands, for example login.keychain-db or an absolute keychain path.
Antigravity limit refreshes can use the saved Google refresh token to rotate an expired saved access token, then write the refreshed token blob back to the encrypted vault entry. Dondo discovers Antigravity's Google OAuth client from the local Antigravity language server binary. Codex limit refreshes only call the usage endpoint with the saved access token.
Local API
All API requests must be sent to localhost. Mutating routes require POST with a JSON object body.
GET /api/antigravity/statePOST /api/antigravity/limits/refreshwith optional{ "key": "label" }POST /api/antigravity/savewith{ "key": "label" }POST /api/antigravity/loadwith{ "key": "label" }POST /api/antigravity/clearGET /api/codex/statePOST /api/codex/limits/refreshwith optional{ "key": "label" }POST /api/codex/savewith{ "key": "label" }POST /api/codex/loadwith{ "key": "label" }GET /api/minimax/statePOST /api/minimax/limits/refreshwith optional{ "key": "label" }POST /api/minimax/savewith{ "key": "label" }POST /api/minimax/loadwith{ "key": "label" }
Clear live deletes the live Antigravity Keychain item plus these local Antigravity state paths:
~/.antigravity-agent/cloud_accounts.db~/.gemini/antigravity~/.gemini/antigravity-ide~/.gemini/antigravity-backup~/Library/Application Support/Antigravity
Security Model
Dondo is designed to be easy to inspect:
- The server listens on
127.0.0.1. - Tokens are not returned to the browser API.
- Saved token payloads are encrypted at rest.
- Rate-limit API calls happen server-side.
- Codex
auth.jsoncontents are never rendered or returned by the API.
This protects against casual plaintext scraping of the vault file. A process running as the same logged-in user may still be able to access local Keychain items depending on operating-system policy. Antigravity restore currently passes the token blob to the macOS security CLI as an argument, which can be visible briefly to same-user process listings.
License
MIT
