Get up and running with GitHub Archiver in 5 minutes.
# Using npm
npm install -g github-archiver
# Or using Bun (faster)
bun install -g github-archivergit clone https://github.com/mynameistito/github-archiver.git
cd github-archiver
# Using Bun (recommended)
bun install
bun run build
bun run dev -- <command>
# Or using npm
npm install
npm run build
npm run dev -- <command>Note: This project is optimized for Bun. If you don't have Bun, install it from https://bun.sh
- Go to https://github.com/settings/tokens/new
- Create a new token with
reposcope - Copy the token (you'll need it in the next step)
github-archiver auth loginPaste your token when prompted. It's saved securely in ~/.github-archiver/config.json.
github-archiver archiveYour default text editor opens. Enter repository URLs (one per line), save, and exit.
Supported formats:
https://github.com/facebook/react
torvalds/linux
git@github.com:owner/repo.git
Create a file repos.txt:
facebook/react
torvalds/linux
google/go
Run:
github-archiver archive --file repos.txtcat repos.txt | github-archiver archive --stdinYou'll see a preview of repositories to archive. Confirm with y and watch the progress:
[============================ ] 5/5 (100%) - microsoft/vscode
╔════════════════════════════════════╗
║ Archive Operation Summary ║
╠════════════════════════════════════╣
║ ✅ Successful: 5 ║
║ ⚠️ Skipped: 0 ║
║ ❌ Failed: 0 ║
╠════════════════════════════════════╣
║ Total: 5 ║
║ Duration: 1m 23s ║
╚════════════════════════════════════╝
✅ All repositories processed successfully!
github-archiver auth statusgithub-archiver archive --file repos.txt --dry-rungithub-archiver archive --file repos.txt --concurrency 10github-archiver archive --file repos.txt --forcegithub-archiver archive --file repos.txt --verbosegithub-archiver auth logoutgithub-archiver auth login- Make sure you're the repository owner
- Check your token has
reposcope at https://github.com/settings/tokens
- Verify the repository URL is correct
- Check you have access to the repository
- Wait a few minutes (GitHub rate limit resets hourly)
- Use lower concurrency:
--concurrency 1
- See detailed documentation in README.md
- Check the troubleshooting section
- Open an issue at https://github.com/mynameistito/github-archiver/issues
- Read the full README.md for all options
- Check CONTRIBUTING.md to help improve the project
- Review CHANGELOG.md to see what's new
- Explore the source code in the
src/directory
github-archiver archive --file my-repos.txt --forcegithub-archiver archive --file my-repos.txt --dry-rungithub-archiver archive --file my-repos.txt --concurrency 10 --forceecho -e "facebook/react\ntorvalds/linux\nmicrosoft/vscode" | github-archiver archive --stdin --forcerepos.txt:
# Archive these repositories
https://github.com/facebook/react
https://github.com/torvalds/linux.git
# You can also use shorthand
google/go
microsoft/vscode
# SSH format works too
git@github.com:owner/private-repo.git
# Empty lines and comments are ignored
# The following has invalid format and will be skipped
this-is-invalid-!!!
- Archived repositories are read-only
- Collaborators can still see archived repos (they just can't push)
- You can unarchive repositories anytime in GitHub
- The CLI doesn't delete repositories, only archives them
- Logs are saved to
~/.github-archiver/logs/
- Start small: Test with 2-3 repositories first
- Use dry-run: Always validate with
--dry-runif you're unsure - Save your list: Keep your repos.txt file for reference
- Check permissions: Verify you have push access before running
- Monitor progress: Watch the progress bar and ETA
Happy archiving! 🎉