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
Installation Directory
The install script respects the following priority order for the installation path:
$OPENCODE_INSTALL_DIR - Custom installation directory
$XDG_BIN_DIR - XDG Base Directory Specification compliant path
$HOME/bin - Standard user binary directory (if exists or can be created)
$HOME/.opencode/bin - Default fallback
The fact that your XDG_BIN_DIR setting is being ignored suggests this might be a regression or the implementation may not be working as expected. Feel free to ignore if #1124 doesn't address your specific case.
Maybe a sidenote, but is $XDG_BIN_DIR from the spec even? can't find much info about it online when searching. I have seen $XDG_BIN_HOME also but not sure if that is official either? I was also a bit surprised that $HOME/bin is a default but not $HOME/.local/bin, but I'm not an expert in these matters.
User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.
Activity
github-actions commentedon Oct 11, 2025
This issue might be a duplicate of existing issues. Please check:
The fact that your XDG_BIN_DIR setting is being ignored suggests this might be a regression or the implementation may not be working as expected. Feel free to ignore if #1124 doesn't address your specific case.
rekram1-node commentedon Oct 11, 2025
I think if you do that the env var isnt being passed to the script invocation that only passes it to curl which would have no effect
einarpersson commentedon Oct 11, 2025
Well, the snippet is from the
README.mdeinarpersson commentedon Oct 11, 2025
Maybe a sidenote, but is
$XDG_BIN_DIRfrom the spec even? can't find much info about it online when searching. I have seen$XDG_BIN_HOMEalso but not sure if that is official either? I was also a bit surprised that$HOME/binis a default but not$HOME/.local/bin, but I'm not an expert in these matters.https://specifications.freedesktop.org/basedir-spec/latest/
rekram1-node commentedon Oct 11, 2025
facepalm oops okay ill fix, I think the script has a bug in it for this anyways, thx for raising
rekram1-node commentedon Oct 12, 2025
Hmm i think u are right about
XDG_BIN_DIRthat doesn't look liek its real, someone linked the spec and mentioned it but ig they were mistaken:#1124
banksean commentedon Oct 20, 2025
The installer script doesn't appear to refer to the
OPENCODE_INSTALL_DIRenv var anywhere at the moment, though it does unconditionally setINSTALL_DIR=$HOME/.opencode/bin: https://github.com/sst/opencode/blob/6995dab1dcef179d5b38cd114f148da9e8617ade/install#L44rimmer commentedon Nov 11, 2025
@rekram1-node it was rolled back here c87a746, without any note