From 92de9964129020187c3695e47474582af387476d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 25 Jul 2026 17:22:26 +0000 Subject: [PATCH] setup.sh: symlink claude into /usr/local/bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Claude sidecar execs /usr/local/bin/claude (claude-manager.ts), but the Anthropic installer only puts the CLI in ~/.local/bin — so on a fresh host that path doesn't exist and claude chat fails with "ENOENT … posix_spawn '/usr/local/bin/claude'". Symlink ~/.local/bin/claude → /usr/local/bin/claude after install (idempotent; tracks Claude's self-updates). Co-Authored-By: Claude Opus 4.8 --- scripts/setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index 2bdb5cf1..e020d253 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -734,6 +734,21 @@ else if has claude; then ok "claude-code installed"; else warn "claude-code install failed"; fi fi + # The platform's Claude sidecar execs /usr/local/bin/claude (a stable, sandbox-visible path). The + # installer only drops the CLI in ~/.local/bin, so symlink it there — pointing at the ~/.local/bin + # launcher so it keeps tracking Claude's self-updates. Without this, claude chat ENOENTs on a fresh host. + CLAUDE_LOCAL="$HOME/.local/bin/claude" + if [ -e "$CLAUDE_LOCAL" ]; then + if [ "$(readlink -f /usr/local/bin/claude 2>/dev/null)" != "$(readlink -f "$CLAUDE_LOCAL")" ]; then + sudo ln -sf "$CLAUDE_LOCAL" /usr/local/bin/claude + ok "claude symlinked to /usr/local/bin/claude" + else + skip "claude symlink at /usr/local/bin/claude" + fi + else + warn "claude not found at $CLAUDE_LOCAL — /usr/local/bin/claude symlink skipped" + fi + # pm2 (process manager) if has pm2; then skip "pm2"