NOTE: For information on support and assistance, click here.
ℹ️ v3.0 — New Copilot Usage Metrics API
As of v3.0, Copilot Metrics Viewer uses the Copilot Usage Metrics API. The legacy Copilot Metrics API was shut down on April 2, 2026 and is no longer available.
What's new in v3.0:
- Uses the async Copilot Usage Metrics API for all data
- Historical mode with PostgreSQL for data beyond the 28-day rolling window
- Per-user metrics tab with individual usage breakdowns
- Team metrics derived from per-user data — no longer requires the deprecated team-level API endpoints
- Sync service for automated daily data collection
Your GitHub App needs "Organization Copilot metrics: Read" permission. See GitHub App Registration for setup details.
This application displays a set of charts with various metrics related to GitHub Copilot for your GitHub Organization or Enterprise Account. These visualizations are designed to provide clear representations of the data, making it easy to understand and analyze the impact and adoption of GitHub Copilot.
The application supports two operating modes:
| Mode | Description | Requirements | Team Metrics | Data Retention |
|---|---|---|---|---|
| Direct API | Fetches metrics directly from GitHub's API on each page load | GitHub token only | ❌ Not available | Rolling 28 days |
| Historical Mode | Reads from a local PostgreSQL database, synced daily | PostgreSQL + Sync service | ✅ Full history | Unlimited |
Direct API mode is the simplest setup — no database required. It returns the latest 28-day rolling window of data from the Copilot Usage Metrics API. Team-scoped views are not available in this mode because team metrics are derived from per-user records stored in the database.
Historical mode adds a PostgreSQL database and a sync service that downloads metrics daily. This enables:
- Viewing metrics beyond the 28-day API window
- Per-user time-series history with trend charts
- Team metrics — derived from stored per-user data filtered by team membership
See DEPLOYMENT.md for setup instructions for each mode.
The GitHub Copilot Metrics Viewer provides comprehensive analytics through an intuitive dashboard interface:
Users can now filter metrics for custom date ranges up to 100 days, with an intuitive calendar picker interface. The system also supports excluding weekends and holidays from calculations.
Select one team for a full deep-dive view with KPI tiles, time-series charts (acceptance rate, active users, feature usage, model usage), language and editor breakdowns, and a per-user activity table. Select two or more teams to compare them side by side.
Note
GitHub's Copilot Usage Metrics API does not provide team-level endpoints. Team metrics are derived by fetching per-user daily metrics from the organization/enterprise endpoint, resolving team membership via the GitHub Teams API, and aggregating per-user data in-memory. This works in both Direct API mode (28-day window) and Historical mode (full history).
Single team deep dive:
Multi-team comparison:
You can link directly to a fully team-scoped dashboard — every tab (IDE metrics, chat, agents, languages, etc.) will automatically filter to that team's members only. A blue banner at the top of the page confirms the active scope and provides a quick link back to the organization view.
https://<your-host>/orgs/<org>/teams/<team>
https://<your-host>/enterprises/<enterprise>/teams/<team>
Examples:
http://localhost:3000/orgs/octo-demo-org/teams/the-a-teamhttp://localhost:3000/enterprises/octo-demo-ent/teams/the-a-teamhttp://localhost:3000/orgs/mocked-org/teams/the-a-team?mock=true(mock data)
View individual user-level Copilot usage metrics including code completions, chat interactions, and code review activity. Summary tiles show total users, active users, and average acceptance rate.
In Historical mode (with PostgreSQL), the User Metrics tab also displays per-user time-series history charts, allowing you to track individual adoption trends over time.
The per-user table includes an AI Credits column showing each user's premium-request spend (sourced from the ai_credits_used field that GitHub added to the users-28-day Copilot metrics report on 2026-06-19). The column shows — when GitHub hasn't reported credits for the period (e.g., older mock data or enterprises that haven't enabled premium-request billing).
Personal dashboard for the currently-authenticated user. Shows your own active days, interactions, accepted lines, AI credits used, top IDE, and top model — filtered server-side by session.user.login so you can never see another user's data from this tab.
Visible to every authenticated user when any auth provider is configured (NUXT_PUBLIC_AUTH_PROVIDERS). Hidden when the app is running in PAT-only / no-auth mode, because there is no session user to filter by.
Aggregate AI credit billing breakdown by model, SKU, cost center, and repository — pulled from the GitHub Billing API (/organizations/{org}/settings/billing/ai_credit/usage and /enterprises/{ent}/settings/billing/ai_credit/usage). Also includes a per-user breakdown table that joins the org's user list with each user's billing spend (lazy-loaded one page at a time), with "Top spenders by net cost" and "Top CLI token users" charts.
Visibility:
- When
NUXT_GITHUB_BILLING_TOKENis not configured — the tab is shown to every dashboard user, but renders only a configuration-help placeholder (no data is fetched). This is a discoverability aid so operators learn the feature exists. - When
NUXT_GITHUB_BILLING_TOKENis configured — the tab is admin-only: visible only to users on theNUXT_USAGE_ADMINSallowlist. In PAT-mode deployments (no OAuth provider configured) the allowlist is bypassed and the tab is visible to anyone who can reach the dashboard.
Why a separate token? Billing endpoints have stricter auth than metrics endpoints — they require a classic PAT with manage_billing:enterprise (or manage_billing:copilot), SSO-authorized for the target enterprise. Fine-grained PATs and GitHub Apps cannot read billing today. Keeping NUXT_GITHUB_BILLING_TOKEN separate from NUXT_GITHUB_TOKEN means your metrics calls can keep using a GitHub App / fine-grained PAT while only billing uses the classic PAT.
Enterprise-owned orgs: when a dashboard's org is consolidated under an enterprise (very common), /organizations/{org}/settings/billing/ai_credit/usage returns 404. Set NUXT_BILLING_ENTERPRISE=<enterprise-slug> to route billing calls to /enterprises/{slug}/... regardless of the dashboard's scope. Without this override an org-scoped dashboard will see a 404 with a hint pointing at the variable.
Per-user attribution caveat: the per-user breakdown depends on GitHub tagging each billing item with a user. Some enterprise plans (typically fully-pooled / centrally-billed) return only enterprise-level aggregates, in which case every user appears at $0 in the per-user table; the Billing tab surfaces an explanatory alert in that state. The My Usage tab and the User Metrics ai_credits_used column are independent of this and still work.
Personal Copilot activity for the signed-in user only — server-side filtered against the session. Surfaces:
ai_credits_usedtotals + per-day chart (when a date range is selected)- Your AI credit spend — total $, credits billed, per-model breakdown (requires
NUXT_GITHUB_BILLING_TOKEN; the call always sends?user=<session-login>and is never user-controllable) - GitHub CLI usage card (sessions, requests, prompt/output token sums, CLI version) when the user has CLI activity
- AI adoption-phase chip and top-IDE/plugin versions
View model usage analytics including model adoption over time, chat model distribution, and usage per chat mode (Ask, Agent, Edit, Inline).
Export your metrics data in multiple formats for further analysis or reporting. Options include summary reports, full detailed exports, and direct clipboard copying.
Note
Metrics details are described in detail in the Copilot Usage Metrics API documentation
Here are the key metrics visualized in these charts:
- Active Users Over Time: Tracks daily, weekly, and monthly active users across all Copilot features — IDE completions, chat, agent mode, CLI, and PR summaries.
- Feature Usage Over Time: Shows user-initiated interactions per feature per day, covering IDE chat, agent mode, edit mode, inline chat, CLI, PR summaries, and more.
-
Code Completions: Tracks total inline code suggestions shown and accepted over time.
-
Total Lines Suggested: Showcases the total number of lines of code suggested by GitHub Copilot. This gives an idea of the volume of code generation and assistance provided.
-
Total Lines Accepted: As the name suggests, the total lines of code accepted by users (full acceptances) offering insights into how much of the suggested code is actually being utilized and incorporated into the codebase.
- Total Active Users: Represents the number of active users engaging with GitHub Copilot. This helps in understanding the user base growth and adoption rate.
Pie charts with the top 5 languages by accepted prompts and acceptance rate (by count/by lines) are displayed at the top.
The language breakdown analysis tab also displays a table showing the Accepted Prompts, Accepted Lines of Code, and Acceptance Rate (%) for each language over the selected time period. The entries are sorted by the number of accepted lines of code descending.
-
Cumulative Number of Turns: This metric represents the total number of turns (interactions) with the Copilot over the selected time period. A 'turn' includes both user inputs and Copilot's responses.
-
Cumulative Number of Acceptances: This metric shows the total number of lines of code suggested by Copilot that have been accepted by users over the selected time period.
-
Total Turns | Total Acceptances Count: This is a chart that displays the total number of turns and acceptances.
-
Total Active Copilot Chat Users: A bar chart that illustrates the total number of users who have actively interacted with Copilot over the selected time period.
-
Total Assigned: This metric represents the total number of Copilot seats assigned within the current organization/enterprise.
-
Assigned But Never Used: This metric shows seats that were assigned but never used within the current organization/enterprise. The assigned timestamp is also displayed in the chart.
-
No Activity in the Last 7 Days: Never used seats or seats used, but with no activity in the past 7 days.
-
No Activity in the Last 7 Days (including never used seats): A table to display seats that have had no activity in the past 7 days, ordered by the date of last activity. Seats that were used earlier are displayed at the top.
The application supports flexible date range selection allowing users to analyze metrics for any period up to 100 days. The date picker provides an intuitive calendar interface with options to exclude weekends and holidays from the analysis.
Multiple export options are available in the API Response tab:
- Download CSV (Summary): Exports key metrics in a condensed format
- Download CSV (Full): Exports comprehensive detailed data
- Copy Metrics to Clipboard: Quick copy functionality for immediate use
- Check Metric Data Quality: Validates data integrity and completeness
Organizations can compare metrics across different teams to:
- Identify high-performing teams
- Understand adoption patterns
- Share best practices across teams
- Monitor team-specific engagement levels
Note
Team metrics are derived from per-user data by resolving GitHub team membership and aggregating. The GitHub Copilot Usage Metrics API does not have dedicated team endpoints — this application computes team views automatically. In Direct API mode, team data covers the latest 28-day window. In Historical mode (with PostgreSQL), full historical team trends are available.
Detailed insights into AI model usage including:
- IDE Code Completions by editor and model type
- IDE Chat interactions and model preferences
- GitHub.com Chat usage patterns
- PR Summary generation statistics
- Custom vs. default model adoption rates
In the .env file, you can configure several environment variables that control the behavior of the application.
Public variables:
NUXT_PUBLIC_IS_DATA_MOCKEDNUXT_PUBLIC_SCOPENUXT_PUBLIC_GITHUB_ENTNUXT_PUBLIC_GITHUB_ORGNUXT_PUBLIC_HIDDEN_TABSNUXT_PUBLIC_ENABLE_HISTORICAL_MODE
can be overridden by route parameters, e.g.
http://localhost:3000/enterprises/octo-demo-enthttp://localhost:3000/orgs/octo-demo-orghttp://localhost:3000/orgs/octo-demo-org/teams/the-a-teamhttp://localhost:3000/enterprises/octo-demo-ent/teams/the-a-teamhttp://localhost:3000/orgs/mocked-org?mock=true
When navigating to a team-scoped URL, a blue banner appears at the top confirming the active team scope and offering a Back to org button. All tabs automatically filter to team members only.
The NUXT_PUBLIC_SCOPE environment variable in the .env file determines the default scope of the API calls made by the application. It can be set to 'enterprise' or 'organization'.
- If set to
'enterprise', the application will target API calls to the GitHub Enterprise account defined in theNUXT_PUBLIC_GITHUB_ENTvariable. - If set to
'organization', the application will target API calls to the GitHub Organization account defined in theNUXT_PUBLIC_GITHUB_ORGvariable. - To view team-level metrics, use the Teams tab or navigate to
/orgs/<org>/teams/<team>— team filtering is applied as a post-processing step.
Note: Legacy values
'team-organization'and'team-enterprise'are still accepted and automatically normalized to'organization'and'enterprise'respectively for backward compatibility.
For example, if you want to target the API calls to an organization, you would set NUXT_PUBLIC_SCOPE=organization in the .env file.
[!INFO] Environment variables with
NUXT_PUBLICscope are available in the browser (are public). See Nuxt Runtime Config for details.
NUXT_PUBLIC_SCOPE=organization
NUXT_PUBLIC_GITHUB_ORG=<YOUR-ORGANIZATION>
NUXT_PUBLIC_GITHUB_ENT=
Variable is false by default. To view mocked data switch it to true or use query parameter ?mock=true.
NUXT_PUBLIC_IS_DATA_MOCKED=false
Specifies the GitHub Personal Access Token utilized for metrics API requests. Generate this token with the following permissions: Read access to members, organization copilot metrics, and organization copilot seat management.
This token does not need billing scopes — billing has its own dedicated token (see NUXT_GITHUB_BILLING_TOKEN below). Keeping the two separate means metrics can keep using a fine-grained PAT or GitHub App, while only billing requires a classic PAT.
Important
v3.0 Migration: The new Copilot Usage Metrics API requires Read access to members, organization copilot metrics, and organization copilot seat management permissions. Without this, the new API endpoints will return 400/403 errors. See GitHub App Registration for setup details.
Token is not used in the frontend.
NUXT_GITHUB_TOKEN=
Optional. Dedicated classic PAT for the Billing tab and per-user AI credit spend. When unset, the Billing tab is hidden and the "Your AI credit spend" card on the My Usage tab is omitted — all other features keep working.
Requirements:
- Classic PAT only — fine-grained PATs and GitHub Apps cannot read billing.
- Scope:
manage_billing:enterprise(ormanage_billing:copilotfor non-enterprise-owned orgs). - Must be SSO-authorized for the target enterprise if SAML SSO is enforced.
NUXT_GITHUB_BILLING_TOKEN=ghp_classic_pat_with_manage_billing_enterprise
Optional. Forces billing calls to query /enterprises/{slug}/... regardless of dashboard scope. Set to the enterprise slug when an org-scoped dashboard's org is consolidated under an enterprise (the typical case — GitHub returns 404 on the /organizations/{org}/... billing endpoint for those orgs).
NUXT_BILLING_ENTERPRISE=my-enterprise-slug
If you get a 404 from the Billing tab with the dashboard scoped to an organization, the error message will point you at this variable.
Optional. Overrides the GitHub API base URL used for all server-side API calls. Set this when accessing GitHub at GHE.com (GitHub Enterprise Cloud with data residency), where the API is available at a dedicated subdomain.
NUXT_GITHUB_API_BASE_URL=https://api.SUBDOMAIN.ghe.com
Defaults to https://api.github.com when not set. Leave unset for standard GitHub.com and GitHub Enterprise Cloud (non-data-residency) deployments.
Note
GHES (GitHub Enterprise Server) is not supported — the Copilot usage metrics API is not available on GHES.
Alternative to PAT — use a GitHub App installation token for backend data access. When both are set, they take priority over NUXT_GITHUB_TOKEN. This is the recommended credential when users authenticate via Google, Microsoft, Auth0, or Keycloak (i.e., non-GitHub identity providers), since the token is machine-issued and not tied to any individual user account.
The installation ID is auto-discovered from NUXT_PUBLIC_GITHUB_ORG — no manual configuration needed. If the App is installed on multiple orgs and no org is configured, users see an org picker after login.
See GitHub App Installation Token in the deployment guide for full setup instructions.
NUXT_GITHUB_APP_ID=123456
NUXT_GITHUB_APP_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----This variable is required to encrypt user sessions, it needs to be at least 32 characters long. For more information see Nuxt Sessions and Authentication.
Warning
This variable is required starting from version 2.0.0.
Comma-separated list of active OAuth providers: github, google, microsoft, auth0, keycloak. Setting this variable enables authentication — users must sign in before accessing the dashboard.
NUXT_PUBLIC_AUTH_PROVIDERS=github,google
The corresponding NUXT_OAUTH_<PROVIDER>_CLIENT_ID and NUXT_OAUTH_<PROVIDER>_CLIENT_SECRET must also be set. See Authentication in DEPLOYMENT.md for full setup instructions per provider.
Comma-separated list of logins or email addresses that are allowed to sign in (any provider). When empty (default), all authenticated users are allowed.
NUXT_AUTHORIZED_USERS=alice,bob@company.com
Comma-separated list of email domains allowed to sign in. When empty (default), no domain restriction is applied.
NUXT_AUTHORIZED_EMAIL_DOMAINS=company.com
Comma-separated allowlist of logins or email addresses that can see the Billing tab (aggregate AI-credit breakdown by SKU/model/cost-center/repo). Mirrors NUXT_AUTHORIZED_USERS semantics — when this variable is empty, anyone who can already use the dashboard can also see the Billing tab. Set it to lock the tab to a specific admin set.
# Open — everyone on the dashboard can see Billing
NUXT_USAGE_ADMINS=
# Restricted — only the listed logins/emails see Billing
NUXT_USAGE_ADMINS=alice,bob@company.com
Note
The Billing tab also requires NUXT_GITHUB_BILLING_TOKEN to be set — see above. When the billing token is absent the tab is shown to all users but renders a configuration-help placeholder instead of fetching data; the NUXT_USAGE_ADMINS gate only applies once the token is configured.
The Billing tab exposes aggregate breakdowns (model / SKU / cost center) and an admin per-user breakdown. Per-user attribution depends on GitHub tagging each item with a user; some enterprise plans return only enterprise-level aggregates, in which case the per-user table is hidden behind an explanatory alert. The User Metrics ai_credits_used column and the My Usage spend card are independent of this.
Metrics endpoints (User Metrics, My Usage, Seats) accept any token type. Billing endpoints accept ONLY a classic PAT (which is why they have their own dedicated env var).
| Feature | Mock | GitHub App | Fine-grained PAT (NUXT_GITHUB_TOKEN) |
Classic PAT (NUXT_GITHUB_BILLING_TOKEN) |
|---|---|---|---|---|
| My Usage tab metrics | ✅ fixtures | ✅ | ✅ | ✅ |
User Metrics ai_credits_used column |
✅ fixtures | ✅ | ✅ | ✅ |
| My Usage "Your AI credit spend" card | ✅ fixtures | — | — | ✅ with manage_billing:enterprise |
| Billing tab (aggregate + per-user) | ✅ fixtures | — | — | ✅ with manage_billing:enterprise |
Even when on the admin allowlist, an admin only sees billing data if NUXT_GITHUB_BILLING_TOKEN is set AND that classic PAT is SSO-authorized for the target enterprise. If GitHub returns 403, the tab surfaces the message inline so it's clear which side needs adjustment.
| Variable | Provider | Description |
|---|---|---|
NUXT_OAUTH_GITHUB_CLIENT_ID |
GitHub | App client ID |
NUXT_OAUTH_GITHUB_CLIENT_SECRET |
GitHub | App client secret |
NUXT_OAUTH_GOOGLE_CLIENT_ID |
OAuth client ID | |
NUXT_OAUTH_GOOGLE_CLIENT_SECRET |
OAuth client secret | |
NUXT_OAUTH_MICROSOFT_CLIENT_ID |
Microsoft | App client ID |
NUXT_OAUTH_MICROSOFT_CLIENT_SECRET |
Microsoft | App client secret |
NUXT_OAUTH_MICROSOFT_TENANT |
Microsoft | Azure AD tenant ID (restricts to org) |
NUXT_OAUTH_AUTH0_CLIENT_ID |
Auth0 | App client ID |
NUXT_OAUTH_AUTH0_CLIENT_SECRET |
Auth0 | App client secret |
NUXT_OAUTH_AUTH0_DOMAIN |
Auth0 | Tenant domain, e.g. company.auth0.com |
NUXT_OAUTH_KEYCLOAK_CLIENT_ID |
Keycloak | Client ID |
NUXT_OAUTH_KEYCLOAK_CLIENT_SECRET |
Keycloak | Client secret |
NUXT_OAUTH_KEYCLOAK_SERVER_URL |
Keycloak | Server URL |
NUXT_OAUTH_KEYCLOAK_REALM |
Keycloak | Realm name |
NUXT_PUBLIC_HIDDEN_TABS
Comma-separated list of dashboard tab names to hide. Applies at startup without requiring a rebuild — useful for pre-built Docker deployments. The filter is case-insensitive and trims surrounding whitespace.
Available tab names: languages, editors, copilot chat, agent activity, pull requests, github.com, seat analysis, user metrics, api response
# Hide the "Agent Activity" and "API Response" tabs
NUXT_PUBLIC_HIDDEN_TABS=agent activity,api response
Default is false. When set to true, the application uses a PostgreSQL database (configured via DATABASE_URL) to store and query historical Copilot metrics.
Important
The Teams tab is automatically hidden when NUXT_PUBLIC_ENABLE_HISTORICAL_MODE is not true. Team-level metrics are derived from per-user daily records in the database (user_day_metrics table). Without the database, the teams comparison tab would display identical org-wide data for every team.
NUXT_PUBLIC_ENABLE_HISTORICAL_MODE=false
Solution supports HTTP Proxy settings when running in corporate environment. Simply set HTTP_PROXY environment variable.
For custom CA use environment variable CUSTOM_CA_PATH to load the certificate into proxy agent options.
Default is 80 in the Dockerfile. It defines the port number that Nitro (Nuxt’s server engine) will listen on.
For example, it should be set to a number between 1024 and 49151 if the application is run as a non-root user.
npm installnpm run devdocker build -t copilot-metrics-viewer .docker run -p 8080:80 --env-file ./.env copilot-metrics-viewerThe application will be accessible at http://localhost:8080
For Kubernetes deployments and health monitoring, the application provides dedicated health check endpoints that don't require authentication and don't make external API calls:
/api/health- General health check endpoint/api/ready- Readiness probe endpoint/api/live- Liveness probe endpoint
All endpoints return JSON responses with status information and respond in ~200ms, making them ideal for Kubernetes health checks instead of using the root / endpoint which triggers GitHub API calls.
livenessProbe:
httpGet:
path: /api/live
port: 80
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/ready
port: 80
initialDelaySeconds: 5
periodSeconds: 5This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.
This project is independently developed and maintained, and is not an official GitHub product. It thrives through the dedicated efforts of (@martedesco), (@karpikpl) and our wonderful contributors. A heartfelt thanks to all our contributors! ✨
I aim to provide support through GitHub Issues. While I strive to stay responsive, I can't guarantee immediate responses. For critical issues, please include "CRITICAL" in the title for quicker attention. 🙏🏼















