Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (claude-yolo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Claude YOLO
A wrapper for the Claude CLI that can run in YOLO mode (bypassing all safety checks) OR Safe mode (standard Claude CLI behavior).
⚠️ SECURITY WARNING: YOLO mode bypasses important safety checks! This completely bypasses the "human in the loop" checks, this could delete your data, leak your secrets and even brick your computer. Use at your own risk.
What's New in This Fork 🎉
This fork adds SAFE MODE support and more! You can now:
- Switch between YOLO and SAFE modes
- Use the handy
clbash wrapper for quick mode switching - Mode preference is saved between sessions
- NEW: Auto-start Claude after mode switch
- NEW: YOLO mode works even as root user
Installation
# Install from this fork
npm install -g github:maxparez/claude-yolo
# Or install the original
npm install -g claude-yoloThe first time you run claude-yolo, you will be presented with a consent prompt explaining the security implications. You must explicitly agree to continue.
Your consent choice is remembered for future runs.
New Safe Mode Feature 🛡️
Using command-line flags
# Run in SAFE mode (normal Claude CLI behavior)
claude-yolo --safe
claude-yolo --no-yolo
# Run in YOLO mode (default)
claude-yoloUsing mode commands
# Switch to YOLO mode
claude-yolo mode yolo
# Switch to SAFE mode
claude-yolo mode safe
# Check current mode
claude-yolo modeUsing the cl wrapper script (Recommended!)
For even easier mode management, use the included cl bash wrapper:
# Install globally during npm install
npm install -g github:maxparez/claude-yolo
# Or copy manually to your PATH
cp node_modules/claude-yolo/bin/cl /usr/local/bin/cl
chmod +x /usr/local/bin/cl
# Now you can use:
cl /YON # Switch to YOLO mode AND start Claude
cl /YOFF # Switch to SAFE mode AND start Claude
cl /STATUS # Show current mode (without starting Claude)
cl /HELP # Show help
# Run Claude in current mode
cl "write a hello world function"
# Switch mode and run with command
cl /YON "create a web server"Mode preference is saved in ~/.claude_yolo_state and persists between sessions.
Visual Mode Indicators
The tool now shows clear visual indicators of which mode you're in:
- YOLO Mode:
[YOLO]prefix in yellow 🔥 - SAFE Mode:
[SAFE]prefix in cyan 🛡️
Root User Support
Unlike the standard Claude CLI, this fork allows YOLO mode to run even as root user:
- Standard Claude CLI blocks
--dangerously-skip-permissionswhen running as root - This fork bypasses that check in YOLO mode
- You'll see a warning when running as root, but it will work
- SAFE mode respects all original Claude CLI security features
Usage
claude-yolo [options]All arguments and options are passed directly to the Claude CLI.
This wrapper in YOLO mode:
- Checks for and automatically installs updates to the Claude package
- Displays "🔥 YOLO MODE ACTIVATED 🔥" warning in yellow text
- Creates a modified copy of the Claude CLI code to bypass permission checks
- Replaces all
getIsDocker()calls withtrue - Replaces all
hasInternetAccess()calls withfalse - Bypasses root user checks (process.getuid() === 0)
- Adds colorful YOLO-themed loading messages
- Replaces all
- Leaves the original Claude CLI file untouched (won't affect your normal
claudecommand) - Adds the
--dangerously-skip-permissionsflag to command line arguments - Imports the modified copy of the CLI
In SAFE mode, it simply runs the original Claude CLI without modifications.
New in Version 1.8.0 (This Fork)
- Auto-start on Mode Switch:
cl /YONandcl /YOFFnow automatically start Claude after switching - Root User Bypass: YOLO mode now works even when running as root/sudo
- Improved cl Wrapper: More intuitive behavior with auto-start feature
- Better Error Handling: Clearer messages when running as root
New in Version 1.7.0 (This Fork)
- SAFE Mode Support: Run Claude with normal safety checks using
--safeor--no-yolo - Mode Persistence: Your mode choice is saved in
~/.claude_yolo_state - Mode Commands: Use
claude-yolo mode [yolo|safe]to switch modes - Bash Wrapper: Included
clscript for easy mode switching - Visual Mode Indicators: Clear
[YOLO]or[SAFE]prefixes
Features
- Auto-update: Automatically checks for and installs updates to the Claude package at runtime
- Non-destructive approach: Creates a separate modified copy of the CLI file instead of modifying the original
- Safe for global installations: Your regular
claudecommand will work normally even after installing claude-yolo - Debug mode: Set the
DEBUG=1environment variable to see detailed logs about the modifications
Why?
Sometimes you just want to YOLO and skip those pesky permission checks. But sometimes you want the safety checks back! This fork gives you the best of both worlds.
Debugging
If you encounter any issues, you can run with debug output:
DEBUG=1 claude-yoloThis will show additional information about:
- Claude package update checks
- Current and latest available versions
- When updates are being installed
- Modifications being made to the CLI file
- Root bypass operations
Auto-Update Feature
Claude YOLO automatically checks for updates to the Claude package each time it runs:
- When you run
claude-yolo, it checks for the latest version of@anthropic-ai/claude-codeon npm - If your installed version is outdated, it will:
- Update your package.json with the latest version
- Run npm install to get the newest version
- Notify you that an update was applied
- This ensures you're always using the latest Claude CLI features
Important Security Disclaimer
This is an unofficial tool and not supported by Anthropic. Use at your own risk.
SECURITY WARNING:
- YOLO mode bypasses safety mechanisms intentionally built into the Claude CLI
- The
--dangerously-skip-permissionsflag was designed for use in container environments - This fork additionally bypasses root user restrictions in YOLO mode
- By using this tool in YOLO mode, you acknowledge that:
- Important safety checks are being bypassed
- Claude may access files it normally would not have permission to access
- Running as root with bypassed permissions is extremely dangerous
- You accept full responsibility for any security implications
Anthropic designed these safety checks for good reason. Only use YOLO mode if you fully understand and accept these risks. Use SAFE mode when you want the standard Claude CLI protections.