Skip to content

dvelton/devmeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devmeter

A CLI tool that reads your GitHub Copilot CLI session data and turns it into personalized analytics. It tells you how many premium requests you're burning, which models cost the most, which repos eat your budget, lines-per-request trends, and more.

All data stays on your machine. The dashboard is a self-contained HTML file with no external network requests.

What you get

In the terminal: Quick stats across time periods, session lists, model breakdowns, and per-repo analysis.

In the browser: A local HTML dashboard with charts for daily usage, weekly efficiency trends, model distribution, cache hit rates, per-repo breakdowns, and session scorecards.

Install

Requires Node.js 18+.

npm install -g github:dvelton/devmeter

Usage

Run devmeter with no arguments to see a summary of your usage:

$ devmeter

data from 2026-03-04 to 2026-04-08

Today
Sessions  Premium    Lines +/-  AI Time     Lines/Req
-----------------------------------------------------
       8      264  +218 / -134    40.3m       1.3

Last 7 days
Sessions  Premium         Lines +/-  AI Time     Lines/Req
----------------------------------------------------------
      77    2,670  +25,887 / -1,827    17.3h      10.8

All time
Sessions  Premium          Lines +/-  AI Time      Lines/Req
------------------------------------------------------------
     301    7,224  +127,541 / -9,439    63.1h       19.4

top model: claude-opus-4.6 (78% of premium spend)

Commands

Command What it does
devmeter Same as devmeter summary
devmeter summary Usage stats for today, last 7 days, last 30 days, and all time
devmeter sessions List recent sessions with premium spend, code output, and cache rates
devmeter models Model-by-model breakdown: requests, premium cost, token volumes, cache hit rates
devmeter repos Per-repository stats: sessions, premium spend, code output, efficiency
devmeter dashboard Generate and open an HTML dashboard in your browser
devmeter sync Manually re-scan your Copilot CLI session data
devmeter status Show database location, size, and sync info

Most commands auto-sync if your data is more than 5 minutes old, so you rarely need to run sync manually.

Options

devmeter sessions --limit 50    # show more sessions (default: 20)
devmeter sync --verbose         # see each session as it's imported

How it works

GitHub Copilot CLI stores session telemetry in ~/.copilot/session-state/. Each session has an events.jsonl file that records, among other things, a session.shutdown event containing:

  • Total premium requests consumed
  • API compute time
  • Lines of code added and removed
  • Per-model token usage (input, output, cache read, cache write)

devmeter parses these files, joins them with session metadata from ~/.copilot/session-store.db (for summaries, repo names, branches), and stores the results in a local SQLite database at ~/.devmeter/devmeter.db.

The dashboard is a self-contained HTML file generated from this data and opened in your default browser. No server runs. Chart.js is bundled inline so the file works offline with no external requests.

Key metrics

  • Premium requests — how many premium requests you're using per session, per day, per repo
  • Lines/req — lines of code changed per premium request. This tells you what kind of session it was: high-output sessions are scaffolding and building, low-output sessions are research, debugging, and planning. Neither is inherently better.
  • Session mix — what proportion of your sessions involved code changes (building) vs. no code changes (research). Tracked weekly so you can see how your usage patterns shift over time.
  • Cache hit rate — what percentage of input tokens were served from cache (higher is better for cost)
  • Model distribution — which models you're using and where your premium budget goes
  • Session scorecards — your most efficient sessions vs. sessions that consumed premium but produced no code changes

Uninstall

npm uninstall -g devmeter
rm -rf ~/.devmeter

License

MIT

About

personalized Copilot CLI usage dashboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors