Skip to content

binbalenci/aicap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aicap

Track your AI subscription usage across GitHub Copilot and Claude — directly in the terminal.

demo

Requirements

  • Node.js 20+
  • macOS (Claude usage tracking reads from the macOS Keychain)
  • A GitHub Personal Access Token for Copilot tracking
  • Claude Code CLI logged in for Claude tracking

Install

npm install -g @binbalenci/aicap

Quick Start

aicap config   # set up your subscriptions
aicap          # show usage

Commands

Command Description
aicap Show usage for all configured sources
aicap config Interactive setup
aicap --json Machine-readable JSON output
aicap -v Show version
aicap --help Show help

GitHub Setup

You need a GitHub fine-grained Personal Access Token with Copilot (Read) permission.

  1. Go to github.com/settings/tokensGenerate new token (Fine-grained tokens)
  2. Under Account permissions, set Copilot to Read
  3. Copy the token and paste it when running aicap config

Claude Setup

Claude usage tracking uses the token stored by the Claude Code CLI. Make sure you're logged in before running aicap config:

claude login

Once logged in, aicap will find the token automatically — no manual steps needed.

Claude usage tracking is experimental and macOS only.

Config

Configuration is stored at ~/.config/aicap/config.json. Run aicap config at any time to update your settings.

Privacy & Data

  • Nothing leaves your machine except the API calls to GitHub and Anthropic made directly from your terminal with your own credentials.
  • Your GitHub token and settings are stored locally at ~/.config/aicap/config.json, readable only by your user account.
  • No analytics, no telemetry, no third-party services.

Roadmap

  • More sources — Cursor, Windsurf, and other AI tools as their usage APIs become available
  • iTerm2 status bar — always-visible usage indicator in your terminal window
  • Starship module — show usage inline in your shell prompt
  • Watch mode — live-refreshing display without re-running the command

License

MIT

About

CLI tool to monitor GitHub Copilot and Claude usage at a glance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors