Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

๐ŸŽฐ Russian Git Roulette (rgr) ๐ŸŽฐ

A dangerous and fun Rust CLI tool that uses quantum randomness to execute random git commands. Use at your own risk!

โš ๏ธ WARNING โš ๏ธ

This tool can execute ANY git command randomly, including potentially destructive ones like git reset, git clean, etc. Always use --dry-run first and make sure you have backups of important work!

๐Ÿš€ Installation

  1. Make sure you have Rust installed: https://rustup.rs/
  2. Clone or download this project
  3. Build the project:
cargo build --release
  1. The binary will be available at target/release/rgr

๐Ÿ”‘ Getting a Quantum API Key

You need an API key from the Australian National University's Quantum Random Number Service:

  1. Visit: https://quantumnumbers.anu.edu.au/
  2. Sign up for an account
  3. Get your API key from the dashboard

๐Ÿ”ง Setting Up Your API Key

You have multiple options for providing your API key (in order of priority):

Option 1: Config File (Recommended)

Create a config file at ~/.rgr_config:

echo "RGR_API_KEY=your_secret_api_key_here" > ~/.rgr_config

Option 2: Environment Variable

export RGR_API_KEY="your_secret_api_key_here"
# Add to your ~/.bashrc or ~/.zshrc to make it permanent

Option 3: CLI Flag

rgr --api-key your_secret_api_key_here --dry-run

Security Note: The config file and environment variable methods are more secure since they don't expose your API key in command line history or process lists.

๐ŸŽฒ Usage

Safe Mode (Recommended)

Always start with a dry run to see what command would be executed:

# If you have API key in config file or environment
./rgr --dry-run
# Or with CLI flag
./rgr --api-key YOUR_API_KEY --dry-run

Live Dangerously

Execute the random command with confirmation:

./rgr

Full YOLO Mode

Execute without any confirmation (extremely dangerous):

./rgr --force

Command Line Options

  • -k, --api-key <KEY>: Your quantum API key (optional if set via env var or config file)
  • -d, --dry-run: Show what command would be executed without running it
  • -f, --force: Execute without confirmation prompt
  • -h, --help: Show help information
  • -V, --version: Show version information

๐Ÿ›ก๏ธ Safety Features

  • Dry run mode: See what would happen without actually doing it
  • Confirmation prompts: Ask before executing (unless --force is used)
  • Dangerous command warnings: Special warnings for potentially destructive commands
  • Safety arguments: Some dangerous commands get safer default arguments
  • Command validation: Only executes actual git commands

๐ŸŽฏ Examples

# Safe exploration (with config file setup)
./rgr -d
# Careful execution
./rgr
# Using environment variable
export RGR_API_KEY="your_secret_api_key"
./rgr -d
# Using CLI flag (less secure)
./rgr -k YOUR_API_KEY -d
# Setup config file
echo "RGR_API_KEY=your_secret_api_key" > ~/.rgr_config
./rgr --dry-run

๐Ÿ”ง How It Works

  1. Quantum Randomness: Fetches truly random numbers from ANU's quantum API
  2. Git Command Discovery: Automatically discovers available git commands on your system
  3. Random Selection: Uses quantum randomness to select a command
  4. Safety Checks: Warns about dangerous commands and adds safety arguments where possible

๐Ÿ› Troubleshooting

"Git help command failed"

Make sure git is installed and available in your PATH.

"Quantum API request failed"

  • Check your API key is correct
  • Ensure you have internet connectivity
  • Verify the API key has sufficient quota

"No git commands found"

Make sure you're in a directory where git is available and properly installed.

๐ŸŽฎ Fun Ideas

  • Use in a CI/CD pipeline for chaos engineering (please don't)
  • Create git aliases for different risk levels
  • Combine with other tools for maximum chaos
  • Use as a learning tool to discover new git commands

๐Ÿ“œ License

MIT License - Use responsibly!

๐Ÿšจ Disclaimer

This tool is for educational and entertainment purposes. The authors are not responsible for any data loss, repository corruption, or other damages caused by using this tool. Always backup your work and use version control responsibly!

Remember: With great randomness comes great responsibility! ๐Ÿ•ท๏ธ


"In git we trust, in quantum we randomize" ๐ŸŽฒ

About

Russian Git Roulette

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /