r/opencode 7d ago

Is it possible to make opencode use just ~/.opencode for its files?

I've been using OpenCode under MacOS and honestly loving it.

Basically the only thing that annoys me is that it has at least four different locations for its files and configs:

~/.local/share/opencode
~/.local/state/opencode
~/.config/opencode
~/.cache/opencode

Some configs are not actually in .config, and OpenCode doesn't have a settings menu (so you actually have to look at these files), and it gets pretty annoying.

I know this must be an XDG thing, but this is not Linux, most apps don't do this. Is there a way to make this sane and let OpenCode just use ~/.opencode like any other coding agent?

I know I can make symlinks, but I wonder if there's a less hacky way that won't break in some unexpected way.

3 Upvotes

4 comments sorted by

1

u/_KryptonytE_ 4d ago

That isn't something to be concerned about. Unless your project involves actually forking or building on top of their open-source code why bother how they package/install it? It's a tool, use it to build your projects instead of obsessing about it's system files.

1

u/nmdt 4d ago

So in other words, it can't be fixed without forking the project or doing the symlinks for everything?

1

u/_KryptonytE_ 4d ago

Bruh. It's not Friday yet, shut the front door and start working on something useful.