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.

  1. Sign in with GitHub

    Your login and avatar URL come from the GitHub profile, and your login becomes the public address of your summary.

  2. Copy the key

    The page after sign-in shows the key once and never again.

  3. 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.

  4. 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 login is your GitHub login. A strict Content-Security-Policy needs https://aiusage.cgaravito.dev in script-src and connect-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>.