You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: for splitting config across multiple files #19353
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I want to split my opencode.jsonc into separate files. Right now if you have a lot of MCP servers, agent configs, or provider settings, the single config file gets long and messy. You can work around it with .opencode/ directory configs and OPENCODE_CONFIG env vars, but those are workarounds, not a proper composition mechanism.
I'd like a field that lets you reference other JSON/JSONC files and have them merged in
Extended files would merge in array order, with the main config taking precedence on conflicts. Extended files should be able to their own files too, with circular reference detection so it doesn't loop forever.
Reacted by Simon Knittel, b00pka, Veerendra and Abdelaziz Elshrkawy
Reacted by David Rolon, Chung-Chiang Cheng and Simon Knittel
The feature request is missing the required verification checkbox: - [x] I have verified this feature I'm about to request hasn't been suggested before.
The issue title appears incomplete — it reads [FEATURE]: for splitting config across multiple files, with a blank where the feature name should be (e.g. [FEATURE]: extends support for splitting config across multiple files)
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
Thanks for updating the issue! The verification checkbox is now checked and the description clearly explains the problem and desired feature. The issue looks good — appreciate you taking the time to fix it.
FWIW, you can already currently split your config between an opencode.json and opencode.jsonc file, which will be merged.
Hmm, interesting. Cheers for that, Ariane.
Would I just put some of the stuff in opencode.json and then some of the other stuff in opencode.jsonc?
The main reason for this was to split up my models, due to having a lot of blacklists for different providers and what not, as shown here, in my opencode.jsonc.
@mynameistito I was playing with a similar idea with an {import:somefile.json} syntax, but I got distracted and so there's some things I didn't finish (I'd wanted to add glob support and make things like {import:./conf-parts/*.json} work), but what's there worked correctly so far as I was able to observe while I was messing around with it: ariane-emory#150
Activity
github-actions commentedon Mar 27, 2026
This issue does not fully meet our contributing guidelines.
What needs to be fixed:
- [x] I have verified this feature I'm about to request hasn't been suggested before.[FEATURE]: for splitting config across multiple files, with a blank where the feature name should be (e.g.[FEATURE]: extends support for splitting config across multiple files)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Mar 27, 2026
Thanks for updating the issue! The verification checkbox is now checked and the description clearly explains the problem and desired feature. The issue looks good — appreciate you taking the time to fix it.
ariane-emory commentedon Mar 27, 2026
FWIW, you can already currently split your config between an
opencode.jsonandopencode.jsoncfile, which will be merged.mynameistito commentedon Mar 27, 2026
Hmm, interesting. Cheers for that, Ariane.
Would I just put some of the stuff in
opencode.jsonand then some of the other stuff inopencode.jsonc?The main reason for this was to split up my
models, due to having a lot of blacklists for different providers and what not, as shown here, in myopencode.jsonc.ariane-emory commentedon Mar 27, 2026
@mynameistito Essentially, yes: just put whatever config content you'd like to in either file.
The same also applies to
tui.jsonandtui.jsonc, valid content can be split between either of the two files.mynameistito commentedon Mar 27, 2026
Hmm ty for that! will check it out 😅
Then when I've got some tokens to burn, I'll attempt a non slop PR of this 🤣
ariane-emory commentedon Mar 27, 2026
@mynameistito I was playing with a similar idea with an
{import:somefile.json}syntax, but I got distracted and so there's some things I didn't finish (I'd wanted to add glob support and make things like{import:./conf-parts/*.json}work), but what's there worked correctly so far as I was able to observe while I was messing around with it: ariane-emory#150github-actions commentedon Jul 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
voronkovich commentedon Nov 8, 2026
I made it with
jqandMakefile:See: voronkovich/dotfiles@8c1e18b