New Feature: Persistent GitHub Token Management
Save your GitHub Personal Access Token locally and never type it again! This release introduces a convenient configuration system that remembers your authentication credentials.
What's New
Token Storage Commands
# Save your token once
git-ripper config set-token <token>
# View saved token (masked)
git-ripper config get-token
# View full configuration
git-ripper config show
# Remove saved token
git-ripper config remove-tokenSmart Token Resolution
Git-ripper now checks for tokens in this priority order:
--gh-tokenflag - Highest priorityGIT_RIPPER_TOKENenvironment variable - Medium priority- Saved config - Lowest priority, most convenient
Quick Start
# One-time setup
git-ripper config set-token ghp_YourTokenHere
# Now just download - token used automatically!
git-ripper https://github.com/yourname/private-repo/tree/main/src
# Output: Using GitHub token from saved config
# Works with all commands
git-ripper https://github.com/user/repo/tree/main/folder --zip
git-ripper https://github.com/user/repo/tree/main/src -o ./outputSecurity
- Config stored at
~/.git-ripper/config.json - File permissions:
600(owner read/write only) - Tokens are masked in display:
ghp_***************3456 - Plain text storage - keep your system secure
Benefits
- Convenience - Set once, use everywhere
- No repetitive typing - Forget about
--gh-tokenflags - Higher rate limits - 5,000 requests/hour (vs 60 unauthenticated)
- Private repo access - Download from repos you have access to
- Familiar UX - Works like
git,npm,ghCLI tools - Backward compatible - Existing workflows unchanged
Full Changelog
Added
config set-token <token>- Save GitHub token persistentlyconfig get-token- Display saved token (masked)config remove-token- Delete saved tokenconfig show- Display full configuration with all token sources- Automatic token resolution from config, environment, or CLI
- Visual feedback showing which token source is being used
- New
ConfigManagermodule for centralized configuration - 15 comprehensive tests for config management
- Detailed token setup guide in README
Changed
- CLI help now shows
configsubcommand - Downloads automatically use saved token when available
- README expanded with token management documentation
Security
- Config directory created with secure permissions
- Token masking in all display commands
- Clear security warnings and best practices
Installation
# Update to latest
npm install -g git-ripper@latest
# Or use directly
npx git-ripper@latestUpgrade Notes
No breaking changes! All existing commands work identically.
If you were using --gh-token repeatedly, you can now simplify:
Before:
git-ripper <url> --gh-token ghp_xxx
git-ripper <url> --gh-token ghp_xxx
git-ripper <url> --gh-token ghp_xxxAfter:
git-ripper config set-token ghp_xxx # once
git-ripper <url> # easy!
git-ripper <url>
git-ripper <url>Documentation
See the Authentication section in the README for:
- How to generate GitHub tokens
- Fine-grained vs Classic token setup
- Token management best practices
- Security recommendations
Bug Fixes
None in this release - pure feature addition!
Release Stats
- Version: 1.5.3 → 1.6.0
- Type: Minor release (new features, no breaking changes)
- New code: ~400 lines
- New tests: 15 (all passing)
- Files changed: 4
- Files added: 2
Thank You
Thanks to everyone who requested this feature and provided feedback. Your input helps make git-ripper better!
Found a Bug?
Report issues at: https://github.com/sairajB/git-ripper/issues
Support the Project
If you find git-ripper useful, consider:
- Starring the repository
- Reporting bugs or requesting features
- Contributing to documentation
- Sponsoring development
Happy downloading!