Powerful Python utility for automating comprehensive backups of your GitHub repositories and gists
Downloads code as .zip archives with parallel processing, detailed reporting, and system automation.
Complete Backup Solution: GitHub Repository Backup Tool downloads all your repositories and gists as .zip archives for safe keeping. With parallel processing for speed, detailed reporting for insight, and robust error handling, it ensures your code is always backed up.
Prerequisites
Installation & First Run
git clone https://github.com/aixandrolab/github-repos-downloader.git cd github-repos-downloader python app.py -t # Set your GitHub token
Basic Usage
| Argument | Description | Default |
|---|---|---|
-r, --repos | Download your repositories | False |
-g, --gists | Download your gists | False |
-t, --token | Update or set your stored GitHub token | False |
--no-archive | Do not create a final .zip archive of the backup folder | False (archive is created) |
--timeout N | Set the timeout (in seconds) for each download operation | 30 |
--verbose | Print detailed, real-time information about the download process | False |
--shutdown | Shutdown the computer 60 seconds after the backup finishes | False |
--reboot | Reboot the computer 60 seconds after the backup finishes | False |
Note: --shutdown and --reboot are mutually exclusive.
What Gets Backed Up?
The tool creates snapshot .zip archives of your code at a specific point in time (without full Git history).
[repository-name].zip in the repositories/ folder[gist-id].zip in the gists/ folderFile Structure
~/[your_github_username]_github_downloads/
├── repositories/
│ ├── project-one.zip
│ └── project-two.zip
├── gists/
│ ├── a1b2c3d4.zip
│ └── e5f6g7h8.zip
└── reports/
└── backup_report_20251215_143022.txt
Post-Backup Archiving
By default, after downloading, the entire folder is compressed into a single .zip file and saved to your home directory. Use --no-archive to skip this step.
Optimizing Download Speed
--timeout 120python app.py -r -g --timeout 180Handling API Rate Limits
max_workers parameter if neededTroubleshooting
python app.py -t to update token, ensure repo and gist scopes--timeout 120apt install curl (Ubuntu) or equivalent~/.config/github_repos_downloader/github_token.json