Skip to content

Commit c4662f9

Browse files
authored
Merge pull request #18 from lroolle/feat/ci-release
docs: improve usage examples and emphasize claude-yolo
2 parents b00038a + 4261da3 commit c4662f9

4 files changed

Lines changed: 95 additions & 52 deletions

File tree

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,26 @@ Docker-based Claude Code CLI with full development capabilities and host isolati
88
# One-line install
99
curl -fsSL https://raw.githubusercontent.com/lroolle/claude-code-yolo/main/install.sh | bash
1010

11+
```
12+
13+
14+
```bash
1115
# Navigate to your project and run
1216
cd ~/projects/my-project
13-
claude-yolo .
17+
claude-yolo
1418
```
1519

1620
## ⚠️ CRITICAL SAFETY WARNING
1721

22+
Claude will have **FULL ACCESS** to the current workspace and ALL subdirectories.
23+
24+
Always `cd` to a specific project directory first!
25+
1826
**NEVER run `--yolo` mode in:**
1927
- Your home directory (`$HOME`)
2028
- System directories (`/`, `/etc`, `/usr`, etc.)
2129
- Any directory containing sensitive data
2230

23-
Claude will have **FULL ACCESS** to the current directory and ALL subdirectories. Always `cd` to a specific project directory first!
2431

2532
## How It Works
2633

@@ -42,21 +49,22 @@ The installer provides two commands:
4249

4350
```bash
4451
# YOLO mode (Docker) - recommended
45-
claude-yolo . # Run in current directory
52+
claude-yolo # Run in current directory
4653

4754
# Using claude.sh for more control
48-
claude.sh --yolo . # YOLO mode
49-
claude.sh . # Local mode (no Docker)
50-
claude.sh --auth-with api-key . # Use API key
51-
claude.sh --auth-with bedrock . # Use AWS Bedrock
52-
claude.sh --auth-with vertex . # Use Google Vertex AI
55+
claude.sh --yolo # YOLO mode
56+
claude.sh # Local mode (no Docker)
57+
claude.sh --auth-with api-key # Use API key(may have to rerun `/login`)
58+
claude.sh --auth-with bedrock # Use AWS Bedrock
59+
claude.sh --auth-with vertex # Use Google Vertex AI
5360
claude.sh --shell # Open shell in container
5461
claude.sh --help # Show all options
5562
```
5663

5764
## Authentication Methods
5865

5966
- **Claude App** (default): Uses `~/.claude` OAuth - `--auth-with claude`
67+
- Run `/login` in claude-code, open the oauth link, then paste the code back in the terminal
6068
- **API Key**: Set `ANTHROPIC_API_KEY` environment variable - `--auth-with api-key`
6169
- If OAuth exists, use `/login` in Claude to switch to API key auth
6270
- **AWS Bedrock**: Uses `~/.aws` credentials - `--auth-with bedrock`
@@ -71,7 +79,7 @@ For GitHub operations (creating PRs, managing repos), set the `GH_TOKEN` environ
7179
export GH_TOKEN="ghp_xxxxxxxxxxxx"
7280

7381
# Now gh commands work in containers
74-
claude-yolo .
82+
claude-yolo
7583
# Inside container: gh pr create, gh issue list, etc.
7684
```
7785

@@ -83,17 +91,20 @@ You can mount additional configuration files or directories using the `-v` flag:
8391

8492
```bash
8593
# Mount Git configuration
86-
claude-yolo -v ~/.gitconfig:/root/.gitconfig .
94+
claude-yolo -v ~/.gitconfig:/root/.gitconfig
8795

8896
# Mount SSH keys (read-only)
89-
claude-yolo -v ~/.ssh:/root/.ssh:ro .
97+
claude-yolo -v ~/.ssh:/root/.ssh:ro
98+
99+
# Resume with SSH keys and tracing enabled
100+
claude-yolo -v ~/.ssh:/root/.ssh:ro --trace --continue
90101

91102
# Multiple mounts
92-
claude-yolo -v ~/tools:/tools -v ~/data:/data .
103+
claude-yolo -v ~/tools:/tools -v ~/data:/data
93104

94105
# Mount custom tool configs
95-
claude-yolo -v ~/.config/gh:/root/.config/gh .
96-
claude-yolo -v ~/.terraform.d:/root/.terraform.d .
106+
claude-yolo -v ~/.config/gh:/root/.config/gh
107+
claude-yolo -v ~/.terraform.d:/root/.terraform.d
97108
```
98109

99110
**Note**: Volumes mounted to `/root/*` are automatically symlinked to `/home/claude/*` for non-root user access.
@@ -106,6 +117,21 @@ claude-yolo -v ~/.terraform.d:/root/.terraform.d .
106117
- **Request Tracing**: Debug with `--trace` flag using claude-trace
107118
- **Docker Socket**: Optional mounting with `CLAUDE_YOLO_DOCKER_SOCKET=true`
108119

120+
## Docker Images
121+
122+
Claude Code YOLO is available from multiple container registries:
123+
124+
```bash
125+
# GitHub Container Registry (recommended, primary)
126+
docker pull ghcr.io/lroolle/claude-code-yolo:latest
127+
128+
# Docker Hub (fallback)
129+
docker pull lroolle/claude-code-yolo:latest
130+
131+
# Use specific registry
132+
DOCKER_IMAGE=lroolle/claude-code-yolo claude-yolo
133+
```
134+
109135
## Manual Setup
110136

111137
```bash
@@ -117,7 +143,7 @@ cd claude-code-yolo
117143
make build
118144

119145
# Run directly
120-
./claude.sh --yolo .
146+
./claude.sh --yolo
121147
```
122148

123149
## Inspired by
@@ -126,4 +152,3 @@ make build
126152
- **[meal/claude-code-cli](https://github.com/meal/claude-code-cli)** - Containerized Claude Code with ready-to-use Docker setup
127153
- **[gagarinyury/claude-code-root-runner](https://github.com/gagarinyury/claude-code-root-runner)** - Root privilege bypass for Claude Code using temporary users
128154
- **[textcortex/claude-code-sandbox](https://github.com/textcortex/claude-code-sandbox)** - Full sandbox environment with web UI and autonomous workflows
129-

claude-yolo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ parse_args() {
104104
echo " Can be used multiple times"
105105
echo ""
106106
echo "Examples:"
107-
echo " claude-yolo . # Run Claude in YOLO mode"
107+
echo " claude-yolo # Run Claude in YOLO mode"
108108
echo " claude-yolo --inspect # Quick access to running container"
109109
echo " claude-yolo --ps # See project containers"
110-
echo " claude-yolo -v ~/.gitconfig:/root/.gitconfig . # Mount git config"
111-
echo " claude-yolo -v ~/.ssh:/root/.ssh:ro . # Mount SSH keys read-only"
112-
echo " claude-yolo -v ~/tools:/tools -v ~/data:/data . # Multiple mounts"
110+
echo " claude-yolo -v ~/.gitconfig:/root/.gitconfig # Mount git config"
111+
echo " claude-yolo -v ~/.ssh:/root/.ssh:ro # Mount SSH keys read-only"
112+
echo " claude-yolo -v ~/tools:/tools -v ~/data:/data # Multiple mounts"
113113
exit 0
114114
;;
115115
*)

claude.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -e
44
# Claude Starter Script with Docker Support
55
# Runs Claude Code CLI locally or in a Docker container for safe execution
66

7-
VERSION="0.2.0"
8-
DOCKER_IMAGE="${DOCKER_IMAGE:-lroolle/claude-code-yolo}"
7+
VERSION="0.2.2"
8+
DOCKER_IMAGE="${DOCKER_IMAGE:-ghcr.io/lroolle/claude-code-yolo}"
99
DOCKER_TAG="${DOCKER_TAG:-latest}"
1010

1111
DEFAULT_ANTHROPIC_MODEL="sonnet-4"
@@ -69,15 +69,15 @@ show_help() {
6969
echo "Available models: sonnet-4, opus-4, sonnet-3-7, sonnet-3-5, haiku-3-5, sonnet-3, opus-3, haiku-3, deepseek-r1"
7070
echo ""
7171
echo "Examples:"
72-
echo " $0 . # Claude app auth (default)"
73-
echo " $0 --auth-with api-key . # Use API key"
74-
echo " $0 --auth-with bedrock . # Use AWS Bedrock"
75-
echo " $0 --auth-with vertex . # Use Google Vertex AI"
76-
echo " $0 --yolo . # YOLO mode with default auth"
77-
echo " $0 --yolo --auth-with bedrock . # YOLO mode with Bedrock"
78-
echo " $0 --yolo -v ~/.ssh:/root/.ssh:ro . # YOLO mode with volume mount"
79-
echo " ANTHROPIC_MODEL=opus-4 $0 . # Use Opus 4 with default auth"
80-
echo " GH_TOKEN=ghp_xxx $0 --yolo . # YOLO mode with GitHub CLI auth"
72+
echo " $0 # Claude app auth (default)"
73+
echo " $0 --auth-with api-key # Use API key"
74+
echo " $0 --auth-with bedrock # Use AWS Bedrock"
75+
echo " $0 --auth-with vertex # Use Google Vertex AI"
76+
echo " $0 --yolo # YOLO mode with default auth"
77+
echo " $0 --yolo --auth-with bedrock # YOLO mode with Bedrock"
78+
echo " $0 --yolo -v ~/.ssh:/root/.ssh:ro # YOLO mode with volume mount"
79+
echo " ANTHROPIC_MODEL=opus-4 $0 # Use Opus 4 with default auth"
80+
echo " GH_TOKEN=ghp_xxx $0 --yolo # YOLO mode with GitHub CLI auth"
8181
echo ""
8282
}
8383

install.sh

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,34 @@ set -e
33

44
# Claude Code YOLO Quick Installer
55

6-
INSTALL_DIR="$HOME/.local/bin"
76
SCRIPT_NAME="claude.sh"
87
YOLO_WRAPPER="claude-yolo"
9-
DOCKER_IMAGE="lroolle/claude-code-yolo:latest"
8+
DOCKER_IMAGE="ghcr.io/lroolle/claude-code-yolo:latest"
109
GITHUB_RAW="https://raw.githubusercontent.com/lroolle/claude-code-yolo/main"
1110

1211
echo "Claude Code YOLO Installer"
1312
echo "=========================="
1413
echo ""
1514

16-
# Create install directory if it doesn't exist
17-
if [ ! -d "$INSTALL_DIR" ]; then
15+
if [ -d "$HOME/.local/bin" ] && [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
16+
INSTALL_DIR="$HOME/.local/bin"
17+
echo "Installing to: $INSTALL_DIR (user directory)"
18+
elif [ -w "/usr/local/bin" ]; then
19+
INSTALL_DIR="/usr/local/bin"
20+
echo "Installing to: $INSTALL_DIR (system directory)"
21+
else
22+
INSTALL_DIR="$HOME/.local/bin"
23+
echo "Installing to: $INSTALL_DIR (user directory)"
1824
echo "Creating $INSTALL_DIR..."
1925
mkdir -p "$INSTALL_DIR"
20-
fi
2126

22-
# Check if ~/.local/bin is in PATH
23-
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
24-
echo "warning: $INSTALL_DIR is not in PATH"
25-
echo "Add this to your shell profile:"
26-
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
27-
echo ""
27+
# Check if ~/.local/bin is in PATH
28+
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
29+
echo "warning: $INSTALL_DIR is not in PATH"
30+
echo "Add this to your shell profile:"
31+
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
32+
echo ""
33+
fi
2834
fi
2935

3036
# Download claude.sh
@@ -40,12 +46,22 @@ chmod +x "$INSTALL_DIR/$YOLO_WRAPPER"
4046
# Pull Docker image
4147
echo ""
4248
echo "Pulling Docker image..."
43-
docker pull "$DOCKER_IMAGE"
49+
if ! docker pull "$DOCKER_IMAGE"; then
50+
echo "Failed to pull from GitHub Container Registry, trying Docker Hub..."
51+
DOCKER_IMAGE_FALLBACK="lroolle/claude-code-yolo:latest"
52+
docker pull "$DOCKER_IMAGE_FALLBACK"
53+
echo ""
54+
echo -e "\033[93mNOTE: Using Docker Hub fallback image\033[0m"
55+
echo "To use Docker Hub by default, set: export DOCKER_IMAGE=lroolle/claude-code-yolo"
56+
echo "Add this to your shell profile (.bashrc, .zshrc) to make it permanent"
57+
fi
4458

4559
# Success message
4660
echo ""
4761
echo "✓ Installation complete!"
4862
echo ""
63+
echo "Scripts installed to: $INSTALL_DIR"
64+
echo ""
4965
echo "Commands available:"
5066
echo "=================="
5167
echo ""
@@ -60,15 +76,17 @@ echo ""
6076
echo "2. Navigate to your project directory:"
6177
echo " cd ~/projects/my-project"
6278
echo ""
63-
echo "3. Run Claude in YOLO mode:"
64-
echo " claude-yolo ."
79+
echo "3. Start with Claude YOLO:"
80+
echo " claude-yolo # Run Claude with full permissions"
6581
echo ""
66-
echo "4. Or use claude.sh for more options:"
67-
echo " claude.sh --help # Show all options"
68-
echo " claude.sh . # Local mode"
69-
echo " claude.sh --yolo . # YOLO mode"
70-
echo " claude.sh -a . # API key mode"
71-
echo " claude.sh --shell # Docker shell"
82+
echo "4. Claude-yolo handles all features:"
83+
echo " claude-yolo --auth-with bedrock # Use AWS Bedrock"
84+
echo " claude-yolo --auth-with api-key # Use API key(may have to rerun \`/login\`)"
85+
echo " claude-yolo --trace # Enable request tracing"
86+
echo " claude-yolo -v ~/.ssh:/root/.ssh:ro # Mount SSH keys"
87+
echo " claude-yolo --continue/--resume # Resume conversation"
88+
echo " claude-yolo --inspect # Enter running container"
89+
echo " claude.sh --help # Advanced options reference"
7290
echo ""
73-
echo "WARNING: Never run --yolo in your home directory or system directories!"
91+
echo -e "\033[93mWARNING: Never run --yolo in your home directory or system directories!\033[0m"
7492
echo ""

0 commit comments

Comments
 (0)