JSON Schema for the native V2 opencode.json(c) shape. OpenCode hosts no V2 config schema.
https://opencode.ai/config.jsonis the V1 schema (provider,plugin,permission,agent). Editors flag V2 keys (providers,plugins,permissions,agents) as errors.- The V2 site build only publishes
https://opencode.ai/v2/cli.jsonandopenapi.json(services/www/package.jsongeneratescript). - OpenCode's built-in skill says it directly: "The schema served from https://opencode.ai/config.json may describe V1 even though V2 configuration files include that URL."
Generated with Schema.toJsonSchemaDocument(Info) from @opencode/schema/config 2.0.19 (Effect 4.0.0-rc.112). Same method OpenCode uses for cli.json (packages/cli/script/schema.ts).
- Config schema source: https://github.com/anomalyco/opencode/blob/v2.0.19/packages/schema/src/config.ts
- Config field schemas: https://github.com/anomalyco/opencode/tree/v2.0.19/packages/schema/src/config
- cli.json generator (method used here): https://github.com/anomalyco/opencode/blob/v2.0.19/packages/cli/script/schema.ts
- Website generate script: https://github.com/anomalyco/opencode/blob/v2.0.26/services/www/package.json
- V2 config docs: https://opencode.ai/v2/docs/config
- V1 to V2 migration: https://opencode.ai/v2/docs/migrate-v1
- Permissions: https://opencode.ai/v2/docs/permissions
- Providers: https://opencode.ai/v2/docs/providers
- Models: https://opencode.ai/v2/docs/models
- Agents: https://opencode.ai/v2/docs/agents
- Commands: https://opencode.ai/v2/docs/commands
- Skills: https://opencode.ai/v2/docs/skills
- Plugins: https://opencode.ai/v2/docs/plugins
- MCP servers: https://opencode.ai/v2/docs/mcp-servers
- Compaction: https://opencode.ai/v2/docs/compaction
- npm package: https://www.npmjs.com/package/@opencode/schema
{ "$schema": "https://gist.githubusercontent.com/remorses/776ab3907d24c1fe9749232f0189588a/raw/opencode-v2-config.schema.json" }