diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-13 14:19:31 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-13 14:19:31 +0200 |
| commit | 4f331cc9cf7cfe63c28194c7c4229429569c5099 (patch) | |
| tree | 38574ea837056cc0848ea586cae371e12644bbbc /opencode2-bin/README | |
| parent | d6577d3a03320d55b24c69500a9880c2134ede9a (diff) | |
| download | my-slackbuilds-4f331cc9cf7cfe63c28194c7c4229429569c5099.tar.gz my-slackbuilds-4f331cc9cf7cfe63c28194c7c4229429569c5099.zip | |
opencode2-bin: isolate config/state with a launcher wrapper
Install the real binary as /usr/libexec/opencode2/opencode and make
/usr/bin/opencode2 a wrapper that points XDG_CONFIG_HOME and
XDG_DATA_HOME at opencode2-specific directories, so 2.0 does not touch
the v1 opencode package's config, auth or state.
Diffstat (limited to 'opencode2-bin/README')
| -rw-r--r-- | opencode2-bin/README | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/opencode2-bin/README b/opencode2-bin/README index 511792d..67f16b7 100644 --- a/opencode2-bin/README +++ b/opencode2-bin/README @@ -12,12 +12,11 @@ The binary is compiled with Bun and is self-contained (no runtime dependencies). The default build targets glibc x86_64 with AVX2. On a CPU without AVX2, use the `-baseline` variant instead. -OpenCode v1 and v2 share the same configuration and state directories -(`~/.config/opencode`, `~/.local/share/opencode`). To test 2.0 without -touching the v1 state, run it with an isolated XDG environment, e.g.: - - XDG_CONFIG_HOME=~/.config/opencode2 \ - XDG_DATA_HOME=~/.local/share/opencode2 \ - opencode2 +OpenCode v1 and v2 would otherwise share the same configuration and +state directories (`~/.config/opencode`, `~/.local/share/opencode`). +The `opencode2` command is therefore a wrapper that launches the real +binary with `XDG_CONFIG_HOME` and `XDG_DATA_HOME` pointed at +`~/.config/opencode2` and `~/.local/share/opencode2`, keeping 2.0's +config and state separate from the v1 package. Homepage: https://opencode.ai |
