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:
parent
51e7ab2b08
commit
f68ed674d0
6 changed files with 297 additions and 45 deletions
36
claude.sh
36
claude.sh
|
|
@ -16,24 +16,36 @@ error() { echo -e "${RED}[-]${NC} $*" >&2; }
|
|||
|
||||
# ─── Helpers ──────────────────────────────────────────────────────────────────
|
||||
check_deps() {
|
||||
command -v docker &>/dev/null \
|
||||
|| { error "Docker is not installed. https://docs.docker.com/get-docker/"; exit 1; }
|
||||
docker compose version &>/dev/null 2>&1 \
|
||||
|| { error "Docker Compose v2 plugin is required."; exit 1; }
|
||||
if ! command -v docker &>/dev/null; then
|
||||
error "Docker is not installed."
|
||||
error " → Download Docker Desktop (free): https://www.docker.com/products/docker-desktop/"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker info &>/dev/null 2>&1; then
|
||||
error "Docker is not running."
|
||||
error " → Open Docker Desktop and wait for it to finish starting, then try again."
|
||||
exit 1
|
||||
fi
|
||||
if ! docker compose version &>/dev/null 2>&1; then
|
||||
error "Docker Compose is not available."
|
||||
error " → Download Docker Desktop (includes Compose): https://www.docker.com/products/docker-desktop/"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
load_env() {
|
||||
local env_file="$SCRIPT_DIR/.env"
|
||||
if [[ -f "$env_file" ]]; then
|
||||
# shellcheck disable=SC1090
|
||||
set -a; source "$env_file"; set +a
|
||||
if [[ ! -f "$env_file" ]]; then
|
||||
warn "Not set up yet. Run ./setup.sh first."
|
||||
exit 1
|
||||
fi
|
||||
# shellcheck disable=SC1090
|
||||
set -a; source "$env_file"; set +a
|
||||
if [[ -z "${ANTHROPIC_API_KEY:-}" && -z "${CLAUDE_CODE_OAUTH_TOKEN:-}" ]]; then
|
||||
warn "No ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN found."
|
||||
warn "Claude Code will prompt you to authenticate on first run."
|
||||
warn " Option 1 (API key): set ANTHROPIC_API_KEY in .env"
|
||||
warn " Option 2 (token): run 'claude setup-token' and set CLAUDE_CODE_OAUTH_TOKEN in .env"
|
||||
warn " Option 3 (browser): log in when prompted; port 54545 must be reachable from your browser."
|
||||
warn "No credentials found — Claude will ask you to log in via browser."
|
||||
warn "A login URL will appear below. Open it to authenticate."
|
||||
warn "(To skip this prompt in future, run ./setup.sh to configure credentials.)"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue