Skip to content

feat(onboarding): local-ai-setup one-liner loader + Claude desktop cask - #53

Merged
abarrows merged 1 commit into
productionfrom
feature/local-ai-setup-loader
Aug 14, 2026
Merged

feat(onboarding): local-ai-setup one-liner loader + Claude desktop cask#53
abarrows merged 1 commit into
productionfrom
feature/local-ai-setup-loader

Conversation

@abarrows

@abarrows abarrows commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds onboarding_bin/local-ai-setup.sh — the Retail Success AI bootstrap loader behind the company one-liner:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/abarrows/dotfiles/production/onboarding_bin/local-ai-setup.sh)"
  • Adds cask 'claude' (desktop app) to Brewfile.baseclaude-code covered only the CLI.

The loader installs Claude desktop, Claude Code (CLI + VS Code extension), Docker Desktop (MCP Toolkit), Warp, VS Code, and gh; authenticates GitHub; installs the rs-agents plugin from Retail-Success/Wayroo.tools; then hands off to the plugin's own setup.sh for MCP wiring. Idempotent — safe to re-run on fresh, partial, or healthy machines.

Brewfile note: brew casks are community-maintained; Anthropic's docs list a direct download for Desktop. Brew is chosen deliberately for idempotent fleet consistency — one brew bundle converges every machine.

Test plan

  • bash -n syntax check passes
  • shellcheck -S warning clean
  • Pre-merge curl path proven from the branch raw URL; SHA matches the authored file
  • Post-merge: production raw URL resolves (verified immediately after merge)

🤖 Generated with Claude Code

https://claude.ai/code/session_01479AjdrpHH8hsrnf7CbyeW

Summary by Sourcery

Introduce a macOS one-liner onboarding script to bootstrap the local Retail Success AI environment and add Claude desktop to the base Homebrew bundle.

New Features:

  • Add a curlable local-ai-setup.sh loader that installs core AI tooling, configures GitHub access, provisions Docker MCP, and wires the Retail Success Claude plugin.
  • Include the Claude desktop app cask in the shared Brewfile.base so it is installed via brew bundle for all developers.

Enhancements:

  • Ensure the onboarding script is idempotent, performs environment sanity checks, and delegates final MCP wiring to the plugin-managed setup.sh for ongoing updates.

Adds the Retail Success AI bootstrap one-liner target:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/abarrows/dotfiles/production/onboarding_bin/local-ai-setup.sh)"

Installs Claude desktop, Claude Code (CLI + VS Code extension), Docker
Desktop (MCP Toolkit), Warp, VS Code, gh; installs the rs-agents plugin
from Retail-Success/Wayroo.tools; hands off to the plugin's setup.sh for
MCP wiring. Idempotent throughout.

Brewfile note: brew casks are community-maintained; Anthropic's docs list
a direct download for Desktop. Brew is chosen deliberately for idempotent
fleet consistency — one 'brew bundle' converges every machine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01479AjdrpHH8hsrnf7CbyeW
@sourcery-ai

sourcery-ai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Introduces a curl-able, idempotent macOS onboarding script that installs and wires the local AI toolchain (Claude desktop/CLI, Docker MCP Toolkit, Warp, VS Code, GitHub auth, rs-agents plugin) and updates the base Brew bundle to include the Claude desktop cask.

Sequence diagram for the local-ai-setup onboarding one-liner

sequenceDiagram
  actor User
  participant Bash
  participant local_ai_setup_sh
  participant Homebrew
  participant GitHub
  participant DockerDesktop
  participant ClaudeCLI
  participant RsAgentsPluginSetup

  User->>Bash: /bin/bash -c "$(curl .../local-ai-setup.sh)"
  Bash->>local_ai_setup_sh: execute script

  local_ai_setup_sh->>local_ai_setup_sh: step "Checking this machine"
  local_ai_setup_sh->>local_ai_setup_sh: uname, id, groups, sw_vers, curl

  local_ai_setup_sh->>local_ai_setup_sh: step "Xcode Command Line Tools"
  local_ai_setup_sh->>local_ai_setup_sh: xcode-select -p

  local_ai_setup_sh->>local_ai_setup_sh: step "Homebrew"
  alt brew missing
    local_ai_setup_sh->>Homebrew: /bin/bash -c "$(curl .../install.sh)"
  end
  local_ai_setup_sh->>Homebrew: brew shellenv

  local_ai_setup_sh->>local_ai_setup_sh: step "Apps (only what's missing)"
  local_ai_setup_sh->>Homebrew: brew_formula gh
  local_ai_setup_sh->>Homebrew: brew_cask claude
  local_ai_setup_sh->>Homebrew: brew_cask claude-code
  local_ai_setup_sh->>Homebrew: brew_cask docker-desktop
  local_ai_setup_sh->>Homebrew: brew_cask warp
  local_ai_setup_sh->>Homebrew: brew_cask visual-studio-code

  local_ai_setup_sh->>local_ai_setup_sh: step "GitHub auth"
  alt gh not authenticated
    local_ai_setup_sh->>GitHub: gh auth login
  end

  local_ai_setup_sh->>local_ai_setup_sh: step "Docker Desktop + MCP Toolkit"
  alt docker daemon not running
    local_ai_setup_sh->>DockerDesktop: open -a Docker
    local_ai_setup_sh->>DockerDesktop: docker info (wait loop)
  end
  local_ai_setup_sh->>DockerDesktop: docker mcp --help

  local_ai_setup_sh->>local_ai_setup_sh: step "Retail Success Claude plugin"
  local_ai_setup_sh->>ClaudeCLI: claude plugin marketplace add Retail-Success/Wayroo.tools
  alt primary marketplace name
    local_ai_setup_sh->>ClaudeCLI: claude plugin install rs-agents@retailsuccess
  else fallback marketplace name
    local_ai_setup_sh->>ClaudeCLI: claude plugin install rs-agents@wayroo
  end

  local_ai_setup_sh->>local_ai_setup_sh: step "Handing off to the plugin's setup.sh"
  local_ai_setup_sh->>local_ai_setup_sh: ls ~/.claude/plugins/.../local-ai-setup/setup.sh
  local_ai_setup_sh->>RsAgentsPluginSetup: bash setup.sh

  local_ai_setup_sh->>local_ai_setup_sh: step "Final check"
  local_ai_setup_sh->>ClaudeCLI: claude doctor
  local_ai_setup_sh-->>User: summary of installed tools and next steps
Loading

File-Level Changes

Change Details Files
Add a standalone macOS onboarding script that bootstraps the local AI environment and hands off to the rs-agents plugin setup.
  • Defines logging helpers and strict guards for OS, admin privileges, architecture, minimum macOS version, and network reachability.
  • Bootstraps Xcode Command Line Tools and Homebrew, ensuring brew is on PATH for both Apple Silicon and Intel.
  • Installs or verifies core tools and apps (gh, Claude desktop and CLI, Docker Desktop, Warp, VS Code) in an idempotent manner, including the Claude VS Code extension.
  • Enforces GitHub authentication via gh, verifies Docker Desktop daemon and MCP Toolkit availability, and installs/configures the rs-agents Claude plugin with marketplace fallback logic.
  • Locates and runs the plugin’s local-ai-setup setup.sh from the Claude plugin cache and performs a final health check via claude doctor.
onboarding_bin/local-ai-setup.sh
Update the base Brew bundle to install Claude Desktop via Homebrew cask for fleet consistency.
  • Adds the Claude desktop cask to the base Brewfile used for brew bundle.
  • Aligns Brew-based installation with the onboarding script’s expectations for Claude desktop presence.
Brewfile.base

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • The admin check using groups | grep -qw admin is brittle on systems where the admin group has a different name or where groups output is localized; consider using id -Gn or dsmemberutil checkmembership for a more robust privilege check.
  • The plugin setup.sh discovery relies on a specific ~/.claude/plugins/*/*/skills/local-ai-setup/setup.sh layout; if the CLI changes its cache structure this will silently fail, so it may be worth centralizing this lookup into a helper that can be updated independently or using a claude CLI command if one exists to locate plugin assets.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The admin check using `groups | grep -qw admin` is brittle on systems where the admin group has a different name or where `groups` output is localized; consider using `id -Gn` or `dsmemberutil checkmembership` for a more robust privilege check.
- The plugin `setup.sh` discovery relies on a specific `~/.claude/plugins/*/*/skills/local-ai-setup/setup.sh` layout; if the CLI changes its cache structure this will silently fail, so it may be worth centralizing this lookup into a helper that can be updated independently or using a `claude` CLI command if one exists to locate plugin assets.

## Individual Comments

### Comment 1
<location path="onboarding_bin/local-ai-setup.sh" line_range="63-64" />
<code_context>
+[ "$MACOS_MAJOR" -ge "$MIN_MACOS" ] || die "macOS $MACOS_MAJOR too old (need ≥ $MIN_MACOS). Update via System Settings → General → Software Update, then re-run."
+ok "macOS $(sw_vers -productVersion)"
+
+curl -fsSL --max-time 10 -o /dev/null https://raw.githubusercontent.com \
+  || die "Can't reach github. Check network/VPN and re-run."
+ok "network reachable"
+
</code_context>
<issue_to_address>
**nitpick:** The 10-second curl timeout may be too strict on slow or high-latency networks.

On some corporate or high-latency networks, connecting to GitHub can legitimately take longer than 10 seconds, causing this check to fail even when the network/VPN is fine. Consider increasing `--max-time` (e.g., 30–60 seconds) or using `--connect-timeout` instead so only slow connections—not slow transfers—are treated as failures.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +63 to +64
curl -fsSL --max-time 10 -o /dev/null https://raw.githubusercontent.com \
|| die "Can't reach github. Check network/VPN and re-run."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: The 10-second curl timeout may be too strict on slow or high-latency networks.

On some corporate or high-latency networks, connecting to GitHub can legitimately take longer than 10 seconds, causing this check to fail even when the network/VPN is fine. Consider increasing --max-time (e.g., 30–60 seconds) or using --connect-timeout instead so only slow connections—not slow transfers—are treated as failures.

@abarrows
abarrows merged commit 4abf9db into production Aug 14, 2026
1 of 2 checks passed
@abarrows
abarrows deleted the feature/local-ai-setup-loader branch August 14, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant