No description
  • JavaScript 100%
Find a file
2026-06-22 09:34:48 -06:00
anthropicbilling@peterp fix: use correct xlet-settings -i flag to open applet settings from menu 2026-06-19 11:55:28 -06:00
openaibilling@peterp fix: use correct xlet-settings -i flag to open applet settings from menu 2026-06-19 11:55:28 -06:00
opencodebilling@peterp fix(opencode-billing): guard Pi adapter fetch against null sessions path 2026-06-22 09:33:57 -06:00
.gitignore Initial commit 2026-06-19 10:07:04 -06:00
LICENSE Initial commit 2026-06-19 10:07:04 -06:00
README.md refactor: split aibilling into per-provider applets 2026-06-19 11:42:58 -06:00

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)
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

  1. Right-click the panel → Applets
  2. Find the applet you want (OpenCode Billing, OpenAI Billing, Anthropic Billing)
  3. 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 sqlite3 and 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.