Lightweight GitHub Copilot usage dashboard for teams. It reads raw metrics exposed via new Github REST API endpoints for Copilot usage metrics, aggregates them per user, and serves a browser-based leaderboard-style dashboard with filters and trend hints.
Detailed documentation on every metrics
The dashboard tracks activity across three Copilot interfaces:
- IDE plugin — chat asks, code completions, agent/coding-agent runs; favorite IDE with version, language, model
- CLI — GitHub Copilot CLI request counts, active days via CLI, and last known CLI version (shown in user detail popup)
- Feature breakdown — per-feature LOC or interaction counts including
chat_panel_edit_mode,chat_panel_plan_mode, and related modes
⚠️ Disclaimer: this is a fully vibe-coded project that did not go through comprehensive code review or testing. Results may be inaccurate, and bugs are possible.
- Github Copilot built-in dashboards are still in Public Preview, they are yet rudimentary and require special access rights difficult to obtain in large enterprises.
- Existing external dashboards (by Github, by Microsoft) were not promptly updated for new REST API compartibility and likely stop working on April 2, 2026 when Github sunsets its legacy Github Metrics API.
Dashbord aims at AI/Agile Coaches, Teams leaders, Engineering managers, Project- and Delivery managers, Procurement associates and helps themto quickly answer questions like:
- Who is actively using Copilot and who is not?
- Which models/IDEs/languages are most used?
- How usage differs across teams and time?
This repository is provided with mocked data stored under mock\*.jsonfor demonstration and development.
- Runtime: Node.js (CommonJS)
- Backend: built-in
http,fs,httpsmodules (no framework) - Frontend: vanilla HTML/CSS/JavaScript
- Data source: GitHub REST API
- Storage: local JSON/NDJSON files (
data/*.json)
Project was intentionally built simple and file-based, so you can run it locally without infrastructure or implement your own data persistancy layer.
server.js— starts the web server and serves API + static UIupdate-data.js— fetches new Copilot metrics, stores the, underdata/raw/*.jsonand appends them todata/data.jsoningest-data.js— imports user-provided NDJSON files fromdata/raw/inbox/intodata/data.jsonwithout calling the GitHub APIdebug.js— downloads hisotrical data todata/debug/*.jsonand compares it with localdata/data.jsondata/config.json— stores Github Organization name and Last synchronized daydata/users.json— UserId mapping to Display name, Team, Role, Revoked status (all optional)data/data.json— all your data used to build a dashboarddata/raw/inbox/— drop your own NDJSON files here for ingestdata/raw/processed/— files are moved here automatically after successful ingestpublic/— dashboard UI assetsdocs/– documentation and screnshots
- Node.js 18+
npm installCopy .env.example to .env:
cp .env.example .envBy default, .env.example contains USE_MOCK_DATA=true, so the app loads config/data/users from mock/*.json for local demo/development.
npm run devOpen http://localhost:3000 - you should see mocked data loaded.
- All Github Copilot users you want to monitor belong to the same Enterprise and same Organization within this Enterprise
- You creted a GitHub personal access token (classic) with
read:org,manage_billing:copilotorread:enterprisescopes. - Copilot usage metrics policy must be enabled for the organization.
-
Add
GITHUB_TOKENto.env(use.env.exampleas a template). -
Set
USE_MOCK_DATA=falsein.envbefore productive use, so data is loaded from/datainstead of/mock. -
Copy
mock\config.jsontodata\config.json -
Edit
data\config.json:org: GitHub organization namelast_report_day: set inital day for incremental updates; note that Github Copilot Metrics API provides data only for last 28 days, so setting ot to earlier date won't bring you any data.
-
(optionally) Edit
data\users.jsonto map Github usernames to human readable names, assign roles, indicate revoked licenses, and group users into teams. All fields are optional.Each entry looks like:
"github-login": { "name": "Display Name", "team": "Team Name", "role": "Senior Developer", "revoked": false }
⚠️ Keys inusers.jsonmust always be lowercase (e.g."github-login", not"GitHub-Login"). The app lowercasesuser_loginvalues from the NDJSON at load time, so a mixed-case key will never match.
npm run updateThis runs update-data.js, which:
- fetches daily reports from
last_report_day + 1to yesterday, - saves raw files to
data/raw/, - appends lines to
data/data.json, - updates
data/config.jsonwith the latest successful day.
flowchart LR
A[GitHub Copilot Metrics API] --> B[update-data.js\nnpm run update]
B --> C[data/raw/*.json\nraw daily snapshots]
B --> D[data/data.json\nappended NDJSON history]
B --> E[data/config.json\nlast_report_day advanced]
J[User-provided NDJSON\nvia email / SFTP / etc.] --> K[data/raw/inbox/]
K --> L[ingest-data.js\nnpm run ingest]
L --> D
L --> M[data/raw/processed/\narchived after ingest]
F[data/users.json\nuser/team mapping] --> G[server.js]
D --> G[server.js]
E --> G
H[public/* UI] --> G
G --> I[Dashboard in browser]
This integration is not real-time. GitHub Copilot metrics are published as daily NDJSON-style reports, and new files typically appear in the API earliest on the next business day. In practice, reporting delays of 24 hours or more are normal.
npm startOpens http://localhost:3000 - you should see real data loaded.
In many enterprise environments developers do not have direct access to the GitHub API — metrics files are instead delivered by a central team via email, SFTP, shared drive, or a similar intermediary channel. The npm run ingest command covers this use-case.
Files must be in the same NDJSON format produced by the GitHub Copilot Metrics API (one JSON object per line, each with at least user_id and day fields).
Create the inbox folder before first use (the script also creates it automatically on first run):
mkdir -p data/raw/inbox
mkdir -p data/raw/processed- Place one or more NDJSON files into
data/raw/inbox/. - Run the ingest command:
npm run ingestThe script will:
- Parse every
*.jsonfile found indata/raw/inbox/ - Skip any record whose
user_id:daykey already exists indata.json(no duplicates) - Append genuinely new records to
data/data.json - Move each processed file to
data/raw/processed/so it is not ingested again
- Start (or restart) the dashboard:
npm startOr as a single command sequence:
npm run ingest && npm startYou can drop multiple files at once — all are processed in a single run. If a filename collision occurs in processed/, a counter suffix is added automatically.
npm start— run the dashboard server (node server.js)npm run dev— same as start (no watcher currently)npm run update— fetch and append new Copilot metrics from the GitHub APInpm run ingest— import user-provided NDJSON files fromdata/raw/inbox/intodata/data.json
debug.js is an all-in-one debug and analysis utility. Run it without arguments to see all available commands.
User-level verification — re-downloads raw data from the API and compares it against data.json:
node debug.js YYYY-MM-DD— re-download one day and comparenode debug.js latest— re-download last 28 days and compare
Org-level metrics — fetches and analyses org-wide aggregated data (active-user counts, breakdowns by IDE/feature/model):
node debug.js org fetch— download latest 28-day org metricsnode debug.js org discover— compare key vocabulary (IDEs, models, features) vsdata.jsonnode debug.js org compare YYYY-MM-DD— check day totals discrepancy: user aggregate vs org
All downloads are saved to data/debug/.
- No database (file-based storage only)
- No auth/access control (deploy locally or in secure environment)
- Update process is not automatic:
- You must run
npm run updatemanually, or - schedule it externally (cron, CI job, task scheduler)
- You must run
- Limited validation and error handling
- No tests
- Metrics interpretation is generic and may not match your KPIs
Contributions are welcomed to address the issues and bring more features.
Licensed under the MIT License.
