anomalyco / anomalyco/opencode
[FEATURE]: Support "extends" in opencode.json / opencode.jsonc for configuration inheritance
@jlongster is already working on this.
Since Aug 10, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Currently, OpenCode supports merging settings cascadingly from global to project-level configurations (~/.config/opencode/opencode.json and <project>/opencode.json). However, there is no native way to explicitly inherit or share standard configurations across multiple unrelated repositories using an "extends" property, similar to how it works in TypeScript (tsconfig.json), ESLint, or native JSON Schema extensions.
Adding an "extends" keyword would allow teams and developers to maintain a single "base" configuration (or reference a shared company-wide config package/file) and only override specific keys on local projects.
Proposed Behavior
In any opencode.json or opencode.jsonc, a developer should be able to define a path (local relative path or potentially a remote URL/npm package) under an extends key:
// <project-root>/opencode.jsonc
{
"$schema": "https://opencode.ai/config.json",
"extends": "../shared-configs/base-opencode.jsonc",
"model": "anthropic/claude-sonnet-4-5", // Override base model
"tools": {
"bash": true // Enable specific tool for this repo
}
}
Benefits
- Dry Configuration: Avoid copy-pasting complex MCP server setups, custom agents, or permission blocks across dozens of microservices.
- Team Standards: Organizations can distribute a single standard configuration file, and developers just extend it.
- Familiar DX: Aligns perfectly with standard ecosystem tools that developers use daily.
Additional Context
- It should support both
.jsonand.jsonctargets during resolution. - Properties within the current file should deeply merge or overwrite properties coming from the extended file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.