You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion, @bilogic! As I understand it, you'd like the curl -fsSL https://opencode.ai/v2/install | bash installer to support a system-wide install (for example into /usr/local/bin). Right now it always installs into ~/.opencode/bin and adds that folder to PATH in your shell config, so opencode is only available to the current user.
The README does describe an OPENCODE_INSTALL_DIR / XDG_BIN_DIR override, with an example like OPENCODE_INSTALL_DIR=/usr/local/bin curl ... | bash. The current installer doesn't read those variables, so that example won't work as written. Until something changes, one workaround is to run the installer normally and then copy or symlink the binary yourself, e.g. sudo ln -s ~/.opencode/bin/opencode /usr/local/bin/opencode. Note that this path is inside your home folder, so other users may not be able to reach it, and a later in-place upgrade may not update a copied binary.
Activity
opencode-agent commentedon Oct 21, 2026
Thanks for the suggestion, @bilogic! As I understand it, you'd like the
curl -fsSL https://opencode.ai/v2/install | bashinstaller to support a system-wide install (for example into/usr/local/bin). Right now it always installs into~/.opencode/binand adds that folder toPATHin your shell config, soopencodeis only available to the current user.The README does describe an
OPENCODE_INSTALL_DIR/XDG_BIN_DIRoverride, with an example likeOPENCODE_INSTALL_DIR=/usr/local/bin curl ... | bash. The current installer doesn't read those variables, so that example won't work as written. Until something changes, one workaround is to run the installer normally and then copy or symlink the binary yourself, e.g.sudo ln -s ~/.opencode/bin/opencode /usr/local/bin/opencode. Note that this path is inside your home folder, so other users may not be able to reach it, and a later in-place upgrade may not update a copied binary.Related issues and PRs:
OPENCODE_INSTALL_DIR/XDG_BIN_DIR.deb/.rpmpackages for a system-wide install through the package managerMaintainers will consider this.