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 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.

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.
--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 and JSON output. SARIF requests 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 files skipped because they do not declare or match a schema.
--includeSet discovery include globs. Repeatable; when provided, replaces config includes for this run. A glob without a slash can match a basename at any depth.
--extend-excludeAdd a discovery exclude glob on top of config and built-in default excludes. Repeatable. 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.
--schema-storeMatch conventional filenames using the SchemaStore catalog.
--schema-store-urlUse a SchemaStore-format catalog URL or local path and enable catalog matching.
--schema-store-failureSet catalog failure policy to warn, error, or skip.
--max-depthSet maximum external schema reference depth.
--fetch-remoteAllow fetching HTTP schemas. 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.
--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.

Init flags

Flag Description
--output, -oPath to the .dollarlint.toml file to create.
--forceOverwrite an existing config file.
--defaultsSkip prompts and use defaults plus provided flags.
--fetch-remoteAllow fetching HTTP schemas in the generated config. Pass --fetch-remote=false to disable.
--fetch-retriesSet generated retry count for transient fetch failures. Defaults to 2.
--schema-storeEnable the built-in SchemaStore catalog in the generated config. Defaults to enabled.
--schema-store-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.