| Crates.io | gh-export |
| lib.rs | gh-export |
| version | 1.0.0 |
| created_at | 2025-07-18 09:37:53.776783+00 |
| updated_at | 2025-07-18 09:37:53.776783+00 |
| description | Export all GitHub repositories from a user account |
| homepage | |
| repository | https://github.com/guitaripod/gh-export |
| max_upload_size | |
| id | 1758802 |
| size | 117,888 |
A fast and reliable GitHub repository exporter written in Rust. Export all repositories from a GitHub user account with a single command.
git clone https://github.com/guitaripod/gh-export
cd gh-export
cargo install --path .
cargo install gh-export
gh-export
The tool will guide you through:
gh-export
# Export all repositories (interactive setup on first run)
gh-export
# Export with explicit token
gh-export --token YOUR_GITHUB_TOKEN
# Export to specific directory
gh-export --output /path/to/backup
# Sync existing repositories
gh-export sync
# Show last export status
gh-export status
# Show current configuration
gh-export config show
# Set configuration values
gh-export config set token YOUR_TOKEN
gh-export config set output /new/path
gh-export config set parallel 6
# Clear configuration
gh-export config clear
# Include archived repositories
gh-export --include-archived
# Exclude forked repositories
gh-export --exclude-forks
# Shallow clone (faster, no history)
gh-export --shallow
# Adjust parallel downloads (default: 4)
gh-export --parallel 8
# Filter repositories by name
gh-export --filter "rust"
# Quiet mode
gh-export --quiet
# Verbose logging
gh-export --verbose
You'll need a GitHub personal access token with appropriate permissions:
repo - Full control of private repositories (includes public)public_repo - Access to public repositories onlyRepositories are organized by username:
output_directory/
├── username/
│ ├── repo1/
│ ├── repo2/
│ └── .gh-export-metadata.json
Configuration is stored in:
~/.config/gh-export/config.toml%APPDATA%\gh-export\config.tomlExample configuration:
github_token = "ghp_..."
output_directory = "/home/user/github-backup"
parallel_downloads = 4
include_archived = false
exclude_forks = false
shallow_clone = false
GITHUB_TOKEN - GitHub personal access token (overrides config file)Requirements:
git clone https://github.com/guitaripod/gh-export
cd gh-export
cargo build --release
The binary will be in target/release/gh-export.
MIT License - see LICENSE file for details.