opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Opencode adds stuff to global config folder

Open einarpersson opened this issue 2 months ago • 2 comments

I noticed that opencode added some random stuff to the global config folder $HOME/.config/opencode

.config/opencode via 🥟
❯ ll
total 12K
drwxr-xr-x. 1 einar  22 Oct 14 18:33 agent
drwxr-xr-x. 1 einar  30 Oct 15 15:24 node_modules
-rw-r--r--. 1 einar 689 Oct 15 15:24 bun.lock
-rw-r--r--. 1 einar  45 Oct 15 15:24 .gitignore
-rw-r--r--. 1 einar  63 Oct 15 15:24 package.json

Why? These aren't config files (expect my agent folder), but rather lookes like some internal concerns that should be somewhere else, eg $XDG_CACHE_HOME or something. I like to keep my dotfiles folder nice and clean and only have stuff there which I control.

If i delete node_modules, bun.lock, package.json and .gitignore and start opencode everything works still. The files are recreated.

I am not an expert in the XDG spec but my feeling is that these files should live elsewhere. https://specifications.freedesktop.org/basedir-spec/latest/

einarpersson avatar Oct 15 '25 13:10 einarpersson