Get Started
copilot-usage

Track every
Copilot token

A thin wrapper around the native GitHub Copilot CLI.
Run it like normal. Get full usage capture for free.

Terminal
bunx @f6n/copilot-usage
───────────────────────────
Hook installed
Launching native copilot...
 
Session active — tokens tracked
 
bunx @f6n/copilot-usage -p "explain this"
───────────────────────────
Summary captured → usage-summaries.jsonl

Runs Copilot.
Captures every session.

bunx @f6n/copilot-usage wraps the native Copilot CLI — your flags and interactive behavior pass through untouched while token usage is silently captured to local JSONL files. Then run bunx @f6n/cli-usage to analyze your Codex + Copilot usage in one table.

  1. Installs a repo hook at .github/hooks/f6n-copilot-usage.json
  2. Launches native copilot with full interactive behavior
  3. Captures token usage summaries on session end
  4. Run bunx @f6n/cli-usage to analyze captured data

Get started in seconds

No build step required. Run directly with bunx or install globally.

Recommended

Run with bunx

No install needed. Just run it whenever you want Copilot usage tracked.

bunx @f6n/copilot-usage
Global

Install globally

Install once, then just use copilot-usage as a command.

npm install -g @f6n/copilot-usage
copilot-usage

Know exactly what
Copilot costs you

Every session. Every model. Every token. Finally have visibility into your AI coding spend.

🔄

Zero-config wrapping

No config files, no setup steps. Just replace copilot with bunx @f6n/copilot-usage and you're tracking.

📊

Automatic capture

In non-interactive mode (-p/--prompt), the wrapper captures usage summaries and stores them in JSONL format.

🔀

Full flag passthrough

Every non---f6n flag passes straight through to native copilot. Your workflow doesn't change.

🪝

Session-end hooks

Automatically hooks into Copilot's session lifecycle to capture data at the right moment, with full debug logging.

🐛

Debug trace log

Every hook invocation appends to hook-debug.jsonl with stage markers so you can trace exactly where capture might fail.

📈

Pairs with cli-usage

Run bunx @f6n/cli-usage to see your captured data in beautiful terminal tables grouped by day, model, and session.

Stop guessing your usage

One command. Full visibility into every Copilot session. No API keys, no dashboards, no friction.