|
1 | 1 | # GitHub Copilot Usage Analyzer |
2 | 2 |
|
3 | | -A web application that visualizes GitHub Copilot premium request usage to help teams monitor and optimize their AI resource consumption. |
| 3 | +A single-page application that visualizes GitHub Copilot premium request usage data from CSV exports. This tool helps you understand your team's Copilot usage patterns. |
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
7 | | -- Upload GitHub Copilot usage CSV exports |
8 | | -- View stacked line graph of compliant vs. exceeding requests |
9 | | -- See daily usage patterns by model |
10 | | -- Analyze model-specific usage statistics |
11 | | -- Interactive visualizations with tooltips for detailed information |
| 7 | +- Upload and parse GitHub Copilot usage CSV data |
| 8 | +- Visualize usage over time with interactive charts |
| 9 | +- See request distribution by model |
| 10 | +- Track compliant vs. exceeding quota requests |
| 11 | +- Analyze usage patterns with daily breakdown charts |
12 | 12 |
|
13 | 13 | ## Getting Started |
14 | 14 |
|
15 | | -### Development |
| 15 | +### Prerequisites |
16 | 16 |
|
17 | | -1. Clone this repository |
18 | | -2. Install dependencies: `npm install` |
19 | | -3. Start development server: `npm run dev` |
20 | | -4. Open your browser to http://localhost:5000 |
| 17 | +- Node.js 16+ and npm |
21 | 18 |
|
22 | | -### Build |
| 19 | +### Installation |
23 | 20 |
|
24 | | -To build the application for production: |
| 21 | +1. Clone this repository: |
| 22 | + ```bash |
| 23 | + git clone https://github.com/[your-username]/github-copilot-usage.git |
| 24 | + cd github-copilot-usage |
| 25 | + ``` |
25 | 26 |
|
26 | | -```bash |
27 | | -npm run build |
28 | | -``` |
29 | | - |
30 | | -## Deployment |
31 | | - |
32 | | -### GitHub Pages Deployment |
| 27 | +2. Install dependencies: |
| 28 | + ```bash |
| 29 | + npm install |
| 30 | + ``` |
33 | 31 |
|
34 | | -The project includes a GitHub Actions workflow that will automatically build and deploy the application to GitHub Pages whenever changes are pushed to the main branch. |
| 32 | +3. Start the development server: |
| 33 | + ```bash |
| 34 | + npm run dev |
| 35 | + ``` |
35 | 36 |
|
36 | | -#### How to Deploy to GitHub Pages |
| 37 | +4. Open http://localhost:5000 in your browser |
37 | 38 |
|
38 | | -1. Push your changes to the `main` branch |
39 | | -2. The GitHub Actions workflow will automatically: |
40 | | - - Create a simplified build without Spark dependencies |
41 | | - - Deploy to GitHub Pages |
| 39 | +## CSV Format |
42 | 40 |
|
43 | | -3. Alternatively, you can manually trigger the deployment: |
44 | | - - Go to the "Actions" tab in your repository |
45 | | - - Select "Deploy to GitHub Pages" workflow |
46 | | - - Click "Run workflow" on the main branch |
| 41 | +The application expects a CSV export from GitHub Copilot premium requests with the following format: |
47 | 42 |
|
48 | | -4. Your application will be available at: |
49 | | - `https://[your-github-username].github.io/[repo-name]/` |
| 43 | +``` |
| 44 | +"Timestamp","User","Model","Requests Used","Exceeds Monthly Quota","Total Monthly Quota" |
| 45 | +"2025-06-11T05:13:27.8766440Z","UserName","gpt-4.1-2025-04-14","1","False","Unlimited" |
| 46 | +``` |
50 | 47 |
|
51 | | -#### Setting Up GitHub Pages for Your Repository |
| 48 | +## Deployment |
52 | 49 |
|
53 | | -To enable GitHub Pages deployment: |
| 50 | +### GitHub Pages |
54 | 51 |
|
55 | | -1. Go to your repository on GitHub |
56 | | -2. Click on "Settings" |
57 | | -3. Navigate to "Pages" in the left sidebar |
58 | | -4. Under "Build and deployment" > "Source", select "GitHub Actions" |
| 52 | +This project is configured for easy deployment to GitHub Pages. See [DEPLOYMENT.md](DEPLOYMENT.md) for detailed instructions. |
59 | 53 |
|
60 | | -For more detailed instructions and troubleshooting, see [GITHUB_PAGES_DEPLOY.md](GITHUB_PAGES_DEPLOY.md). |
| 54 | +Quick deploy: |
| 55 | +```bash |
| 56 | +npm run deploy |
| 57 | +``` |
61 | 58 |
|
62 | | -## How It Works |
| 59 | +## Built With |
63 | 60 |
|
64 | | -The GitHub Pages deployment handles the fact that GitHub Spark dependencies are not available outside the Spark environment. The workflow: |
| 61 | +- React |
| 62 | +- TypeScript |
| 63 | +- Vite |
| 64 | +- Recharts |
| 65 | +- shadcn/ui components |
| 66 | +- Tailwind CSS |
65 | 67 |
|
66 | | -1. Creates a simplified build configuration |
67 | | -2. Implements localStorage-based alternatives to Spark's useKV hooks |
68 | | -3. Builds a fully client-side version of the application |
69 | | -4. Deploys it to GitHub Pages |
| 68 | +## License |
70 | 69 |
|
71 | | -This approach ensures your application can be shared and accessed outside the Spark development environment. |
| 70 | +This project is licensed under the MIT License - see the LICENSE file for details. |
72 | 71 |
|
73 | | -## License |
| 72 | +## Acknowledgments |
74 | 73 |
|
75 | | -The Spark Template files and resources from GitHub are licensed under the terms of the MIT license, Copyright GitHub, Inc. |
| 74 | +- GitHub Copilot for helping with development |
| 75 | +- The shadcn/ui team for the beautiful components |
| 76 | +- Recharts for the charting library |
0 commit comments