Automatically generate visualizations of your programming language usage across all your GitHub repositories.
Building on other tools, this runs "locally" as an action, allowing quicker refreshes, and works far better for those who enjoy a wide range of languages
- Analyzes ALL your languages, not just the top 6
- Works with both public and private repositories
- Highly configurable to match your needs
- Generates multiple visualization types with modern design
The action requires a Personal Access Token (PAT) to access your repositories.
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Name:
Language Stats - Select scope:
repo(Full control of private repositories) - Click "Generate token" and copy it
- Go to your repository Settings
- Secrets and variables → Actions
- Click "New repository secret"
- Name:
STATS_TOKEN - Value: Paste your PAT
- Click "Add secret"
Create .github/workflows/stats.yml:
name: Update Language Statistics
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
update-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: StefVuck/Github-Language-Stats@v1.2.0
with:
github_token: ${{ secrets.STATS_TOKEN }}
visualization_types: "leaderboard"
output_path: "stats"Shows top languages with contribution breakdown from your top repositories.
| Input | Description | Default |
|---|---|---|
github_token |
Personal Access Token with repo scope |
Required |
visualization_types |
Types to generate | leaderboard bar pie |
output_path |
Output directory | github-stats |
exclude_repos |
Comma-separated repos to skip | '' |
include_forks |
Include forked repos | false |
exclude_languages |
Comma-separated languages to skip | HTML,CSS |
top_repos_count |
Repos shown in leaderboard breakdown | 5 |
commit_message |
Git commit message | Update language statistics |
dark_mode |
Enable dark mode theme | false |
use_loc |
Count actual lines of code by cloning repos. Slower but more accurate. | false |
leaderboard- Horizontal bars with badges and top contributing reposbar- Vertical bars (top 12 languages)horizontal-bar- Horizontal bars (top 15 languages)pie- Pie chart (top 8 + "Other")donut- Donut chart (top 8 + "Other")
Each type generates 3 files:
*_by_repos.png- Sorted by repository count*_by_bytes.png- Sorted by code volume (bytes from GitHub API, or lines of code withuse_loc: 'true')*_by_weighted.png- Balanced ranking combining repos and volume
- uses: StefVuck/Github-Language-Stats@v1.2.0
with:
github_token: ${{ secrets.STATS_TOKEN }}
visualization_types: "leaderboard bar pie donut"
output_path: "language-stats"
exclude_repos: "test-repo,old-project"
include_forks: "true"
exclude_languages: "HTML,CSS,Markdown"
top_repos_count: "10"
dark_mode: "true"
use_loc: "true"If you see Resource not accessible by integration, your token doesn't have the required permissions.
Solution: Create a Personal Access Token with repo scope (see Setup above).
Ensure your workflow has contents: write permission and the output directory is not in .gitignore.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp config.example.json config.json
# Edit config.json with your token
python main.py --types leaderboard bar pie --dark-mode
# Use actual lines of code instead of byte counts (slower)
python main.py --types leaderboard --locMIT








