aiusage
Token-usage summaries for your GitHub login, collected on your machines and served at a public URL.
This page runs the widget for cgaravitoq, so the bar at the
top of the screen is the live demo, click it to open.
-
Sign in with GitHub
Your login and avatar URL come from the GitHub profile, and your login becomes the public address of your summary.
-
Copy the key
The page after sign-in shows the key once and never again.
-
Install the collector
bun add -g @cgaravitoq/aiusage aiusage install --url https://aiusage.cgaravito.dev --key <key>Bun 1.4.0 or newer on macOS or Linux, Windows is not supported. Run the command install prints after
load:to start collecting. -
Embed the widget
<script src="https://aiusage.cgaravito.dev/widget/v1.js" defer></script> <aiusage-island login="<login>"></aiusage-island>Both lines go in the layout of your site, and
loginis your GitHub login. A strict Content-Security-Policy needshttps://aiusage.cgaravito.devinscript-srcandconnect-src.
Each sign-in issues a new API key and revokes every existing key of your
login on every machine. After signing in again, reinstall the collector
with the new key by running: aiusage install --url https://aiusage.cgaravito.dev --key <key>.