JSON schema

Molt ships a JSON Schema for its configuration so your editor can autocomplete and validate .molt/config.json as you type.

What ships, and why it is always correct

Molt's config is defined by a pydantic model. That same model generates the JSON Schema for free -- molt does not maintain a schema file by hand, so the schema can never drift out of sync with what the tool actually accepts. When an option is added, renamed, or given a new default, the published schema reflects it in the same release. Both the canonical snake_case names and their changesets-compatible camelCase aliases appear in the schema, so autocomplete works whichever spelling you use.

Referencing it from .molt/config.json

Add a $schema key pointing at molt's published schema. Editors that understand JSON Schema (VS Code out of the box, plus most others) will then offer completion, inline docs, and validation:

{
  "$schema": "https://molt.dev/schema/config.json",
  "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "fixed": [["acme-core", "acme-runtime"]]
}

The $schema key is informational only -- molt itself ignores it when reading config, so it never affects behavior. The schema is also bundled inside the installed molt-cli package, so tooling can resolve it offline against the exact version you have installed.

Editor setup

VS Code / JSON-aware editors. The $schema key above is enough. No extension or settings change is required; the editor fetches the schema and starts validating immediately.

Associating without $schema. If you would rather not add the key to every file, associate the schema by filename in your editor settings. In VS Code:

{
  "json.schemas": [
    {
      "fileMatch": [".molt/config.json"],
      "url": "https://molt.dev/schema/config.json"
    }
  ]
}

TOML ([tool.molt] in pyproject.toml). JSON Schema does not attach to TOML automatically, but Taplo-based tooling (the Even Better TOML extension) can apply the same schema via a directive at the top of the file or a Taplo config entry, giving [tool.molt] the same completion. Molt registers its schema with SchemaStore so this works with minimal setup.

It stays in sync automatically

Because the schema is derived from the implementation rather than written separately, there is nothing to keep updated and no chance of the schema promising an option the tool rejects (or omitting one it accepts). Pin the $schema URL to a specific molt version if you want completion to match an older installed version exactly; otherwise the latest schema tracks the latest release.

Where to go next