Skip to content

Commit 90d547e

Browse files
lroolleclaude
andcommitted
docs: improve usage examples across all documentation
- Remove incorrect '.' directory arguments from all help messages - Emphasize claude-yolo as primary interface in install.sh examples - Add practical example: --trace -v ~/.ssh:/root/.ssh:ro --continue - Update README.md with corrected usage patterns - Add bright yellow warning color in install.sh - Show argument pass-through capabilities in claude-yolo 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c59da4a commit 90d547e

4 files changed

Lines changed: 68 additions & 48 deletions

File tree

README.md

Lines changed: 26 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.
@@ -117,7 +128,7 @@ cd claude-code-yolo
117128
make build
118129

119130
# Run directly
120-
./claude.sh --yolo .
131+
./claude.sh --yolo
121132
```
122133

123134
## Inspired by
@@ -126,4 +137,3 @@ make build
126137
- **[meal/claude-code-cli](https://github.com/meal/claude-code-cli)** - Containerized Claude Code with ready-to-use Docker setup
127138
- **[gagarinyury/claude-code-root-runner](https://github.com/gagarinyury/claude-code-root-runner)** - Root privilege bypass for Claude Code using temporary users
128139
- **[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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ 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"
98
DOCKER_IMAGE="lroolle/claude-code-yolo:latest"
@@ -13,18 +12,25 @@ 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
@@ -46,6 +52,8 @@ docker pull "$DOCKER_IMAGE"
4652
echo ""
4753
echo "✓ Installation complete!"
4854
echo ""
55+
echo "Scripts installed to: $INSTALL_DIR"
56+
echo ""
4957
echo "Commands available:"
5058
echo "=================="
5159
echo ""
@@ -60,15 +68,17 @@ echo ""
6068
echo "2. Navigate to your project directory:"
6169
echo " cd ~/projects/my-project"
6270
echo ""
63-
echo "3. Run Claude in YOLO mode:"
64-
echo " claude-yolo ."
71+
echo "3. Start with Claude YOLO:"
72+
echo " claude-yolo # Run Claude with full permissions"
6573
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"
74+
echo "4. Claude-yolo handles all features:"
75+
echo " claude-yolo --auth-with bedrock # Use AWS Bedrock"
76+
echo " claude-yolo --auth-with api-key # Use API key(may have to rerun \`/login\`)"
77+
echo " claude-yolo --trace # Enable request tracing"
78+
echo " claude-yolo -v ~/.ssh:/root/.ssh:ro # Mount SSH keys"
79+
echo " claude-yolo --continue/--resume # Resume conversation"
80+
echo " claude-yolo --inspect # Enter running container"
81+
echo " claude.sh --help # Advanced options reference"
7282
echo ""
73-
echo "WARNING: Never run --yolo in your home directory or system directories!"
83+
echo -e "\033[93mWARNING: Never run --yolo in your home directory or system directories!\033[0m"
7484
echo ""

0 commit comments

Comments
 (0)