A web application to analyze and visualize GitHub Copilot usage metrics for your organization.
- View total active seats and billing period information
- Monitor seat assignments and last activity dates
- Visualize seat allocation with interactive charts
- Real-time data fetching from GitHub API
-
Clone the repository
-
Install dependencies:
npm install
-
Create a
.env
file based on.env.template
:GITHUB_TOKEN=your_github_token_here ORG_NAME=your_organization_name
To get your GitHub token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with
read:org
andcopilot
scopes
-
Start the server:
npm start
-
Open
http://localhost:3000
in your browser
-
Build the Docker image:
docker build -t gh-cp-metrics .
-
Run the container:
Either use environment variables directly:
docker run -p 3000:3000 \ -e GITHUB_TOKEN=your_github_token_here \ -e ENTERPRISE_NAME=your_enterprise_name \ gh-cp-metrics
Or use your local
.env
file:docker run -p 3000:3000 --env-file .env gh-cp-metrics
-
Open
http://localhost:3000
in your browser
- Backend: Node.js with Express
- Frontend: HTML, JavaScript, Tailwind CSS
- Data Visualization: Chart.js
- API: GitHub REST API
- Containerization: Docker
This application uses the GitHub Copilot API. For more information, see: https://docs.github.com/en/rest/copilot/copilot-usage