Skip to content

Commit f4fb2c5

Browse files
committed
docs: add Windows/WSL support research summary
Summarizes GitHub issues, PRs, and community solutions for: - Windows build availability - Claude installation detection on Windows - WSL integration for Claude Code execution - Custom command/environment variable support Key references: - PR winfunc#367 (merged): Windows binary detection - Issue winfunc#78: Community fix v4.2 with WSL bridge - Issue winfunc#186: Shell environment detection proposal - Issue winfunc#400: Custom command support request
1 parent 70c16d8 commit f4fb2c5

1 file changed

Lines changed: 205 additions & 0 deletions

File tree

WINDOWS_WSL_RESEARCH.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Windows & WSL Support Research for Opcode (Claudia)
2+
3+
## Summary
4+
5+
This document summarizes the research findings from winfunc/opcode GitHub issues, PRs, and community forks regarding:
6+
1. Windows build availability
7+
2. Claude installation detection on Windows
8+
3. WSL integration for Claude Code execution
9+
10+
---
11+
12+
## 1. Windows Build Availability
13+
14+
### Current State
15+
- **No official Windows builds in releases** - Major pain point for users
16+
- Multiple issues requesting Windows builds: #301, #332, #370, #219, #369
17+
18+
### Community Solutions
19+
20+
#### Issue #370 - Chinese user provided Windows 0.20 build
21+
- Fixed compilation and installation failure
22+
- Fixed local Claude code recognition
23+
- Provided both `.exe` and setup installer
24+
- Status: Open (community contribution, not merged)
25+
26+
#### Issue #78 - Comprehensive Community Fix v4.2 by @Kirchlive
27+
**Gist:** https://gist.github.com/Kirchlive/184cdd96a56bfd7a6c67997836495f3c
28+
29+
Files included:
30+
- `2-claude_binary_patch.rs` - Patched main.rs accepting any Claude version
31+
- `3-setup-windows.bat` - Creates WSL bridge script
32+
- `4-start-claudia.bat` - Launcher with pre-flight checks
33+
- `5-apply-patches.bat` - Build script patches
34+
35+
Key features:
36+
- WSL bridge via `claude.bat` in `%APPDATA%\npm`
37+
- Automatic Claude CLI version detection from WSL
38+
- Filters unsupported parameters (`--system-prompt`, `--no-color`)
39+
- Supports multiple WSL distributions
40+
41+
#### Issue #352 - AppImage on WSL2 Workaround by @mf
42+
Run the Linux AppImage release directly in WSL2:
43+
```bash
44+
apt install libgles2
45+
# Extract and run AppImage
46+
./AppImage --appimage-extract
47+
```
48+
49+
---
50+
51+
## 2. Claude Installation Detection on Windows
52+
53+
### Merged Fix: PR #367 by @Asm3r96
54+
**Status: MERGED into main**
55+
56+
Added Windows support via conditional compilation:
57+
- `#[cfg(windows)]` for `try_which_command()` using `where` instead of `which`
58+
- `#[cfg(windows)]` for `find_nvm_installations()` checking `NVM_HOME`
59+
- `#[cfg(windows)]` for `find_standard_installations()` with Windows paths
60+
61+
Windows paths checked:
62+
- `%USERPROFILE%\.claude\local\claude.exe`
63+
- `%USERPROFILE%\.local\bin\claude.exe`
64+
- `%APPDATA%\Roaming\npm\claude.cmd`
65+
- `%USERPROFILE%\.yarn\bin\claude.cmd`
66+
- `%USERPROFILE%\.bun\bin\claude.exe`
67+
68+
### Related Open PRs/Issues
69+
70+
#### PR #360 - Windows compatibility (by @hexbee)
71+
Additional improvements:
72+
- Replace Unix `which` with Windows `where`
73+
- Support Windows environment variables (`USERPROFILE` vs `HOME`)
74+
- Handle `.cmd`, `.exe` extensions
75+
- Detect Program Files directories
76+
77+
#### PR #348 - Improve Claude installation detection (by @ollieb89)
78+
Focus on better detection logic for Windows
79+
80+
#### Issue #369 - Build Error on Windows 11
81+
Missing `installation_type` field in `ClaudeInstallation` struct
82+
**Fixed by PR #374** (merged)
83+
84+
---
85+
86+
## 3. WSL Integration
87+
88+
### The Core Problem (Issue #168)
89+
> "Claude code can only be installed on Windows via WSL... how can I run Claude code successfully in the Claudia desktop?"
90+
91+
### Community WSL Bridge Solution (from Issue #78)
92+
93+
The `claude.bat` bridge script:
94+
```batch
95+
@echo off
96+
setlocal enabledelayedexpansion
97+
98+
REM Configuration - set your WSL distro
99+
SET "WSL_DISTRO="
100+
101+
REM Version check - get real version from WSL claude
102+
if /I "%~1" == "--version" (
103+
for /f "delims=" %%i in ('wsl bash -lc "~/.npm-global/bin/claude --version"') do set "CLAUDE_VERSION=%%i"
104+
echo !CLAUDE_VERSION!
105+
exit /b 0
106+
)
107+
108+
REM Filter unsupported arguments
109+
REM Skip: --system-prompt, --no-color
110+
111+
REM Execute via WSL
112+
if defined WSL_DISTRO (
113+
wsl -d "%WSL_DISTRO%" bash -lc "~/.npm-global/bin/claude !CMD!"
114+
) else (
115+
wsl bash -lc "~/.npm-global/bin/claude !CMD!"
116+
)
117+
```
118+
119+
### Issue #137 - Official WSL Support Request
120+
> "Currently there is a community fix... but we just can't get it to work because of the number of steps involved. Is there a plan for official WSL support?"
121+
122+
**Status: Open, no official response**
123+
124+
### Issue #186 - Windows Shell Support PR by @alexiokay
125+
**Key improvements proposed:**
126+
- New `shell_environment.rs` module for Windows shell detection
127+
- Automatic detection of Git Bash, WSL, PowerShell
128+
- Proper environment setup for Claude Code on Windows
129+
- Better error messages with instructions
130+
131+
---
132+
133+
## 4. Feature Request: Custom Command & Environment Variables
134+
135+
### Issue #400 - Support for Custom Claude Execution Command
136+
Use case: Integration with [claude-code-router](https://github.com/musistudio/claude-code-router)
137+
138+
**Proposed solutions:**
139+
140+
#### Option 1: Custom Claude Binary Path (Recommended)
141+
```
142+
Settings → General → Claude Code Command
143+
[ccr code] (default: claude)
144+
```
145+
146+
#### Option 2: Custom Environment Variables
147+
```
148+
Settings → Advanced → Custom Environment Variables
149+
ANTHROPIC_BASE_URL=https://my-proxy.com/
150+
CLAUDE_CODE_MAX_OUTPUT_TOKENS=20000
151+
```
152+
153+
#### Option 3: Whitelist Configuration
154+
Allow users to extend the environment variable whitelist via config file.
155+
156+
---
157+
158+
## 5. Active Forks with Recent Changes
159+
160+
| Fork | Last Updated | Notable Changes |
161+
|------|--------------|-----------------|
162+
| namastexlabs/opcode | Dec 4, 2025 | Tauri event listener fixes |
163+
| Rixmerz/nova | Dec 5, 2025 | Rebranded, purple theme, haiku model, unified ClaudeOptions API |
164+
| tbarstow-tw/opcode-pm | Dec 4, 2025 | BMAD framework documentation |
165+
| DigitalNomad-Chat/opcode | Dec 4, 2025 | Active development |
166+
| zhu976/opcode-i18n | Dec 2, 2025 | Chinese i18n support |
167+
168+
---
169+
170+
## 6. Recommended Implementation Path
171+
172+
### For Windows Builds
173+
1. Add GitHub Actions workflow for Windows builds (requested in #194, #226)
174+
2. Include the merged Windows detection code from PR #367
175+
3. Fix icon format issues (#75, #276, #262)
176+
177+
### For WSL Integration
178+
1. Implement shell environment detection (from PR #186)
179+
2. Add settings UI for:
180+
- Shell preference (PowerShell / Git Bash / WSL)
181+
- WSL distribution selection
182+
- Custom Claude command path
183+
3. Create WSL bridge in Rust (not batch file) for better integration
184+
185+
### For Multiple Claude Installations
186+
1. Already implemented: `list_claude_installations()` API endpoint
187+
2. Add UI dropdown in settings to select preferred installation
188+
3. Store preference in `app_settings` table
189+
190+
---
191+
192+
## 7. Key Files to Reference
193+
194+
### In winfunc/opcode main branch:
195+
- `src-tauri/src/claude_binary.rs` - Windows detection already merged
196+
- `src-tauri/src/commands/claude.rs` - Command execution (needs WSL support)
197+
198+
### Community Gist (v4.2):
199+
- https://gist.github.com/Kirchlive/184cdd96a56bfd7a6c67997836495f3c
200+
201+
### Related PRs to watch:
202+
- #186 - Shell environment detection
203+
- #360 - Additional Windows compatibility
204+
- #400 - Custom command/env vars
205+
- #407 - Tauri event listener fixes (namastexlabs)

0 commit comments

Comments
 (0)