A powerful Go-based CLI tool to manage your GitHub following relationships. Follow followers of specific users who don't already follow you, or unfollow users who don't follow you back.
- Smart Following: Follow followers of specific users who don't follow you back
- Cleanup: Unfollow users who don't follow you back
- Efficient: Handles large follower lists with early-exit optimization
- Safe: Interactive confirmation before bulk operations
- Fast: Concurrent processing with configurable worker pool
- Secure: OAuth2 token-based GitHub API authentication
- Flexible: Environment variables and command-line flags
- Rate-Limited: Configurable delays to respect GitHub API limits
- Automated: GitHub Actions workflows for daily operations
- Installation
- Configuration
- Usage
- Automated Workflows
- Project Structure
- Security
- Troubleshooting
- Contributing
- License
- Go 1.24 or higher
- GitHub account
- GitHub Personal Access Token with
user:followscope
git clone https://github.com/jvcByte/gh_followers.git
cd gh_followers
go build -o gh_followers ./cmdgo install github.com/jvcByte/gh_followers/cmd@latest- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate a new token with the
user:followscope - Copy the token
Create a .env file in the project root:
# Required
GH_USERNAME=your_github_username
GH_TOKEN=ghp_your_token_here
# Optional (defaults shown)
WORKER_COUNT=1 # Concurrent workers (1-5 recommended)
QUEUE_SIZE=3 # Task queue buffer size
TIME_DELAY_MS=2000 # Delay between API calls (1000-3000 recommended)Copy
.env.exampleto.envand fill in your credentials.
Follow followers of a specific user who don't already follow you:
# Follow up to 5 followers of torvalds
./gh_followers follow torvalds --limit 5
# Follow without confirmation
./gh_followers follow username --force
# Follow with custom limit
./gh_followers follow username --limit 10Flags:
--limit, -l: Maximum number of users to follow (default: 0 = no limit)--force, -f: Skip confirmation prompt
Unfollow users who don't follow you back:
# Show users and confirm before unfollowing
./gh_followers unfollow
# Unfollow without confirmation
./gh_followers unfollow --forceFlags:
--force, -f: Skip confirmation prompt
./gh_followers --help
./gh_followers follow --help
./gh_followers unfollow --helpThe project includes GitHub Actions workflows for automated daily operations:
Automatically follows 1 user from each of 30 top developer accounts daily (30 users/day total):
- Schedule: Daily at 8 AM UTC
- Trigger: Manual via workflow_dispatch
- Log: Maintains
follow-log.jsonwith daily activity
Automatically unfollows users who don't follow you back (with 3-day grace period):
- Schedule: Daily at 9 AM UTC (1 hour after follow workflow)
- Logic: Only unfollows users followed 3+ days ago who haven't followed back
- Trigger: Manual via workflow_dispatch (with optional dry-run mode)
- Fork this repository
- Go to Settings → Secrets and variables → Actions
- Add secrets:
GH_USERNAME: Your GitHub usernameGH_TOKEN: Your personal access token withuser:followscope
- Enable GitHub Actions in your fork
gh_followers/
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── cmd/
│ └── main.go # Application entry point
├── internal/
│ ├── cli/ # CLI commands (follow, unfollow)
│ ├── config/ # Configuration management
│ ├── git_hub_manager/# GitHub API client
│ ├── helper/ # Utility functions
│ └── worker/ # Concurrent worker pool
├── .env.example # Example configuration
├── go.mod # Go module definition
└── README.md # This file
- Tokens require only
user:followscope (no repo access) - Tokens loaded from environment variables only
- Never commit
.envto version control (included in.gitignore) - Use GitHub secrets for automated workflows
GitHub API limits:
- 5,000 requests/hour for authenticated requests
- Each follow/unfollow = 1 API call
- Built-in configurable delays via
TIME_DELAY_MS
Recommended settings for large operations:
WORKER_COUNT=1
TIME_DELAY_MS=3000- Verify
GH_TOKENis correct and hasuser:followscope - Check token hasn't expired
- Increase
TIME_DELAY_MSvalue - Reduce
WORKER_COUNTto 1 - Wait for rate limit reset (1 hour)
- Use
--limitflag to fetch only needed followers - Example:
./github-followers follow torvalds --limit 10
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is provided as-is without warranties. Use at your own risk. Always review user lists before confirming bulk operations.
If you find this tool useful, please ⭐ the repository!