Skip to content

Add Windows PowerShell installer#25

Merged
Turtle-Hwan merged 1 commit into
mainfrom
feat/windows-powershell-installer
May 29, 2026
Merged

Add Windows PowerShell installer#25
Turtle-Hwan merged 1 commit into
mainfrom
feat/windows-powershell-installer

Conversation

@Turtle-Hwan
Copy link
Copy Markdown
Contributor

Summary

  • Add a native Windows PowerShell installer (scripts/install.ps1) so Windows users do not need Git Bash or WSL.
  • Align Claude Code install/update commands with the marketplace identity that was verified on Windows: clone-loop@clone-loop.
  • Rename the Claude marketplace manifest from clone-labs to clone-loop and keep legacy auth data paths as fallbacks.
  • Keep the shell installer path working for macOS/Linux and Windows Bash environments.

Windows verification

  • claude --version -> 2.1.140 (Claude Code)
  • codex --version -> codex-cli 0.128.0
  • claude plugin marketplace add cloneisyou/clone-loop@main -> marketplace present
  • claude plugin install clone-loop@clone-loop --scope user -> installed/enabled
  • claude plugin details clone-loop@clone-loop -> plugin loads with skills/hooks
  • codex plugin marketplace add cloneisyou/clone-loop --ref main -> marketplace present at %USERPROFILE%\.codex\.tmp\marketplaces\clone-loop
  • powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install.ps1 -> installer completes on Windows

Validation

  • bash -n scripts/install.sh
  • bash scripts/install.sh
  • powershell -NoProfile -Command ...Parser::ParseFile('scripts/install.ps1')...
  • claude plugin validate .
  • npm test
  • git diff --check

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request renames the Claude plugin marketplace from clone-labs to clone-loop, updates the documentation and installation scripts accordingly, and introduces a new Windows PowerShell installer (install.ps1). Feedback on the new PowerShell script suggests avoiding exit and Write-Error to prevent closing the user's terminal window on failure, and executing CommandInfo objects directly rather than using their .Source strings for more robust command execution.

Comment thread scripts/install.ps1
Comment on lines +12 to +15
if (-not $ClaudeCommand) {
Write-Error "Clone install failed: Claude Code CLI was not found on PATH. Install Claude Code, then rerun this installer."
exit 1
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using exit in a script executed via Invoke-Expression (iex) or dot-sourcing will terminate the entire PowerShell process, closing the user's terminal window. This is a poor user experience if the CLI is not found.

Additionally, since $ErrorActionPreference = "Stop" is set, calling Write-Error will throw a terminating exception with a noisy stack trace. Using Write-Host with -ForegroundColor Red followed by return provides a much cleaner, user-friendly error message and exits the script gracefully without closing the terminal.

if (-not $ClaudeCommand) {
  Write-Host "Clone install failed: Claude Code CLI was not found on PATH. Install Claude Code, then rerun this installer." -ForegroundColor Red
  return
}

Comment thread scripts/install.ps1
Comment on lines +17 to +30
$ClaudeBin = $ClaudeCommand.Source
Write-Host "Installing Clone with $ClaudeBin..."

& $ClaudeBin plugin marketplace add "$GitHubRepo@main"
if ($LASTEXITCODE -ne 0) {
Write-Host "Marketplace add did not complete; refreshing $MarketplaceName if it already exists."
& $ClaudeBin plugin marketplace update $MarketplaceName
}

& $ClaudeBin plugin install $PluginRef --scope user
if ($LASTEXITCODE -ne 0) {
Write-Host "Install did not complete; trying plugin update for an existing install."
& $ClaudeBin plugin update $PluginRef
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In PowerShell, executing a CommandInfo object directly using the call operator & is more robust than extracting and executing its .Source string. If .Source contains spaces or represents an alias/function, executing it as a raw string can sometimes lead to resolution issues or require extra quoting.

We can execute & $ClaudeCommand directly, and stringify $ClaudeCommand (or use $ClaudeCommand.Source) only when printing the path to the host.

Write-Host "Installing Clone with $($ClaudeCommand.Source)..."

& $ClaudeCommand plugin marketplace add "$GitHubRepo@main"
if ($LASTEXITCODE -ne 0) {
  Write-Host "Marketplace add did not complete; refreshing $MarketplaceName if it already exists."
  & $ClaudeCommand plugin marketplace update $MarketplaceName
}

& $ClaudeCommand plugin install $PluginRef --scope user
if ($LASTEXITCODE -ne 0) {
  Write-Host "Install did not complete; trying plugin update for an existing install."
  & $ClaudeCommand plugin update $PluginRef
}

Comment thread scripts/install.ps1
$PreviousErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = "Continue"
try {
& $GhCommand.Source repo star $GitHubRepo *> $null
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similarly, execute the $GhCommand object directly instead of $GhCommand.Source to ensure robust execution regardless of whether gh is resolved as an application, alias, or function.

    & $GhCommand repo star $GitHubRepo *> $null

@Turtle-Hwan Turtle-Hwan force-pushed the feat/windows-powershell-installer branch from 4baae26 to 5f7aec5 Compare May 28, 2026 06:28
@Turtle-Hwan Turtle-Hwan force-pushed the feat/windows-powershell-installer branch from 5f7aec5 to 6a94e5f Compare May 29, 2026 02:34
@Turtle-Hwan Turtle-Hwan merged commit 91892e1 into main May 29, 2026
@Turtle-Hwan Turtle-Hwan deleted the feat/windows-powershell-installer branch May 29, 2026 02:37
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