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

Drop-in replacement for copilot

Use bunx @f6n/copilot-usage exactly like you'd use copilot. All your flags pass through untouched.

  1. Ensures a repo hook at .github/hooks/f6n-copilot-usage.json
  2. Launches native copilot with full interactive behavior
  3. Captures usage summaries on session end

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.

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

Wrapper-specific flags

Flag Description
--f6n-store-session Internal hook mode that captures the latest Copilot session
--f6n-show-usage Print stored usage from this package's local state
--f6n-state-home <path> Override wrapper state directory
--f6n-copilot-home <path> Override Copilot state directory

Stop guessing your usage

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