From 4f331cc9cf7cfe63c28194c7c4229429569c5099 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 13 Oct 2026 14:19:31 +0200 Subject: 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. --- opencode2-bin/opencode2 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 opencode2-bin/opencode2 (limited to 'opencode2-bin/opencode2') diff --git a/opencode2-bin/opencode2 b/opencode2-bin/opencode2 new file mode 100644 index 0000000..5f7bc4f --- /dev/null +++ b/opencode2-bin/opencode2 @@ -0,0 +1,9 @@ +#!/bin/sh + +# Launch OpenCode 2.0 with its own config and data directories, so it does +# not read or write the v1 opencode package's ~/.config/opencode and +# ~/.local/share/opencode. Edit the two paths below to relocate them. +export XDG_CONFIG_HOME="$HOME/.config/opencode2" +export XDG_DATA_HOME="$HOME/.local/share/opencode2" + +exec /usr/libexec/opencode2/opencode "$@" -- cgit v1.2.3