Fetch comprehensive GitHub user data including profile, repositories, contributions, pull requests, issues, and statistics. Use when the user asks to fetch, download, or analyze GitHub user data.
Fetch comprehensive data about any GitHub user through the GitHub API, including profile information, repositories, contributions, social connections, and detailed statistics.
Fetch public data for any GitHub user:
python scripts/fetch.py \
--username "torvalds" \
--output "./github_data"
Use a GitHub Personal Access Token to access more data and higher rate limits:
python scripts/fetch.py \
--username "torvalds" \
--token "ghp_YOUR_TOKEN_HERE" \
--output "./github_data"
Or use environment variable:
export GITHUB_TOKEN="ghp_YOUR_TOKEN_HERE"
python scripts/fetch.py --username "torvalds"
Data is organized in a clean directory structure:
github_data/
└── {username}/
├── profile.json # User basic info
├── repositories/
│ ├── list.json # Repository summary
│ └── details/{repo}.json # Each repository details
├── gists/
│ ├── list.json
│ └── details/{gist_id}.json
├── starred/repositories.json
├── social/
│ ├── followers.json
│ └── following.json
├── organizations.json
├── events/public_events.json
├── subscriptions.json
├── contributions/calendar.json # Requires token
├── pull_requests/created.json
├── issues/created.json
├── statistics/
│ ├── languages.json # Language distribution
│ └── repositories.json # Repo stats
└── metadata.json # Fetch metadata
read:user, repo (for private repos if needed)--token or set as GITHUB_TOKEN environment variablepython scripts/fetch.py \
--username "octocat" \
--output "./my_custom_folder"
If you have GitHub CLI (gh) installed and authenticated:
# The script will automatically detect gh CLI authentication
python scripts/fetch.py --username "username"
The fetched data provides comprehensive insights for evaluating:
python scripts/fetch.py \
--username "torvalds" \
--output "./linux_creator_data"
export GITHUB_TOKEN="ghp_YOUR_TOKEN"
python scripts/fetch.py \
--username "yourusername" \
--output "./my_github_data"
for user in "torvalds" "gvanrossum" "dhh"; do
python scripts/fetch.py --username "$user" --output "./github_users"
done
The script handles common errors gracefully:
After fetching, the script displays:
Solution: Use a Personal Access Token for higher limits
Solution: Ensure you have a valid Personal Access Token for contribution calendar
Solution: Check username spelling and network connection