This is a followers tracker, written in and for educational and demonstrational purposes.
A lightweight and convenient application that tracks your GitHub followers, detects changes between runs, and allows you to check if specific users are in your followers list.
Based on tech stack:
- Install and setup:
git clone [repository-url]
cd /path/to/github-followers-tracker/
npm install
cp .env.example .env- Get GitHub token:
- Go to https://github.com/settings/tokens
- Click
Generate new tokenβGenerate new token (classic) - Set expiration and check only
public_reposcope - Copy the token immediately
- Edit .env file and add your credentials:
GITHUB_TOKEN=your_github_token_here
GITHUB_USERNAME=your_github_username_here- Never commit your
.envfile - Token only needs
public_reposcope
The main script that fetches your current GitHub followers, compares them with previous data, and shows changes.
npm run track- Fetches your current GitHub followers
- Compares with previous run
- Shows new followers and unfollows
- Stores data locally for future comparisons
MAX_DISPLAY_FOLLOWERS: Max usernames to show (default: 100)
β Checking followers for username...
π New followers (2): user1, user2
π Unfollowed (1): user3
βΉ Total followers: 154- Data is stored in
data/followers.json(completely overwritten each run) - First run creates baseline, subsequent runs show changes
Additional script that checks if a specific user is in your followers list. Can use either current data from GitHub API or cached data from previous runs.
npm run check <username> [cached]<username>: Required. The GitHub username to check[cached]: Optional. Use cached data instead of fetching fresh data from GitHub API
Check if user "octocat" is in your current followers (fetches fresh data):
npm run check octocatCheck if user "octocat" is in your cached followers (uses locally stored data):
npm run check octocat cachedWhen user IS in followers list:
π Updating followers data...
β
User "octocat" is in your current followers listWhen user is NOT in followers list:
π Using cached followers data...
β User "octocat" is NOT in your cached followers list- Without the
cachedparameter, the script fetches fresh data from GitHub API - With the
cachedparameter, uses data fromdata/followers.jsonwithout API calls (useful for quick checks without hitting API rate limits)
That's it! Thank you!
The 'GitHub followers tracker' is open-sourced software licensed under the MIT license.
This project uses third-party software components. Their respective licenses can be found in the LICENSE-3rd-party.md file.