Skip to content

Latest commit

 

History

History
131 lines (103 loc) · 4.02 KB

File metadata and controls

131 lines (103 loc) · 4.02 KB

GitHub Console

GitHub console tool for managing your followings. This tool allows you to unfollow users based on their account creation date, starting with the oldest accounts.

Features

  • 📥 Fetch all users you're following
  • 📊 Get detailed user information including creation dates
  • 🔄 Sort users by account creation date (oldest first)
  • 🚫 Unfollow specified number of oldest users
  • ⚡ Rate limiting to respect GitHub API limits
  • 📋 Detailed progress reporting and summary

Setup

  1. Clone and install dependencies:

    git clone https://github.com/sefakozan/github-console.git
    cd github-console
    npm install
  2. Create GitHub Personal Access Token:

  3. Configure environment:

    cp .env.example .env

    Edit .env file and add your GitHub token:

    GITHUB_TOKEN=your_github_token_here
    

Usage

Unfollow 100 oldest users (default):

npm run unfollow
# or
node unfollow.js

Unfollow specific number of users:

npm run unfollow:50    # Unfollow 50 oldest users
node unfollow.js 25    # Unfollow 25 oldest users
node unfollow.js x     # Unfollow x  oldest users

Unfollow with Following/Follower Difference Filter:

You can unfollow users based on the difference between their following and followers count.

# Unfollow up to 100 users where following - followers >= 1000
npm run unfollow:diff

# Unfollow up to 50 users where following - followers >= 500
node unfollow.js 50 --diff=500

# Unfollow up to x users where following - followers >= y
node unfollow.js x --diff=y

Available npm scripts:

  • npm run unfollow - Unfollow 100 oldest users
  • npm run unfollow:100 - Unfollow 100 oldest users
  • npm run unfollow:50 - Unfollow 50 oldest users
  • npm run unfollow:diff - Unfollow users where following - followers >= 1000
  • npm run unstar - Unstar 100 oldest starred repos
  • npm run unstar:100 - Unstar 100 oldest starred repos
  • npm run unstar:50 - Unstar 50 oldest starred repos

How it works

  1. Fetches all following users - Gets complete list of users you're following
  2. Gets user details - Retrieves creation date and other info for each user
  3. Sorts by creation date - Orders users from oldest to newest account creation
  4. Shows preview - Displays the oldest users that will be unfollowed
  5. 5-second warning - Gives you time to cancel (Ctrl+C) before proceeding
  6. Unfollows users - Processes unfollowing with rate limiting
  7. Shows summary - Reports successful and failed operations

Example Output

🚀 GitHub Unfollower Started
Target: Unfollow 100 oldest following users

📥 Fetching all following users...
   Fetched 100 users so far...
   Fetched 200 users so far...
✅ Total following users: 250

📊 Getting detailed user information...
   Processed 10/250 users...
   Processed 20/250 users...
✅ Got details for 250 users

🔄 Sorting users by creation date (oldest first)...

📋 Oldest users you are following:
   1. John Doe (@johndoe) - Created: 3/15/2008
   2. Jane Smith (@janesmith) - Created: 5/22/2008
   ... and 98 more

⚠️  WARNING: This will unfollow users permanently!
Press Ctrl+C to cancel, or wait 5 seconds to continue...

🚫 Starting to unfollow 100 oldest users...
   ✅ Unfollowed: John Doe (@johndoe) - Created: 3/15/2008
   ✅ Unfollowed: Jane Smith (@janesmith) - Created: 5/22/2008
   ...

📊 Summary:
✅ Successfully unfollowed: 100 users
🎉 Operation completed!

Safety Features

  • 5-second warning before starting the unfollow process
  • Rate limiting to respect GitHub API limits
  • Error handling for failed operations
  • Detailed logging of all operations
  • Summary report showing successful and failed unfollows