Monitor and automate your GitHub repository traffic analytics.
Project description
Gitlytics
🚀 GitHub Traffic Monitor 📊
Beautiful GitHub traffic analytics for all your repositories — public and private. 📈
Please consider giving this project a ⭐ if you find it helpful!
⚠️ NOTE: NAME AND TECH STACK UPGRADE! This library was formerly known as
github-traffic-monitor. We have officially rebranded togitlytics!In addition to the name change, we have migrated away from Streamlit. The dashboard is currently a base version working on a new and better React + Vite architecture, powered by a FastAPI backend!
A local-only GitHub traffic analytics tool with two modes:
- 🖥️ Web UI — Beautiful React + FastAPI dashboard (recommended)
- ⌨️ CLI — Terminal output + CSV export
View 14-day views, clones, referrers, and popular paths for all your repositories. Everything runs on your machine. Your token never leaves your device.
🚨 The 14-Day Catch (And How to Fix It!)
⚠️ Did you know? GitHub normally only saves your repository traffic data for 14 days. After two weeks, your valuable views and clones data is permanently deleted.
Don't lose your data! We built a companion automation tool that runs silently in the background every 13 days using GitHub Actions to fetch and save your data permanently.
👉 Set up GitHub Traffic Automation here (It takes literally 2 minutes to set up!)
Once you have your automated data saved, you can seamlessly plug it right into this dashboard to visualize your beautiful, long-term historical charts.
✨ Features
| Feature | React UI | CLI |
|---|---|---|
| Dual Mode Interface (Live API & CSV Upload) | ✅ | ❌ |
| Token input (no hardcoding) | ✅ | ✅ |
| Upload & visualize historical CSV data | ✅ | ❌ |
| Summary metrics (views, clones, stars, forks) | ✅ | ✅ |
| Animated Area & Pie charts per repository | ✅ | ❌ |
| Per-repo daily views & clones chart | ✅ | ✅ |
| Top referrers & popular paths | ✅ | ✅ |
| Expandable repository list | ✅ | ❌ |
| Export to CSV | ✅ (download button) | ✅ (file) |
| Runs 100% locally | ✅ | ✅ |
🛠️ Installation
You can install the package directly from PyPI.
# Basic CLI installation
pip install gitlytics
# Installation with Dashboard UI support
pip install "gitlytics[dashboard]"
Generating a GitHub Personal Access Token (PAT)
To use either the CLI or Dashboard, you'll need a GitHub token.
- Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Select the
reposcope — required to read traffic data for private repositories - Click Generate token and copy it immediately
🔒 Security Note: Your token is completely safe, used only on your machine, and never sent to any external server.
🖥️ Run: React Dashboard (Recommended)
If you installed with the [dashboard] extra, you can launch the beautiful web UI with a single command:
gitlytics dashboard
The server opens automatically in your terminal and you can view your dashboard at http://localhost:8000.
⌨️ Run: CLI (Terminal Mode)
If you just want terminal output or to export CSV files, you can use the CLI commands.
Fetch data and print to terminal:
gitlytics fetch --token ghp_your_token_here
Fetch data and save to a specific CSV file:
gitlytics fetch --token ghp_your_token_here --output my_report.csv
Sync data (Append today's traffic to historical monthly CSVs):
gitlytics sync --token ghp_your_token_here --dir ./data
You can also store your token in a .env file as GITHUB_TOKEN=ghp_... so you don't have to type it out every time.
📊 CSV Output Columns
| Column | Description |
|---|---|
Repository |
Full repo name (user/repo) |
Private |
True / False |
Stars |
Current star count |
Forks |
Current fork count |
Total Views |
Page views in last 14 days |
Unique Visitors |
Unique visitors in last 14 days |
Total Clones |
Clone count in last 14 days |
Unique Cloners |
Unique cloners in last 14 days |
Top Referrer |
Highest-traffic referral source |
Top Referrer Views |
View count from top referrer |
Top Path |
Most visited path |
Top Path Views |
View count for top path |
Fetched At |
UTC timestamp of the fetch |
⚠️ Requirements
- Python 3.9+
- A GitHub account with at least one repository
- A GitHub Personal Access Token with the
reposcope
🛠️ Development Install
git clone https://github.com/ameyac11/github-traffic-monitor
cd github-traffic-monitor
pip install -e ".[dev,dashboard]"
🧪 Running Tests
pip install pytest
pytest
🌟 Show Your Support
If you find this project useful, please consider giving it a ⭐ on GitHub! It helps more people discover the tool.
📄 License
This project is licensed under the Apache License 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlytics-0.1.1.tar.gz.
File metadata
- Download URL: gitlytics-0.1.1.tar.gz
- Upload date:
- Size: 216.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12484acb7734fad3f19254949928c7a62b80943786d96955a70810c866307dd6
|
|
| MD5 |
6fb8af5d3c40fe4c81825394fa52a48b
|
|
| BLAKE2b-256 |
9200e6479616248b7eba561a420fef7b7857cf07da91405738fed62cf31fe280
|
Provenance
The following attestation bundles were made for gitlytics-0.1.1.tar.gz:
Publisher:
publish.yml on ameyac11/gitlytics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlytics-0.1.1.tar.gz -
Subject digest:
12484acb7734fad3f19254949928c7a62b80943786d96955a70810c866307dd6 - Sigstore transparency entry: 1825453813
- Sigstore integration time:
-
Permalink:
ameyac11/gitlytics@a0acaf80afc29984015b244ac91a1e8e10da206a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ameyac11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0acaf80afc29984015b244ac91a1e8e10da206a -
Trigger Event:
release
-
Statement type:
File details
Details for the file gitlytics-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gitlytics-0.1.1-py3-none-any.whl
- Upload date:
- Size: 215.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adecb0bccef7aae60de08cd76a22f68d72d6850efa9b4e14a8d44e38f2f3e2e6
|
|
| MD5 |
6baf9dc252220fe5f5e5933c14cf1b72
|
|
| BLAKE2b-256 |
9bfafd5ee57c6fa9d49704d4b00a6ea6bce319bb40cd29d9d5dfd375acfb6505
|
Provenance
The following attestation bundles were made for gitlytics-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ameyac11/gitlytics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlytics-0.1.1-py3-none-any.whl -
Subject digest:
adecb0bccef7aae60de08cd76a22f68d72d6850efa9b4e14a8d44e38f2f3e2e6 - Sigstore transparency entry: 1825453911
- Sigstore integration time:
-
Permalink:
ameyac11/gitlytics@a0acaf80afc29984015b244ac91a1e8e10da206a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ameyac11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0acaf80afc29984015b244ac91a1e8e10da206a -
Trigger Event:
release
-
Statement type: