Build the development preview
The source checkout and npm CLI require Bun. From a checkout of the OCX V2 branch:- Bash / Zsh
- PowerShell
unalias ocx.ocx to mean this preview command. Shell aliases are not inherited by package scripts; scripts that call bunx ocx@next need the published preview or an explicit local entry point.
Published preview channel
After the preview has been published, install it with either package manager:ocx --version before using the examples. During the preview, the default release remains OCX 2.0.15 for OpenCode V1; an unqualified install is not the V2 setup.
ocx self update follows the preview channel for prerelease builds and refuses to cross major versions. See self management for supported installation methods and uninstall behavior.
Select the OpenCode binary
OCX resolves the executable in this order:- The selected profile’s
binfield inocx.jsonc. - The
OPENCODE_BINenvironment variable. opencodeonPATH.
$env:OPENCODE_BIN = 'C:\path\to\opencode.exe'. The value is an executable path or command name, not a shell command with arguments. Prefer absolute paths; relative paths resolve from the working directory where you launch OCX.
Keep an existing V1 setup
The frozen legacy client is:ocx command supplied by a previous global install. A source-preview alias lets you test OCX 3 without replacing that binary.
Keep an OpenCode V1 executable as well as your old profile files if you need rollback. OpenCode V1 and V2 normally use the same command name. OCX 3 stores profiles under ocx/profiles/; legacy profiles remain under opencode/profiles/ in the configuration directory. Use the migration guide to import into a separate profile.
Check the setup
Once you have created thework profile (as above or in the quick start), check: