Reference

CLI reference

The full ledger of commands and flags for validating files, creating configs, and checking what you've got installed.

Commands

Command Purpose
dollarlint validate [path] Validate files under a path. Defaults to the current directory if you don't specify one.
dollarlint inspect [path] List discovered files, show the schema each file would use, and explain why that association was chosen.
dollarlint init [path] Mint a starter .dollarlint.toml in the target directory.
dollarlint serve mcp Start a Model Context Protocol server over stdio so agents can validate files with DollarLint.
dollarlint version Print the installed version. Quick sanity check.
dollarlint completion Generate shell completion scripts through Cobra.

DollarLint does not treat a bare path as a validation shortcut. Use dollarlint validate [path] for every validation run.

Global flags

Flag Description
--config Use an explicit .dollarlint.toml path. Relative paths are resolved from the validation root, or beside an explicit file target. An explicit config applies to the whole run and suppresses nested config discovery.
--version, -v Print the installed version.

Validate flags

Flag Description
--formatChoose text, json, or sarif. Defaults to text.
--output, -oWrite output to a file instead of stdout. Use - or omit it for stdout.
--locationsInclude line and column positions in text output. JSON and SARIF request source locations automatically.
--verboseShow expanded issue metadata in text output.
--quietUse terse success text output and omit the summary details from failing text output.
--show-skippedShow skipped files grouped by reason, class, and coverage signal; noisy low-signal groups are summarized.
--issue-hintsControl curated issue hints: auto, off, or verbose.
--includeSet discovery include globs. Repeatable; when provided, replaces config includes for this run. CLI include globs are relative to the validation root. A glob without a slash can match a basename at any depth.
--excludeAdd a discovery exclude glob on top of config and built-in default excludes. Repeatable and relative to the validation root. A glob without a slash can match a basename at any depth.
--no-default-excludesDisable built-in discovery excludes.
--no-gitignoreDo not apply .gitignore patterns during discovery.
--force-excludeApply excludes even to explicitly passed files.
--schemaAssociate a file glob with a schema as glob=uri. Repeatable. Association globs use the same slashless-basename behavior as discovery globs.
--catalogsEnable catalog matching for conventional filenames using the configured catalog sources. Pass --catalogs=false to disable catalog matching for one run.
--catalog-sourceUse a SchemaStore-format catalog URL or local path and enable catalog matching.
--catalog-failureSet catalog failure policy to warn, error, or skip.
--max-depthSet maximum external schema reference depth.
--fetch-remoteAllow fetching HTTP(S) schemas and catalogs. Defaults to enabled; pass --fetch-remote=false to disable.
--no-schema-cacheDisable the disk cache for remote schemas and catalogs.
--fetch-retriesSet retries for transient remote schema fetch failures. Defaults to 2.
--fetch-retry-min-waitSet the minimum wait between remote schema fetch retries, such as 250ms.
--fetch-retry-max-waitSet the maximum wait between remote schema fetch retries, such as 2s.
--allow-domainAllow remote schemas from a domain. Repeatable.
--block-domainBlock remote schemas from a domain. Repeatable.
--fetch-timeoutSet schema fetch timeout, such as 10s.
--compile-timeoutSet schema compile timeout, such as 30s.

Branch-error reporting is configured in .dollarlint.toml rather than a validate flag. Use output.branchErrors = "best" for focused oneOf/anyOf diagnostics, or "all" when debugging every failed schema branch. Issue hints may be controlled either by --issue-hints or output.issueHints.

Inspect flags

dollarlint inspect [path] accepts the same discovery, association, catalog, catalog-fetch, and domain flags as validate. It does not validate file contents or compile schemas; it stops after discovery, parsing enough to find in-file declarations, and schema association.

Flag Description
--formatChoose text or json. Defaults to text.
--output, -oWrite inspect output to a file instead of stdout.

Init flags

Flag Description
--output, -oPath to the .dollarlint.toml file to create. Relative paths are resolved under the target directory, and the file must be named exactly .dollarlint.toml.
--forceOverwrite an existing config file.
--defaultsSkip prompts and use defaults plus provided flags.
--commentsAdd inline comments explaining each generated config option.
--fetch-remoteAllow fetching HTTP(S) schemas and catalogs in the generated config. Pass --fetch-remote=false to disable.
--fetch-retriesSet generated retry count for transient fetch failures. Defaults to 2.
--catalogsEnable catalog matching in the generated config. Defaults to enabled; pass --catalogs=false to write catalog matching disabled.
--catalog-failureSet generated catalog failure policy to warn, error, or skip.

MCP server

dollarlint serve mcp starts a stdio MCP server. It is meant to be launched by an MCP client, not run directly in a terminal session.

{
  "mcpServers": {
    "dollarlint": {
      "type": "local",
      "command": "dollarlint",
      "args": ["serve", "mcp"],
      "tools": ["*"]
    }
  }
}

The server exposes one tool, validate, with one optional argument: include. Pass file or glob patterns relative to the server working directory to narrow validation for a tool call, or omit it to use configured discovery. The tool includes source locations automatically and returns structured JSON with ok, message, and the regular DollarLint result payload.