Skip to content

Release v1.6.0 - Local Token Storage

Latest

Choose a tag to compare

@sairajB sairajB released this 01 Feb 10:29
· 7 commits to main since this release

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-token

Smart Token Resolution

Git-ripper now checks for tokens in this priority order:

  1. --gh-token flag - Highest priority
  2. GIT_RIPPER_TOKEN environment variable - Medium priority
  3. 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 ./output

Security

  • 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-token flags
  • 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, gh CLI tools
  • Backward compatible - Existing workflows unchanged

Full Changelog

Added

  • config set-token <token> - Save GitHub token persistently
  • config get-token - Display saved token (masked)
  • config remove-token - Delete saved token
  • config 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 ConfigManager module for centralized configuration
  • 15 comprehensive tests for config management
  • Detailed token setup guide in README

Changed

  • CLI help now shows config subcommand
  • 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@latest

Upgrade 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_xxx

After:

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:


Happy downloading!