Skip to content

About GitHub Follower Analyzer is your backstage pass to the social side of GitHub. Track, analyze, and compare followers with ease—no magnifying glass required. Perfect for curious coders, data enthusiasts, and anyone who’s ever wondered, “Who’s watching me code?” 👀

License

Notifications You must be signed in to change notification settings

hrosicka/github-follower-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

GitHub Follower Analyzer

MIT License Python 3.x GitHub API Last Commit Issues Stars

A simple script to analyze your GitHub social graph: find out who you follow that doesn't follow you back, and who follows you that you don't follow back.

Features

  • Analyzes your GitHub "followers" and "following" relationships
  • Identifies:
    • People you follow who do not follow you back ("non-followers")
    • People who follow you but you do not follow back ("fans")
  • Handles large accounts (uses proper API pagination)
  • Clear command-line output
  • Graceful error handling for authentication and API rate limits
  • Optionally exports results to a file (TXT or CSV)

How It Works

This script fetches your followers and users you are following via the GitHub API, compares the two sets, and prints out:

  • A list of users you follow who don't follow you back
  • A list of users who follow you, but you don't follow back

You can also choose to export the results to a TXT or CSV file.

Requirements

  • Python 3.x
  • requests module (pip install requests)
  • GitHub Personal Access Token (with read:user permissions)

Setup

  1. Clone this repository:

    git clone https://github.com/hrosicka/github-follower-analyzer.git
    cd github-follower-analyzer
  2. Install dependencies:

    pip install requests
  3. Set up your credentials:

    • Open main.py
    • Set your GitHub username:
      GITHUB_USERNAME = 'your-github-username'
    • Set your GitHub Personal Access Token:
      GITHUB_TOKEN = 'your-personal-access-token'
    • Tip: For better security, use an environment variable instead of hardcoding your token. Uncomment and use:
      # GITHUB_TOKEN = os.environ.get('GITHUB_PAT')
      Then set GITHUB_PAT in your environment.
  4. (Optional) Configure environment variable:

    • On Linux/macOS:
      export GITHUB_PAT='your-personal-access-token'
    • On Windows (Command Prompt):
      set GITHUB_PAT=your-personal-access-token
    • On Windows (PowerShell):
      $env:GITHUB_PAT='your-personal-access-token'

Usage

Run the script:

python main.py

You will see output like:

--- Comparison Results ---

Total Followers: 42
Total Following: 30

Users you follow who DO NOT follow you back (3):
- user123
- user456
- user789

Users who FOLLOW YOU but you DO NOT follow back (1):
- fanuser

--- Done ---

Exporting Results

You can now export the results to a TXT or CSV file:

  • Export to TXT:

    python main.py --output results.txt
  • Export to CSV:

    python main.py --output results.csv --format csv

Results will always be printed to the console by default. Providing arguments for exporting is optional; if omitted, the script behaves as before.

Notes

  • The script handles pagination to support accounts with many followers/followings.
  • Authentication and rate limit errors are clearly reported.
  • Never commit your Personal Access Token to a public repository!

License

MIT License


About

About GitHub Follower Analyzer is your backstage pass to the social side of GitHub. Track, analyze, and compare followers with ease—no magnifying glass required. Perfect for curious coders, data enthusiasts, and anyone who’s ever wondered, “Who’s watching me code?” 👀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages