feat: Add Windows compatibility for OpenCode CLI detection #17
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.
User description
Summary
This PR adds full Windows compatibility for OpenCode CLI detection and improves cross-platform support.
Changes
Rust Backend (
src-tauri/src/lib.rs).exe,.cmd, and.batextensions on Windows%APPDATA%\npmto search paths for npm-installed OpenCodeAPPDATAandUSERPROFILEenvironment variable fallbacks for WindowsFrontend (
src/App.tsx)%USERPROFILE%\.opencode-browser\extension) on Windowsnpm install -g opencode-aion Windows,brew installon macOS/LinuxCI/CD (
.github/workflows/build-all-platforms.yml)Testing
opencode.cmdRelated Issues
Fixes Windows compatibility issues where OpenCode CLI installed via npm was not detected.
PR Type
Enhancement, Documentation
Description
Add full Windows compatibility for OpenCode CLI detection with support for
.exe,.cmd, and.batextensionsImplement Windows npm global path (
%APPDATA%\npm) to search paths for npm-installed OpenCodeAdd Windows environment variable fallbacks (
APPDATA,USERPROFILE) for config path resolutionDisplay platform-specific install instructions (npm on Windows, brew on macOS/Linux) in error messages
Update frontend UI to show Windows-style paths (
%USERPROFILE%\.opencode-browser\extension) on WindowsAdd multi-platform CI/CD GitHub Actions workflow supporting Windows (x64), macOS Intel (x64), macOS Apple Silicon (ARM64), and Linux (x64)
Add Windows capability schema for Tauri permissions configuration
Simplify release process documentation in AGENTS.md
Diagram Walkthrough
File Walkthrough
lib.rs
Windows compatibility for OpenCode CLI detection and config pathssrc-tauri/src/lib.rs
OPENCODE_EXECUTABLEconstant toOPENCODE_EXECUTABLESarraysupporting
.exe,.cmd, and.batextensions on Windowsresolve_in_path()to accept multiple executable names andsearch for all variants
%APPDATA%\npm) to candidate OpenCodepaths
resolve_opencode_config_path()to support Windows environmentvariables (
APPDATA,USERPROFILE) for config directory resolutionengine_start()to show platform-specificinstall instructions (npm for Windows, brew for macOS/Linux)
App.tsx
Platform-aware UI messages and Windows path handlingsrc/App.tsx
navigator.platform.includes("Win")toshow Windows-specific paths and install instructions
%USERPROFILE%\.opencode-browser\extensionon Windows instead of~/.opencode-browser/extensionnpm install -g opencode-aionWindows and
brew installon other platformsand indentation for readability
build-all-platforms.yml
Multi-platform CI/CD build workflow for all targets.github/workflows/build-all-platforms.yml
platforms
(ARM64), and Linux (x64)
toolchain targets)
and download instructions
settings.local.json
Claude local development settings configuration.claude/settings.local.json
windows-schema.json
Add Windows capability schema for Tauri permissionssrc-tauri/gen/schemas/windows-schema.json
configuration
arrays, and objects
event, image, menu, path, resources, tray, webview, window, dialog)
AGENTS.md
Simplify release process documentationAGENTS.md
requirements
package.jsonneeds mandatory updates (withTauri/Rust versions kept in sync)
backticks
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.