feat: add non-technical user onboarding

- setup.sh: interactive wizard for Docker check and auth configuration
- launch.sh: folder-picker launcher (macOS native dialog, zenity/kdialog on Linux, text fallback)
- launch.bat: Windows launcher using PowerShell folder browser + Git Bash
- claude.sh: friendlier error messages with actionable links; prompt setup.sh if .env missing
- hooks/pre-commit: add setup.sh and launch.sh to executable enforcement
- README: add Quick Start section aimed at non-technical users

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
docker-claude 2026-04-16 10:13:34 +02:00
parent 51e7ab2b08
commit f68ed674d0
6 changed files with 297 additions and 45 deletions

View file

@ -2,6 +2,38 @@
Runs [Claude Code](https://claude.ai/code) inside an isolated Docker environment with a proxy sidecar for controlled egress. Claude cannot access the host filesystem or network directly.
## Quick Start
**1. Install Docker Desktop**
Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop/) for your platform. It's free and includes everything needed — no extra tools required.
**2. Download this repo**
Clone or download and unzip this repository somewhere on your machine.
**3. Run setup**
- **macOS / Linux:** Open a terminal, navigate to the folder, and run:
```bash
./setup.sh
```
- **Windows:** Double-click `launch.bat` — it will run setup automatically on first launch.
Setup will ask how you want to authenticate (API key, subscription token, or browser login) and save your settings.
**4. Start Claude**
- **macOS / Linux:** Double-click `launch.sh`, or run it from a terminal:
```bash
./launch.sh
```
A folder picker will appear — select the project you want Claude to work on.
- **Windows:** Double-click `launch.bat`.
---
## Architecture
```
@ -35,31 +67,17 @@ Runs [Claude Code](https://claude.ai/code) inside an isolated Docker environment
## Prerequisites
- Docker Engine 24+
- Docker Compose v2 plugin (`docker compose version`)
## Setup
```bash
# 1. Clone / copy this repo
git clone <repo> docker-claude && cd docker-claude
# 2. Configure credentials (see Authentication below)
cp .env.example .env
$EDITOR .env
# 3. Make the control script executable
chmod +x claude.sh
```
- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (includes Docker Engine and Compose)
## Authentication
Three options — pick one and set it in `.env`:
Three options — `./setup.sh` will guide you through picking one:
### Option 1 — API key
```bash
ANTHROPIC_API_KEY=sk-ant-...
```
Get a key at [console.anthropic.com](https://console.anthropic.com/settings/keys).
### Option 2 — OAuth token (subscription, headless-friendly)
@ -67,7 +85,7 @@ Run this **on your host** (not inside the container) to generate a 1-year token:
```bash
claude setup-token
```
Then set the printed token in `.env`:
Then paste the token into setup, or set it manually in `.env`:
```bash
CLAUDE_CODE_OAUTH_TOKEN=...
```
@ -75,26 +93,22 @@ CLAUDE_CODE_OAUTH_TOKEN=...
### Option 3 — Browser OAuth (interactive)
Leave both keys unset. On first run, Claude Code will print a login URL.
Port 54545 must be reachable from your browser for the OAuth callback:
```bash
sbx ports <sandbox-name> --publish 54545:54545/tcp
```
Then run `./claude.sh start` and follow the prompt. Credentials are stored in
`~/.claude` on the host and reused on every subsequent run.
Port 54545 must be reachable from your browser for the OAuth callback.
## Usage
### Normal use
```bash
# Start proxy, pull latest images, launch Claude Code in the current directory
cd ~/myproject
./claude.sh start
./launch.sh # folder picker → starts Claude in the selected directory
```
### Other commands
### CLI / power users
```bash
cd ~/myproject
./claude.sh start
./claude.sh stop # Stop and remove all containers
./claude.sh update # Pull latest images from the registry
./claude.sh logs # Tail proxy logs
@ -104,8 +118,6 @@ cd ~/myproject
### Building locally
`build.sh` builds images from source using the local Dockerfiles:
```bash
./build.sh # build with layer cache
./build.sh --no-cache # force full rebuild