Analytics dashboard for the AgentToolkit organization, displaying GitHub traffic, stars, and PyPI download statistics for selected repositories.
# Install dependencies
npm install
# Start dev server
npm run dev
# Build for production
npm run buildTo collect GitHub traffic data, you need to set up authentication:
Important: Traffic data requires push access or admin/maintain role on the repository.
Option A: Classic Token (Recommended for simplicity)
- Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
- Click "Generate new token (classic)"
- Configure the token:
- Note: Agent Toolkit Repository Stats Traffic Data
- Expiration: Set according to your preference (recommended: 90 days or 1 year)
- Scopes: Select
repo(Full control of private repositories)
- Click "Generate token" and copy the token (you won't see it again!)
Option B: Fine-grained Token
- Go to GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens
- Click "Generate new token"
- Configure the token:
- Name: Agent Toolkit Repository Stats Traffic Data
- Expiration: Set according to your preference (recommended: 90 days or 1 year)
- Repository access: Select "Only select repositories" and choose the repositories you would like to collect data for
- Permissions:
- Repository permissions:
- Administration: Read-only (required for traffic data)
- Contents: Read and write (if you want to commit data back)
- Metadata: Read-only (automatically included)
- Account permissions: None needed
- Repository permissions:
- Click "Generate token" and copy the token (you won't see it again!)
Note: You must have admin or maintain role on the selected repositories for the token to access traffic data.
For Local Development:
# Install dependencies
python -m venv .venv
source .venv/bin/activate
pip install requests
# Set your token as an environment variable
export GITHUB_TOKEN=your_personal_access_token_hereFor GitHub Actions:
- Go to your repository settings:
https://github.com/AgentToolkit/repository-stats/settings/secrets/actions - Click "New repository secret"
- Name:
TRAFFIC_DATA_TOKEN - Value: Paste your PAT
- Click "Add secret"
Manual Collection:
For each selected repository run:
# Download traffic data for cuga-agent repository
python download_traffic.py --repo <repository_org>/<repository_name> --output-dir traffic_data_latest
# Or specify token directly (not recommended for scripts)
python download_traffic.py --repo <repository_org>/<repository_name> --output-dir traffic_data_latest --token <your_github_pat>Automated Collection:
The workflow runs automatically every Sunday at midnight UTC via GitHub Actions. You can also trigger it manually:
- Go to Actions > Fetch Traffic Data
- Click "Run workflow"
Error: "403 Forbidden"
This means the GitHub token doesn't have sufficient permissions. Traffic data requires special access:
- Check your repository role: You need admin or maintain role on all of the selected repositories
- Check token permissions:
- Classic token: Must have
reposcope - Fine-grained token: Must have Administration: Read permission
- Classic token: Must have
- Environment variable: Make sure
GITHUB_TOKENorGH_TOKENis set correctly - For GitHub Actions: Use a PAT as a repository secret named
TRAFFIC_DATA_TOKEN
Error: "404 Not Found"
- Verify the repository name is correct (i.e. organization/repository_name)
- Make sure your token has access to the repository
Why do I need admin access?
GitHub's traffic endpoints are only accessible to repository administrators or maintainers. This is by design to protect repository analytics data. If you're getting 403 errors, ask a repository admin to:
- Add you as a collaborator with maintain or admin role, OR
- Generate a PAT with admin access and share it securely (e.g., via repository secrets)
Note: The default GITHUB_TOKEN provided by GitHub Actions doesn't have permission to access traffic data endpoints from other repositories. You must use a PAT.
This site is automatically deployed to GitHub Pages when pushing to the main branch.