Repository navigation
Description
Summary
Installation-method detection fails for OpenCode installed from homebrew-core (brew install opencode), so /update and opencode upgrade abort with installation method not found even though brew is a supported --method.
Environment
- opencode version: v2.0.20
- OS: Darwin 25.6.0 (darwin arm64)
- Terminal: WezTerm (
TERM=xterm-256color,COLORTERM=truecolor) - Shell: /opt/homebrew/bin/bash
- Install/channel: release, Homebrew formula
opencodefromhomebrew-core - Active plugins: None found in config
Reproduction
brew install opencode(thehomebrew-coreformula, not theopencode-beta/opencode-v2tap)which opencode→/opt/homebrew/bin/opencodereadlink /opt/homebrew/bin/opencode→../Cellar/opencode/2.0.20/bin/opencode- Run
opencode upgrade, or/updateinside the TUI
Expected Behavior
Detection returns brew and the upgrade runs brew upgrade opencode.
Actual Behavior
CLI:
Could not detect the installation method. Pass --method to choose how to upgrade OpenCode.
TUI /update:
update skipped: installation method not found
Installation method not found
opencode upgrade --method brew works, so only auto-detection is broken.
Additional Context
The Homebrew branch of the detector only matches two tap names:
const p = await fs.realpath(process.execPath)
if (["opencode-beta", "opencode-v2"].some(v => p.includes(`${path.sep}Cellar${path.sep}${v}${path.sep}`)))
return "brew"
if (!packageName) return // → undefined → "installation method not found"The homebrew-core formula installs to a third path that is not covered:
/opt/homebrew/Cellar/opencode/2.0.20/bin/opencode
^^^^^^^^^^^ not matched
/Cellar/opencode/<version>/ matches neither opencode-beta nor opencode-v2, so the check falls through. The subsequent npm/pnpm/bun/yarn/vp probes never run because packageName is only derived from a neighbouring package.json, which does not exist for a standalone Homebrew binary — so the detector returns undefined.
Suggested fix: also match ${path.sep}Cellar${path.sep}opencode${path.sep}, or derive brew from brew --prefix opencode / a HOMEBREW_PREFIX env check.
Reproducible every time on this machine. Workaround: run opencode upgrade --method brew from a terminal (/update in the TUI has no --method option).
Activity
github-actions commentedon Oct 2, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 72 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
/updatecannot detect the package-manager installation method.If you believe this was flagged incorrectly, please let a maintainer know.