From 9bd888973bd38dd18a131da9ca0d877e9e315cb8 Mon Sep 17 00:00:00 2001 From: Natalie Date: Tue, 2 Jun 2026 21:50:31 -0700 Subject: [PATCH] =?UTF-8?q?feat(@scripts):=20=E2=9C=A8=20add=20claude=20cl?= =?UTF-8?q?i=20auto-install=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install.sh b/install.sh index 04fe9c1..db069ca 100755 --- a/install.sh +++ b/install.sh @@ -41,6 +41,23 @@ for src in "$repo_dir"/bin/*; do echo "link: $link -> $src" done +# Dependency: `rclaude` drives the `claude` CLI, so claude is a hard dep — +# install it via the official installer if it's missing. Idempotent: skipped +# when claude is already on PATH. (Auth is provisioned separately — login or +# a copied ~/.claude/.credentials.json.) +if command -v claude >/dev/null 2>&1; then + echo "ok: claude present ($(claude --version 2>/dev/null | head -1))" +elif command -v curl >/dev/null 2>&1; then + echo "dep: claude CLI missing — installing via official installer…" + if curl -fsSL https://claude.ai/install.sh | bash; then + echo "ok: claude installed ($("$HOME/.local/bin/claude" --version 2>/dev/null | head -1))" + else + echo "warn: claude auto-install failed — install it manually" >&2 + fi +else + echo "warn: claude missing and curl unavailable — install claude manually" >&2 +fi + # Install tmux.conf if tmux is present and the user has no existing config. if command -v tmux >/dev/null 2>&1; then tmux_conf="$HOME/.tmux.conf"