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

55
launch.bat Normal file
View file

@ -0,0 +1,55 @@
@echo off
:: launch.bat — Pick a project folder and start Claude Code (Windows)
setlocal enabledelayedexpansion
set "SCRIPT_DIR=%~dp0"
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
:: ── Check for bash (Git Bash or WSL) ─────────────────────────────────────────
where bash >nul 2>&1
if %errorlevel% neq 0 (
echo Git Bash is required to run docker-claude on Windows.
echo.
echo Download it at: https://git-scm.com/download/win
echo Install with default options, then double-click this file again.
pause
exit /b 1
)
:: ── First-time setup ──────────────────────────────────────────────────────────
if not exist "%SCRIPT_DIR%\.env" (
echo Looks like this is your first time. Running setup...
echo.
bash "%SCRIPT_DIR%/setup.sh"
if %errorlevel% neq 0 ( pause & exit /b 1 )
echo.
)
:: ── Folder picker via PowerShell ──────────────────────────────────────────────
set "PROJECT_FOLDER="
for /f "usebackq tokens=*" %%i in (`powershell -NoProfile -Command ^
"Add-Type -AssemblyName System.Windows.Forms; ^
$d = New-Object System.Windows.Forms.FolderBrowserDialog; ^
$d.Description = 'Select the project folder to work on'; ^
$d.RootFolder = 'MyComputer'; ^
$d.ShowNewFolderButton = $false; ^
if ($d.ShowDialog() -eq 'OK') { Write-Output $d.SelectedPath } else { exit 1 }"`) do (
set "PROJECT_FOLDER=%%i"
)
if not defined PROJECT_FOLDER (
echo No folder selected. Exiting.
pause
exit /b 1
)
:: ── Launch ────────────────────────────────────────────────────────────────────
:: Convert Windows path to Unix path for bash
for /f "usebackq tokens=*" %%i in (`bash -c "cygpath -u '!PROJECT_FOLDER!'"`) do (
set "UNIX_FOLDER=%%i"
)
bash -c "cd '!UNIX_FOLDER!' && '!SCRIPT_DIR:/=\..\..\!/claude.sh' start" 2>nul || ^
bash -c "cd '!UNIX_FOLDER!' && bash '$(cygpath -u '!SCRIPT_DIR!')/claude.sh' start"
pause