A utility that allows running Claude Code CLI with root privileges by creating a temporary non-root user and bypassing permission restrictions.
- π Safe Root Bypass - Creates temporary user instead of running as root
- π Two Operating Modes - Current directory or interactive workspace selection
- β‘ Full System Access - Sudo privileges for system administration tasks
- π§ Easy Installation - One-line installer script
- π‘οΈ Security Focused - Temporary user with controlled permissions
- Docker Containers running as root
- Server Administration scenarios
- CI/CD Pipelines requiring elevated permissions
- Development Environments in sandboxed systems
curl -sSL https://raw.githubusercontent.com/gagarinyury/claude-code-root-runner/main/install.sh | sudo bash# Download scripts
sudo curl -fsSL https://raw.githubusercontent.com/gagarinyury/claude-code-root-runner/main/claude-plus.sh -o /usr/local/bin/claude+
sudo curl -fsSL https://raw.githubusercontent.com/gagarinyury/claude-code-root-runner/main/claude-workspace.sh -o /usr/local/bin/claudew
# Make executable
sudo chmod +x /usr/local/bin/claude+ /usr/local/bin/claudewWorks in your current directory - perfect for quick tasks and server administration.
# Basic usage
claude+ "check system status and running services"
# File operations in current directory
claude+ "create a backup script for important configs"
# System administration
claude+ "analyze nginx logs and suggest optimizations"Prompts you to choose or create a working directory - ideal for projects.
# Interactive workspace selection
claudew "create a new web application"
# Will prompt: Enter workspace directory path: /home/projects/myapp
# Project development
claudew "build a REST API with authentication"
# Will prompt: Enter workspace directory path: /var/www/apiπ§ System Administration
# Check what's using port 80
claude+ "find what process is using port 80 and show its configuration"
# Service management
claude+ "restart nginx and check if it started successfully"
# Log analysis
claude+ "analyze the last 50 lines of system logs for errors"
# Disk cleanup
claude+ "find large files over 100MB and suggest cleanup options"π» Development Projects
# Create new project
claudew "create a Python Flask API with user authentication"
# Choose: /home/projects/flask-api
# Full-stack development
claudew "build a React + Node.js todo application"
# Choose: /var/www/todo-app
# Infrastructure as code
claudew "create Docker setup for a microservices architecture"
# Choose: /home/docker-projects/microservicesπ οΈ Configuration Management
# Nginx configuration
claude+ "create an optimized nginx config for a high-traffic website"
# SSL setup
claude+ "configure Let's Encrypt SSL certificate for my domain"
# Database administration
claude+ "optimize PostgreSQL configuration for better performance"- Creates temporary user
claude-tempwith sudo privileges - Copies Claude configuration from root to temporary user
- Transfers ownership of working directory to temporary user
- Runs Claude CLI with
--dangerously-skip-permissionsflag - Restores ownership back to root after completion
- Trusted Environments Only - Use only in sandboxed or trusted environments
- Temporary User -
claude-tempuser persists between runs for performance - Sudo Access - Temporary user has full sudo privileges for system tasks
- File Permissions - Directory ownership is temporarily modified during execution
- Root/sudo access for installation and execution
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Linux/Unix system with
useradd,sudo, andsucommands
# Remove scripts
sudo rm /usr/local/bin/claude+ /usr/local/bin/claudew
# Remove temporary user (optional)
sudo userdel -r claude-temp
sudo rm /etc/sudoers.d/claude-tempContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
MIT License - see LICENSE file for details.
If this tool helps you, please consider giving it a star on GitHub!
Disclaimer: This tool bypasses Claude Code CLI security restrictions. Use responsibly and only in environments where you understand the security implications.