feat(onboarding): Windows one-liner loader (Chocolatey) + OS detection in bash loader - #54
Merged
Merged
Conversation
…n in bash loader Adds onboarding_bin/local-ai-setup.ps1 — the Windows counterpart of the macOS bash loader, run from an elevated PowerShell: irm https://raw.githubusercontent.com/abarrows/dotfiles/production/onboarding_bin/local-ai-setup.ps1 | iex Installs via Chocolatey (git, gh, claude desktop, docker-desktop, warp, vscode — package ids verified against community.chocolatey.org), uses the official native installer for Claude Code, checks/enables WSL2 for Docker Desktop, installs the rs-agents plugin, and hands off to the plugin-shipped setup.ps1 (setup.sh via Git Bash as fallback). Idempotent; PS 5.1 + 7 compatible. The bash loader now detects Git Bash/MSYS/Cygwin/WSL and redirects Windows users to the PowerShell one-liner instead of dying with 'macOS only'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01479AjdrpHH8hsrnf7CbyeW
Contributor
Reviewer's GuideAdds a Windows PowerShell-based onboarding loader using Chocolatey and integrates OS detection into the existing bash loader to route Windows users appropriately, while delegating final setup to the Claude plugin’s own scripts. Sequence diagram for Windows PowerShell onboarding loadersequenceDiagram
actor User
participant PowerShell
participant LocalAiSetupPs1
participant Chocolatey
participant DockerDesktop
participant ClaudeCLI
participant RsAgentsPlugin
User->>PowerShell: run irm ... local-ai-setup.ps1 | iex
PowerShell->>LocalAiSetupPs1: load and execute script
LocalAiSetupPs1->>LocalAiSetupPs1: Step "Checking this machine"
LocalAiSetupPs1->>LocalAiSetupPs1: Die if not Windows or not elevated or build too old
LocalAiSetupPs1->>LocalAiSetupPs1: Test-NetConnection raw.githubusercontent.com
LocalAiSetupPs1->>Chocolatey: install.ps1 (if choco missing)
LocalAiSetupPs1->>LocalAiSetupPs1: Install-ChocoPkg git, gh, claude, docker-desktop, warp, vscode
LocalAiSetupPs1->>ClaudeCLI: Invoke-RestMethod https://claude.ai/install.ps1 | Invoke-Expression
LocalAiSetupPs1->>LocalAiSetupPs1: VS Code anthropic.claude-code extension install
LocalAiSetupPs1->>LocalAiSetupPs1: gh auth status / gh auth login
LocalAiSetupPs1->>DockerDesktop: wsl --status / wsl --install --no-distribution
LocalAiSetupPs1->>DockerDesktop: docker info
LocalAiSetupPs1->>DockerDesktop: docker mcp --help
LocalAiSetupPs1->>ClaudeCLI: claude plugin marketplace add Retail-Success/Wayroo.tools
LocalAiSetupPs1->>ClaudeCLI: claude plugin install rs-agents@retailsuccess
LocalAiSetupPs1->>RsAgentsPlugin: & setup.ps1 or bash setup.sh via Git Bash
LocalAiSetupPs1->>ClaudeCLI: claude doctor
LocalAiSetupPs1->>User: summary and next steps
Flow diagram for OS detection and Windows redirect in bash loaderflowchart TD
A[start local-ai-setup.sh] --> B[uname -s]
B -->|Darwin| C[continue macOS setup]
B -->|MINGW*/MSYS*/CYGWIN*| D[windows_redirect]
B -->|Linux| E[grep -qi microsoft /proc/version]
E -->|match| D
E -->|no match| F[die: macOS or Windows only]
B -->|other| F
D --> G[print Windows PowerShell one-liner and exit]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Docker Desktop detection/launch logic assumes the standard
$env:ProgramFiles\Docker\Docker\Docker Desktop.exelocation; consider falling back to a broader search (e.g.,Get-Command 'Docker Desktop'or scanning common user-install paths) so the flow still works on non-default or user-scope installs. - The plugin cache path is hardcoded as
Join-Path $HOME '.claude\plugins'; on some setups$HOMEmay differ from the actual user profile directory, so using$env:USERPROFILE(or[Environment]::GetFolderPath('UserProfile')) would make the setup script more robust across environments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Docker Desktop detection/launch logic assumes the standard `$env:ProgramFiles\Docker\Docker\Docker Desktop.exe` location; consider falling back to a broader search (e.g., `Get-Command 'Docker Desktop'` or scanning common user-install paths) so the flow still works on non-default or user-scope installs.
- The plugin cache path is hardcoded as `Join-Path $HOME '.claude\plugins'`; on some setups `$HOME` may differ from the actual user profile directory, so using `$env:USERPROFILE` (or `[Environment]::GetFolderPath('UserProfile')`) would make the setup script more robust across environments.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
onboarding_bin/local-ai-setup.ps1— Windows counterpart of the macOS loader, run from an elevated PowerShell:irm https://raw.githubusercontent.com/abarrows/dotfiles/production/onboarding_bin/local-ai-setup.ps1 | iexgit,gh,claude(desktop),docker-desktop,warp,vscode— all package ids verified against community.chocolatey.org. Claude Code itself uses Anthropic's official native installer (irm https://claude.ai/install.ps1 | iex, auto-updating).setup.ps1(falls back tosetup.shvia Git Bash for older plugin versions).Test plan
bash -n+ shellcheck clean on the modified sh loader🤖 Generated with Claude Code
https://claude.ai/code/session_01479AjdrpHH8hsrnf7CbyeW
Summary by Sourcery
Enable Windows onboarding through an idempotent elevated PowerShell loader while guiding non-macOS bash users to the appropriate setup path.
New Features:
Bug Fixes: