Skip to content

enhancement(core): add config resolve and doctor commands #17164

@LeonardBode

Description

@LeonardBode

Problem

OpenCode config can be composed from multiple sources, but there is no first-class CLI flow that shows the fully resolved runtime config or explains why a value won, was ignored, or is still unresolved. Downstream integrations end up building custom sync and debugging layers around config merge behavior.

Impact

This makes enterprise and generated-config setups harder to operate, especially when users mix global, project, inline, and generated config. It also turns troubleshooting into trial-and-error because there is no single source of truth for the effective config.

Fix

Add opencode config resolve and opencode config doctor.

  • resolve should print the effective merged config in a machine-readable form.
  • doctor should report source precedence, unknown keys, deprecated keys, unresolved {env:...} and {file:...} refs, and ignored sections.
  • Both commands should work with custom config paths and eventually support selected profiles once profiles land.

File

docs/config/ L1

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)docs

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions