fix(windows): detect broken ccproxy binary and fall back to pipx - #1
Merged
Merged
Conversation
The pre-built Windows ccproxy.exe v0.2.10 ships without any auth provider plugins (CaddyGlow/ccproxy-api#75). This makes 'clawde auth' fail with 'No auth providers installed' even on a fresh install. Changes: - install.ps1: after installing ccproxy.exe, call ccproxy auth providers to detect the empty-plugin-list state. If empty AND pipx+Python 3.11+ are available, automatically run 'pipx install ccproxy-api[plugins-claude,plugins-codex]' and replace ccproxy.exe in the clawde bin dir with a small .cmd shim that forwards to the pipx-installed binary. - install.ps1: new helpers Test-CCProxyHasProviders, Test-PipxAvailable, Install-CCProxyViaPipx. - cli/clawde.ps1: Find-Binary falls back to a .cmd shim when the .exe is missing. Cmd-Start wraps Start-Process with cmd /c for .cmd shims. - README.md: note the Windows situation and the pipx fallback. Until the upstream fix lands, this is the path that works for Windows users without requiring them to install Python and pipx manually.
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.
fix(windows): detect broken ccproxy binary and fall back to pipx
The pre-built Windows
ccproxy.exev0.2.10 ships without any auth provider plugins (see CaddyGlow/ccproxy-api#75). This makesclawde authfail withNo auth providers installed in this CCProxy releaseeven on a fresh install.This PR makes the
clawdeinstaller detect the broken binary and automatically fall back to a working install viapipx(Python 3.11+). If Python/pipx aren't available, the installer prints a clear next-step message instead of silently leaving the user with a non-functionalclawde auth.Changes
install.ps1Test-CCProxyHasProviders $bin\ccproxy.exe— runsccproxy auth providersand returns$trueonly if at least one provider name appears in the output (returns$falseon the "No OAuth providers found" / "No plugins found" cases, or on non-zero exit).Test-PipxAvailable— checks forpy/pythonon PATH at >= 3.11, pluspipxon PATH.Install-CCProxyViaPipx— runspipx install ccproxy-api[plugins-claude,plugins-codex], then drops a tinyccproxy.cmdshim into the clawde bin dir that forwards to the pipx-installed script. The brokenccproxy.exeis removed first.Install-CCProxy— after a successful install, callsTest-CCProxyHasProvidersand, if false, dispatches to the pipx fallback (or prints a manual-fix message).cli/clawde.ps1Find-Binarynow falls back to a.cmdshim with the same basename when the.exeis missing. This lets the pipx-installedccproxy.cmdshim work transparently with the existingclawde start/clawde status/clawde updatepaths.Cmd-StartwrapsStart-Processincmd /c <shim>when the resolved binary is a.cmd, so PID/log redirection still works.README.mdWhy this approach
The real fix needs to land in
CaddyGlow/homebrew-packages(the upstream CI that builds the Windows binary). That's a separate PR over there (CaddyGlow/homebrew-packages#1) plus a docs PR onCaddyGlow/ccproxy-api(#76).In the meantime, this is the path that gets Windows users to a working
clawde authwithout them having to discover the issue themselves. The fallback only triggers when the binary is detected as broken, so users on a fixed release are unaffected.Test plan
ccproxy.exe, run.\install.ps1. It should auto-detect the missing plugins and switch to the pipx shim.clawde authshould reach the OAuth browser step (no "No auth providers installed" error).bash install.shis unchanged.