Skip to main content
Headroom logo

Headroom

Every AI plan you pay for, on one screen.

Self-hosted dashboard for Claude, Codex, Cursor, Copilot, Grok, Antigravity and Vercel AI Gateway.
Live limits, resets, credits and spend for every account, with credentials encrypted on your own server.

CI License: MIT Self-hosted Bun TypeScript React SQLite Docker PRs welcome Sponsor

Live demo · Quick start · Screenshots · Providers · How it works · Docs

Headroom tour: one panel per account, accounts sorted by how close they are to their limit, the account to use next, reset times on a timeline, and spend in one currency

All screenshots use Demo Mode: synthetic accounts on reserved example domains.

Why Headroom

You pay for several AI plans, often more than one account each. Each one shows its limits somewhere else, in a different unit, with a different reset. You find out an account is spent when a request fails halfway through a task.

Headroom signs in to each account once, refreshes them in the background, and shows everything on one page: what is left, when it resets, which account to use next, and what it all costs.

Why there is no cloud version

Headroom holds the sign-in tokens for every AI account you connect. A hosted copy would put everyone's tokens on one server that someone else runs, which defeats the purpose. Run it on a server you control, and your tokens stay there. There is no hosted Headroom, and none is planned.

Features

  • Every limit in one place. 5-hour sessions, weekly pools, per-model limits, credit balances, banked resets and on-demand spend, side by side.
  • Know which account to use next. Compare ranks accounts of a provider by the room they have left and names the one to use.
  • See resets coming. Timeline lays every window on a calendar, so you know when headroom comes back.
  • See how you use your limits. Analytics shows when you work, when you run out, and whether each plan fits, from the readings Headroom stores.
  • Track what you pay. Wallet totals subscriptions, usage spend and top-ups in one currency, with upcoming renewals.
  • Get warned in time. In-app notices, Telegram and signed webhooks for limits running low or on pace to run out before they reset, new and expiring resets, early resets, your own spend budgets and broken sign-ins.
  • Automations you switch on. Use a banked Codex reset when a limit runs out, and record credit top-ups in the Wallet as soon as a balance rises.
  • Many accounts per provider. Personal, work and side-project accounts stay separate, each with its own credentials.
  • Private by design. One owner, passkeys, encrypted credentials, and a Privacy Mode that blurs emails on screen.
  • Works on your phone. Every view is built for small screens.

Screenshots

Overview Compare
Overview: one panel per account with its limits, credits and resets Compare: accounts of one provider ranked by room left, with a recommendation
Timeline Wallet
Timeline: limit windows on a two-week calendar Wallet: monthly spend by provider, top-ups and renewals
Analytics Detailed
Analytics: when each account is busy, hour by hour, and which plans fit Detailed: every account in one list, closest to its limit first
Connect Light theme
Connect: pick a provider and manage connected accounts Overview in the light theme

Detailed view on a phone    Wallet on a phone

Supported providers

Provider Sign-in What you see Interface
Claude Claude Code sign-in, or import .credentials.json Session and weekly limits, per-model limits, extra-usage spend, reset grants Private
Codex Codex CLI device sign-in, or import auth.json 5-hour and weekly limits, credits, banked reset credits Private
Cursor Browser approval Included usage, Auto and API pools, Grok Bot, on-demand spend Private
Copilot GitHub device code, or import a gh token AI credits, credits used, extra usage, chat and completions Private
Grok Grok CLI device sign-in, or import auth.json Weekly pool, chat and code share, on-demand cap, prepaid balance Private
Antigravity Google sign-in, then paste the redirect Gemini and Claude/GPT quota pools Private
Vercel AI Gateway API key Credit balance, credits used, spend Official
  • Private: the endpoint the provider's own app or CLI calls. It can change without notice.
  • Official: a published API.
  • Enable providers with HEADROOM_ENABLED_PROVIDERS. The default is all seven.
  • Evidence: the provider dossiers record what is validated.

How it works

flowchart LR
  you([You]) -->|browser or phone| web[Web app]
  web -->|session-checked API| server[Headroom server]
  server --> db[(SQLite<br/>credentials sealed<br/>with AES-256-GCM)]
  server --> sched[Scheduler]
  sched --> conn[Connectors]
  conn -->|direct HTTPS| prov[Provider APIs]
  cli[Official CLI] -.->|once, at sign-in| server
  server -->|alerts| out[Telegram / webhooks]
  • Sign in once. Where a provider needs it, its official CLI runs one time on the server to sign in. Headroom seals the result with a master key kept outside the database.
  • Refresh in the background. The scheduler collects each account over direct HTTPS on your interval, refreshes tokens before they expire, and keeps 90 days of history by default.
  • Read only by default. Monitoring never sends a model request, redeems a reset or buys credits. Using a banked Codex reset needs "Allow Account Actions" and either a press-and-hold or an auto-reset rule you set.
  • Unknown is not zero. A figure a provider does not report shows as unknown, never as 0.

Quick start

Every way to install, update and remove Headroom is in Install.

Installer

curl -fsSL https://headroom.theblank.club/install | sh
headroom --open              # serve on 127.0.0.1 and open the dashboard
headroom service install     # start at login

The script checks the download against the release checksums and puts headroom in ~/.local/bin. Run it again, or run headroom update, to upgrade. It supports macOS and Linux on arm64 and x64.

Homebrew

brew tap amitray007/headroom https://github.com/amitray007/headroom
brew install amitray007/headroom/headroom
brew services start headroom

Package runners

npx headroomhq      # or bunx headroomhq, uvx headroomhq, pipx run headroomhq

Docker

docker run -d --name headroom -p 8080:8080 \
  -v headroom-data:/var/lib/headroom/data -v headroom-secrets:/etc/headroom \
  ghcr.io/amitray007/headroom:latest

Open http://localhost:8080 and create the owner account. Back up both volumes together: without the key, every account must be reconnected. A compose file is deploy/compose.simple.yaml. To reach Headroom from other devices, put an HTTPS reverse proxy in front and set HEADROOM_PUBLIC_URL to its address. Image tags are in Releases.

Docker on a Tailscale tailnet

Headroom publishes no port. A Tailscale container serves it over HTTPS to your own devices only.

git clone https://github.com/amitray007/headroom.git && cd headroom/deploy
cp .env.example .env   # set TS_AUTHKEY and HEADROOM_PUBLIC_URL
docker compose up -d --build

Open https://<TS_HOSTNAME>.<tailnet>.ts.net and create the owner account. The full guide, including Dokploy and moving an existing instance, is in Self-hosting on a tailnet.

From source

Requires mise, which installs the pinned Bun.

mise install && mise run install
mise run start         # builds the web app and the binary, then serves on :4323

Open http://localhost:4323. In the checkout, mise sets data to .data/ and the two secret files to .state/. Back up .state/headroom.key with .data/headroom.db: without the key every account must be reconnected.

The binary

The binary keeps per-user state: on macOS under ~/Library/Application Support/Headroom/, on Linux data in ${XDG_DATA_HOME:-~/.local/share}/headroom/ and the key and secret in ${XDG_CONFIG_HOME:-~/.config}/headroom/. Codex, Claude and Grok sign in through their official CLI: install it on the same machine, or use Import. See Install.

headroom --open          # serve on 127.0.0.1 (port 4323 or the next free one) and open the dashboard
headroom --help          # commands, flags and the resolved file locations
headroom paths           # print the data, key and secret locations
headroom update          # install the newest release (--check only reports)
headroom service install # run at login (launchd on macOS, a systemd user unit on Linux)
headroom service status  # installed and running?
headroom service uninstall

service install must run from the compiled binary, not bun. On a headless Linux server also run loginctl enable-linger $USER. Back up the key with the database.

Configuration

Variable Default Purpose
HEADROOM_PUBLIC_URL none The address you open Headroom at. Required behind a proxy; passkeys and cookies use it
HEADROOM_ENABLED_PROVIDERS all seven Comma list: codex, claude, grok, antigravity, copilot, cursor, vercel_ai_gateway
HEADROOM_HOST 127.0.0.1 Listen address. The container image sets 0.0.0.0
HEADROOM_PORT 4323, or the next free port up to 4342 HTTP port. Set, it is exact and Headroom fails if the port is busy (--port overrides). Unset, the binary keeps the port it used last; an install that already has data keeps 8080. The container image sets 8080
HEADROOM_DATA_DIR macOS ~/Library/Application Support/Headroom/data, Linux ~/.local/share/headroom/data Where the database lives
HEADROOM_MASTER_KEY_FILE next to the data on macOS, ~/.config/headroom/headroom.key on Linux The key that seals credentials. Keep it out of the data folder
HEADROOM_AUTH_SECRET_FILE same folder as the key, headroom.auth-secret Session signing secret
HEADROOM_CODEX_BIN, HEADROOM_CLAUDE_BIN, HEADROOM_GROK_BIN resolved on PATH Absolute path of a sign-in CLI. Sign-in runs it with a private HOME, so a version-manager shim that finds the CLI through HOME fails; point this at the real binary

Every variable is listed in Deployment and credential storage.

Connect an AI agent

Headroom has a read-only MCP server, so an agent such as Claude Code, Codex or Cursor can ask about your allowances. Open Settings, then Agents, pick your client, press Create Token and copy the setup. The token is shown once. Revoke it under Connected Agents on the same tab. See MCP.

Security

  • Credentials are sealed per account with AES-256-GCM. The master key never enters the database.
  • One owner account, with username and password or passkeys. Sign-up closes after the first account.
  • Provider requests time out, and a redirect to another host never carries your tokens.
  • Provider errors are mapped to fixed messages, so raw responses never reach logs or the browser.
  • Demo Mode swaps in synthetic data for screenshots, and Privacy Mode blurs identities on screen.

Report a vulnerability privately as described in SECURITY.md.

Usage stats

Headroom sends anonymous usage stats so the maintainer knows how many installs run, which connectors people use and which ones fail. The server sends them, never your browser or the Mac app. Each event carries a random install ID and:

  • once a day: the Headroom version, OS and install method; how many accounts you linked per provider; how many sign-ins and refreshes finished per provider and result; which features you use (counts and on/off only); how account actions and notification sends turned out; error class names and counts; the plan tier of each account (such as Pro) and your display settings; the newest release it has seen; and the Mac app versions that read the feed
  • at most once an hour, only if you opened Headroom: the version, where you opened it (web, Mac app or MCP), which dashboard pages, whether you opened the release notes from the update notice, and which MCP tools agents called

When something fails, it sends the error type and where in Headroom's code it happened, never the error message. It never sends account emails or IDs, credentials, balances, limits, usage figures, error text or host names, and the IP address is discarded. Turn it off with Share Usage Stats on the Privacy tab of Settings, or set HEADROOM_TELEMETRY=false. ADR 0007 lists every field.

Send Feedback, in Settings and the avatar menu, sends your message and the version to the maintainer. It asks for no email.

The installer sends one anonymous count with your OS, CPU and the version you asked for; set HEADROOM_TELEMETRY=false before running it to skip that.

Development

mise run dev                  # API server with reload on :4323
mise exec -- bun run web:dev   # Vite on :5173, proxying /api to :4323
mise run check                # docs, format, lint, typecheck, knip and tests
apps/server            Hono API, scheduler, notifications
apps/web               React 19 app
packages/core          Enumerations, stores, crypto, connector contract
packages/view-model    Presenters shared by every view, Demo Mode data
packages/connectors/*  One direct-HTTP client per provider
docs/                  Product, architecture, provider research, decisions

Start with CONTRIBUTING.md and the documentation index.

Support

Headroom is free, and there is no paid cloud version. If it saves you a surprise limit, you can sponsor its development. Sponsorship pays for connector fixes when a provider changes its API, new providers, releases and documentation.

License

MIT. Headroom also contains work from other projects under their own licenses: see Third-party notices and LICENSES/. See also the Disclaimer.

Metadata

Release files for headroomhq 0.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for headroomhq 0.1.19
File Actions
headroomhq-0.1.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for headroomhq-0.1.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
headroomhq-0.1.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for headroomhq-0.1.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
headroomhq-0.1.19-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for headroomhq-0.1.19-py3-none-macosx_11_0_arm64.whl
headroomhq-0.1.19-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for headroomhq-0.1.19-py3-none-macosx_10_15_x86_64.whl

Total release size: 142.2 MB

Release files / headroomhq-0.1.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL headroomhq-0.1.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 40.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c6b4e384823c8df2f8c0669c932ebe42bf4eb2978880613dd35a82898a09c36f
BLAKE2b-256 checksum
How to use checksums
404ccd8843cd0e11e952fc2777e2bf132abf7b8698a8ba130ab7e1c0c793d3ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / headroomhq-0.1.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL headroomhq-0.1.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 40.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b962e03ef31ea5b28a322131bcc8cbf0cacb5882f0a21415fdebfdac9b905348
BLAKE2b-256 checksum
How to use checksums
32a6d79d654ef02bf19cbd4d004419fc676c89c4b0b5389409af116e904bd9a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / headroomhq-0.1.19-py3-none-macosx_11_0_arm64.whl

Download URL headroomhq-0.1.19-py3-none-macosx_11_0_arm64.whl
Size 29.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
600caf4e7619ea39bed77475e9e8d9a172c7be276cacd344804dd90677587ef3
BLAKE2b-256 checksum
How to use checksums
b3582b53b6058531235b8f8631668eaa0ec3d002fd06d5ee6721af7207e47a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / headroomhq-0.1.19-py3-none-macosx_10_15_x86_64.whl

Download URL headroomhq-0.1.19-py3-none-macosx_10_15_x86_64.whl
Size 32.2 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
27f254c8823879a4f8bd207212517fa5214c0d5f3ca45637f604f5a88674c528
BLAKE2b-256 checksum
How to use checksums
6f50f0231c097185dd50da8b6e8fc4b103244b1f426653ccfb82d4a654127ff2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for headroomhq 0.1.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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