Skip to content

Repository files navigation

quota-tracker

Track token usage and quotas for Claude, Copilot, Codex and Gemini — locally, with no telemetry.

Zero configuration required. Quota Tracker automatically leverages your existing local CLI credentials to fetch real-time quotas. It parses and backfills your conversation history into a local database, ensuring your usage data is persisted and searchable even after a local environment cleanup.

CI latest coverage ruff mypy tests python

Quick start (Linux)

curl -fsSL https://raw.githubusercontent.com/Thomas97460/quota-tracker/main/install.sh | bash

Installs the binary, runs migrations, backfills history and starts a systemd user service. Open the printed URL when done.

quota-tracker overview

NixOS

Warning

If you previously installed via the curl method above, run the uninstall script first to avoid systemd service conflicts.

Add to your configuration.nix:

{ config, pkgs, ... }:
let
  # ...your other let bindings...
  quotaTrackerFlake = builtins.getFlake "github:Thomas97460/quota-tracker/v0.1.35"; # ← update tag to upgrade
  quotaTrackerPackage = quotaTrackerFlake.packages.${pkgs.system}.default;
in {
  imports = [
    # ...your other imports...
    quotaTrackerFlake.nixosModules.default
  ];

  # ...rest of your configuration...

  services.quota-tracker = {
    enable  = true;
    package = quotaTrackerPackage;
    host    = "127.0.0.1";
    port    = 8787;
  };
}

Then apply with sudo nixos-rebuild switch. To upgrade, change the version tag and rebuild.

Uninstall

curl -fsSL https://raw.githubusercontent.com/Thomas97460/quota-tracker/main/uninstall.sh | bash

The uninstall helper asks before removing the systemd user service, then asks separately before deleting app files. It has a separate database prompt so you can uninstall quota-tracker while keeping the local SQLite history.

About

High-precision quota and token monitoring for AI Agents. Real-time analytics and usage tracking for Claude, Codex, Gemini, and Copilot to prevent API exhaustion and optimize LLM budgets.

Topics

Resources

Contributing

Security policy

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages