The GitHub Follow Script is an automation tool designed to help GitHub users expand their network by intelligently identifying and following users who are likely to follow back. The script implements strategic algorithms to analyze GitHub users' behavior patterns and select candidates based on specific criteria.
- Smart User Selection: Uses multiple strategies to find potential users to follow
- Activity Analysis: Considers user activity to avoid following inactive accounts
- Follow Ratio Analysis: Targets users with a history of following others
- Rate Limiting Protection: Implements delays to avoid triggering GitHub's anti-bot measures
- API Usage Monitoring: Checks remaining API calls before execution
- Python 3.6+
requests
library- GitHub Personal Access Token with
user:follow
permissions
# Clone the repository
git clone https://github.com/isamytanaka/github-follow-script.git
# Change to the project directory
cd github-follow-script
# Install dependencies
pip install -r requirements.txt
The script uses several configurable parameters to determine suitable follow candidates:
Parameter | Default | Description |
---|---|---|
MAX_FOLLOWING |
1000 | Maximum number of accounts a user can follow to be considered |
MIN_FOLLOWERS |
5 | Minimum followers required (avoids inactive accounts) |
MAX_FOLLOWERS |
1000 | Maximum followers threshold (avoids popular accounts unlikely to follow back) |
INACTIVITY_DAYS |
60 | Days without activity to consider an account inactive |
FOLLOW_RATIO_THRESHOLD |
1.2 | Minimum following/followers ratio indicating follow-back tendency |
MAX_FOLLOWS_PER_DAY |
20 | Maximum users to follow per execution |
The script employs a multi-phase algorithm:
- Retrieve authenticated user information
- Get lists of current followers and users being followed
- Check GitHub API rate limits
The script uses two complementary strategies:
- Network Analysis: Examines the followers of your followers
- Common Interest Analysis: Identifies users that your followers also follow
Each potential candidate is evaluated against several criteria:
- Following count <
MAX_FOLLOWING
- Followers count >
MIN_FOLLOWERS
and <MAX_FOLLOWERS
- Active within the last
INACTIVITY_DAYS
days - Following/followers ratio ≥
FOLLOW_RATIO_THRESHOLD
- Follows each qualified candidate with a random delay
- Reports success or failure for each follow attempt
- Provides a summary of the operation
Function | Purpose |
---|---|
get_user_info() |
Retrieves profile information for a specific user |
get_my_info() |
Gets authenticated user information |
get_user_activity() |
Determines how recently a user has been active |
get_my_followers() |
Retrieves complete list of authenticated user's followers |
get_my_following() |
Gets list of users the authenticated user follows |
get_user_followers() |
Retrieves followers of a specific user |
get_user_following() |
Gets list of users a specific user follows |
follow_user() |
Executes the GitHub API call to follow a user |
is_good_follow_candidate() |
Evaluates if a user meets all criteria for following |
find_potential_follows() |
Implements the candidate search strategies |
main() |
Orchestrates the entire follow process |
- Update the
TOKEN
constant 93F5 with your personal GitHub token - Adjust the criteria parameters if needed
- Run the script with Python:
python main.py
- Run Infrequently: Running the script once every few days helps maintain a natural growth pattern
- Adjust Parameters: Fine-tune the configuration based on your GitHub account size and target audience
- Monitor Results: Track your follow-back rate to optimize parameters
- Subject to GitHub API rate limits (5,000 requests per hour for authenticated requests)
- Limited to public user data available through the GitHub API
- Cannot guarantee that selected users will follow back
Keep your GitHub token secure. The token included in the script should be replaced with your own and never shared publicly.
This script is designed for legitimate network building and should be used responsibly. Avoid excessive use that might be considered spam or manipulation of GitHub's platform.
This project is licensed under the MIT License - see the LICENSE file for details.