Skip to content
budi / getbudi.dev
Docs menu

Provider

Copilot CLI

GitHub Copilot's CLI mode writes local session state files. Budi reads these for token counts and model info — no configuration needed beyond installing budi.

Live since v8.4.0

Data sources

Local JSONL session-state (primary)

Copilot CLI writes local session state files containing conversation metadata, token usage, and model information. Budi auto-discovers and tails these files as they're written.

Path: ~/.config/github-copilot/

What's parsed

  • Input and output token counts per message
  • Model name and version
  • Dollar cost (computed from token counts via budi's pricing manifest)
  • Session timestamps
  • Working directory context for repo/branch attribution

Caveats

Copilot CLI vs Copilot Chat

Copilot CLI (the terminal agent invoked with gh copilot) and Copilot Chat (the VS Code sidebar) are tracked separately by budi. Each has its own tailer and data source. See Copilot Chat for VS Code specifics.
  • Cost is estimated from token counts using budi's pricing manifest. GitHub does not expose a per-request billing API for Copilot CLI.
  • The session state format depends on the gh CLI version — keep your GitHub CLI up to date for best compatibility.

How to verify

After installing budi, run a Copilot CLI session with gh copilot. Then:

budi doctor

Look for the Copilot CLI tailer in the output:

✓ Daemon running (pid 12345, port 7878)
✓ Copilot CLI tailer: active
  Path: ~/.config/github-copilot/
  Last event: 3s ago
✓ All checks passed.

To see Copilot CLI spend:

budi stats projects --filter copilot-cli