No description
- JavaScript 100%
|
|
||
|---|---|---|
| anthropicbilling@peterp | ||
| openaibilling@peterp | ||
| opencodebilling@peterp | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
aibilling
AI billing tracker applets for the Cinnamon desktop panel (Linux Mint).
Three separate applets, one per AI provider:
| Applet | UUID | Data source |
|---|---|---|
| OpenCode Billing | opencodebilling@peterp |
Local opencode.db (SQLite) + manual account balance |
| OpenAI Billing | openaibilling@peterp |
OpenAI usage API (requires API key) |
| Anthropic Billing | anthropicbilling@peterp |
Anthropic usage API (requires API key) |
Each applet shows spending in the panel, budget tracking with progress bars, daily/monthly averages, and month-end projections.
Install
From this repo
git clone https://github.com/YOUR_USER/aibilling.git
cd aibilling
# Install one, two, or all three:
cp -r opencodebilling@peterp ~/.local/share/cinnamon/applets/
cp -r openaibilling@peterp ~/.local/share/cinnamon/applets/
cp -r anthropicbilling@peterp ~/.local/share/cinnamon/applets/
# Restart Cinnamon (Alt+F2 → type "r" → Enter)
Symlink (development)
ln -s "$(pwd)/opencodebilling@peterp" ~/.local/share/cinnamon/applets/opencodebilling@peterp
ln -s "$(pwd)/openaibilling@peterp" ~/.local/share/cinnamon/applets/openaibilling@peterp
ln -s "$(pwd)/anthropicbilling@peterp" ~/.local/share/cinnamon/applets/anthropicbilling@peterp
Add to panel
- Right-click the panel → Applets
- Find the applet you want (OpenCode Billing, OpenAI Billing, Anthropic Billing)
- Click + to add
Configure
Right-click an applet → Configure to set budget, API keys, and display mode.
Requirements
- Cinnamon desktop (Linux Mint, Ubuntu Cinnamon, etc.)
- OpenCode Billing: requires
sqlite3and OpenCode with Zen tracking - OpenAI/Anthropic Billing: requires a valid API key with billing access
Data source
OpenCode Billing reads from the local OpenCode database:
~/.local/share/opencode/opencode.db
Account balance and monthly limit must be entered manually from app.opencode.ai/members via the Settings dialog.
Provider APIs
| Provider | Endpoint | Auth |
|---|---|---|
| OpenAI | api.openai.com/v1/dashboard/billing/usage |
Bearer token |
| Anthropic | api.anthropic.com/v1/organizations/usage |
x-api-key header |
Both require the API key to have billing/usage read permissions.