github-unfollow

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2025 License: MIT

README

GitHub Unfollow Tool

A Go-based command-line tool to help you clean up your GitHub following list by automatically identifying and unfollowing users who don't follow you back.

Features

  • 🔍 Find users you follow who don't follow you back
  • ⚡ Process large numbers of followers/following efficiently
  • 🛡️ Safe execution with interactive confirmation
  • 🚀 Concurrent processing with configurable worker pool
  • 🔐 Secure token-based authentication
  • ⚙️ Configurable through environment variables and command-line flags

Prerequisites

  • Go 1.16 or higher
  • A GitHub account
  • A GitHub Personal Access Token with the user:follow scope

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/github-unfollow.git
    cd github-unfollow
    
  2. Install dependencies:

    go mod download
    
  3. Create a .env file in the project root and add your GitHub credentials:

    GITHUB_USER=your_github_username
    GITHUB_TOKEN=your_github_personal_access_token
    

Usage

  1. Build the application:

    go build -o github-unfollow cmd/main.go
    
  2. Run the application:

    ./github-unfollow
    
  3. The tool will:

    • Fetch your followers and following lists
    • Identify users who don't follow you back
    • Show you the list of users to be unfollowed
    • Ask for confirmation before proceeding (unless -force is used)
    • Process unfollows concurrently using the configured worker pool

Configuration

Environment Variables

Create a .env file in the project root with the following variables:

# Required
GITHUB_USER=your_github_username
GITHUB_TOKEN=your_github_personal_access_token

# Optional (with defaults)
WORKER_COUNT=10  # Number of concurrent workers
QUEUE_SIZE=10     # Size of the worker queue
Command-Line Flags
  • -force: Skip the interactive confirmation prompt (use with caution)

Example:

# Run with default settings and interactive confirmation
./github-unfollow

# Run with force flag (skips confirmation)
./github-unfollow -force

Security

  • Your GitHub token is only used to authenticate with the GitHub API
  • The token requires only the user:follow scope
  • Never share your .env file or commit it to version control

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This tool is provided as-is, without any warranties. Use it at your own risk. The maintainers are not responsible for any issues caused by using this tool.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL