Skip to main content

aium

AI usage monitor: a Python CLI core that polls your AI providers and a GNOME Shell extension that displays the results. Think of it as a system monitor, but for AI providers.

PyPI version CI License

Features

  • Panel indicator — robot icon with monthly spend and balance (stacked two-line label).
  • Popover — per-provider: balance, monthly spend, rate-limit quota windows, sparklines (spend or quota trend), plan, and a peak/off-peak dot for providers with dynamic pricing (DeepSeek).
  • Clickable providers — open the provider's usage/dashboard page.
  • Provider abstraction — add a provider with one file + one registry entry.
  • Secrets — API keys in the system keyring; OAuth providers reuse the CLI's own credential files (Codex, Claude Code, Antigravity).
  • History — SQLite time-series of balances, quota and usage.
  • systemd timer — polls every 60 minutes, no resident daemon.

Screenshots

TODO: add a panel/popover screenshot to assets/screenshot.png.

Installation

CLI

pipx install aium-cli     # or: uv tool install aium-cli
aium init

The CLI reads its config from ~/.config/aium/ (YAML) and keeps history in ~/.local/share/aium/ (SQLite).

GNOME Shell extension

./install.sh             # installs the CLI (uv tool), the systemd timer and the extension

or grab the extension zip from the releases page, extract it to ~/.local/share/gnome-shell/extensions/aium@jonykalavera/, then enable it with gnome-extensions enable aium@jonykalavera (a logout/login may be required).

Quick start

aium providers add deepseek
aium keys set deepseek                  # prompts for the API key (keyring)
aium poll
aium status

Providers

Kind Auth What it reports
deepseek API key balance (prepaid), peak/off-peak tariff
kimi API key balance (prepaid)
openrouter API key balance + monthly usage
openai OAuth (Codex) rate-limit quota windows
anthropic OAuth (Claude Code) spend vs monthly limit + quota windows
google OAuth (Antigravity) plan/tier + quota (paid tiers)
manual fixed subscription cost + renewal

OAuth providers reuse the CLI's own credential files (~/.codex/auth.json, ~/.claude/.credentials.json, ~/.gemini/oauth_creds.json) — no API key needed. Their usage endpoints are private/undocumented and may break.

Commands

aium providers add|list|show|update|remove
aium providers update deepseek --peak-window 00:30-16:30   # UTC high-tariff window
aium keys set|list|delete
aium poll                 # fetch every provider, persist history, refresh cache
aium status               # show the last cached status
aium history <id>         # balance history for a provider

peak_window marks the UTC peak (high-tariff) hours as 'HH:MM-HH:MM' (wrapping across midnight allowed); the provider row shows a peak/off-peak indicator. DeepSeek defaults to 00:30-16:30.

Architecture

src/aium/            # Python core (config, secrets, history, polling, providers)
extension/           # GNOME Shell outlet (GJS) — reads ~/.cache/aium/status.json
  lib/               #   pure logic (unit-tested), no gi:// imports
  tests/             #   GJS unit tests (gjs -m extension/tests/run.js)
systemd/             # aium-poll timer/service (user units)
tests/               # pytest (core)

The extension is a passive outlet: no provider CRUD, no secrets. It renders ~/.cache/aium/status.json, whose schema (models.py::StatusFile) is the contract between the core and the extension.

Development

uv sync --all-groups --locked   # install dev deps
make uv.check                   # ruff lint + ty typecheck + format check
make uv.test                    # pytest --cov aium --blockage (network blocked)
make ext-test                   # GJS unit tests for the extension logic

Tools: ruff (lint/format), ty (type checker), pytest (coverage + network blockage). Recipes use bare commands; prefix with uv. to run inside the uv environment. To iterate on the extension on Wayland (no hot reload), use ./scripts/dev-nested.sh (requires mutter-devkit).

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aium_cli-0.1.1.tar.gz (71.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aium_cli-0.1.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file aium_cli-0.1.1.tar.gz.

File metadata

  • Download URL: aium_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 71.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aium_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 db8bc30e4b01b52439d03d1aae9bb6c9c0c48d852c83247bbbf9656bdb661078
MD5 79dc178dd5ad1931dfcd19191111d6de
BLAKE2b-256 f231ec4e62010a89cdb9bd64d0c68689378360eed9d7b5ff5e11dadabdb88cb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aium_cli-0.1.1.tar.gz:

Publisher: release.yml on jonykalavera/aium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aium_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aium_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aium_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 420dc29894340aa841ae5b2493c92c63f89536d0cad996021a66504894108031
MD5 247b6774a86b3d92489cf78a1feff1eb
BLAKE2b-256 e5b3c6682378b29359f01a3814419fb21992603ab147e3ccff71388812643c44

See more details on using hashes here.

Provenance

The following attestation bundles were made for aium_cli-0.1.1-py3-none-any.whl:

Publisher: release.yml on jonykalavera/aium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page