summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authoropencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>2025-07-18 14:15:10 -0400
committerGitHub <[email protected]>2025-07-18 14:15:10 -0400
commit01e7dc2d02e931be8dda945d44971c178a1a6a15 (patch)
tree8db3468e9a4cea79b2b16ced6af2e0d42dea59f3 /README.md
parent611854e4b68a2bfa30b336c1fa5135765c593f0f (diff)
downloadopencode-01e7dc2d02e931be8dda945d44971c178a1a6a15.tar.gz
opencode-01e7dc2d02e931be8dda945d44971c178a1a6a15.zip
Added install dir priority & user feedback (#1129)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: thdxr <[email protected]>
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3a40bc4c4..87afde2d4 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,21 @@ paru -S opencode-bin # Arch Linux
> [!TIP]
> Remove versions older than 0.1.x before installing.
+#### Installation Directory
+
+The install script respects the following priority order for the installation path:
+
+1. `$OPENCODE_INSTALL_DIR` - Custom installation directory
+2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path
+3. `$HOME/bin` - Standard user binary directory (if exists or can be created)
+4. `$HOME/.opencode/bin` - Default fallback
+
+```bash
+# Examples
+OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
+XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
+```
+
### Documentation
For more info on how to configure opencode [**head over to our docs**](https://opencode.ai/docs).