A dangerous and fun Rust CLI tool that uses quantum randomness to execute random git commands. Use at your own risk!
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!
- Make sure you have Rust installed: https://rustup.rs/
- Clone or download this project
- Build the project:
cargo build --release
- The binary will be available at
target/release/rgr
You need an API key from the Australian National University's Quantum Random Number Service:
- Visit: https://quantumnumbers.anu.edu.au/
- Sign up for an account
- Get your API key from the dashboard
You have multiple options for providing your API key (in order of priority):
Create a config file at ~/.rgr_config:
echo "RGR_API_KEY=your_secret_api_key_here" > ~/.rgr_config
export RGR_API_KEY="your_secret_api_key_here" # Add to your ~/.bashrc or ~/.zshrc to make it permanent
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.
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
Execute the random command with confirmation:
./rgr
Execute without any confirmation (extremely dangerous):
./rgr --force
-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
- Dry run mode: See what would happen without actually doing it
- Confirmation prompts: Ask before executing (unless
--forceis 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
# 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
- Quantum Randomness: Fetches truly random numbers from ANU's quantum API
- Git Command Discovery: Automatically discovers available git commands on your system
- Random Selection: Uses quantum randomness to select a command
- Safety Checks: Warns about dangerous commands and adds safety arguments where possible
Make sure git is installed and available in your PATH.
- Check your API key is correct
- Ensure you have internet connectivity
- Verify the API key has sufficient quota
Make sure you're in a directory where git is available and properly installed.
- 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
MIT License - Use responsibly!
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" ๐ฒ