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 |
|---|---|
--format | Choose text, json, or sarif.
Defaults to text. |
--output, -o | Write output to a file instead of stdout. Use - or omit
it for stdout. |
--locations | Include line and column positions in text output. JSON and SARIF request source locations automatically. |
--verbose | Show expanded issue metadata in text output. |
--quiet | Use terse success text output and omit the summary details from failing text output. |
--show-skipped | Show skipped files grouped by reason, class, and coverage signal; noisy low-signal groups are summarized. |
--issue-hints | Control curated issue hints: auto, off,
or
verbose. |
--include | Set 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. |
--exclude | Add 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-excludes | Disable built-in discovery excludes. |
--no-gitignore | Do not apply .gitignore patterns during discovery. |
--force-exclude | Apply excludes even to explicitly passed files. |
--schema | Associate a file glob with a schema as glob=uri.
Repeatable. Association globs use the same slashless-basename
behavior as discovery globs. |
--catalogs | Enable catalog matching for conventional filenames using the
configured catalog sources. Pass --catalogs=false to disable
catalog matching for one run. |
--catalog-source | Use a SchemaStore-format catalog URL or local path and enable catalog matching. |
--catalog-failure | Set catalog failure policy to warn, error, or skip. |
--max-depth | Set maximum external schema reference depth. |
--fetch-remote | Allow fetching HTTP(S) schemas and catalogs. Defaults to enabled;
pass --fetch-remote=false to disable. |
--no-schema-cache | Disable the disk cache for remote schemas and catalogs. |
--fetch-retries | Set retries for transient remote schema fetch failures. Defaults to 2. |
--fetch-retry-min-wait | Set the minimum wait between remote schema fetch retries, such as 250ms. |
--fetch-retry-max-wait | Set the maximum wait between remote schema fetch retries, such as 2s. |
--allow-domain | Allow remote schemas from a domain. Repeatable. |
--block-domain | Block remote schemas from a domain. Repeatable. |
--fetch-timeout | Set schema fetch timeout, such as 10s. |
--compile-timeout | Set 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 |
|---|---|
--format | Choose text or json. Defaults to text. |
--output, -o | Write inspect output to a file instead of stdout. |
Init flags
| Flag | Description |
|---|---|
--output, -o | Path to the .dollarlint.toml file to create. Relative paths
are resolved under the target directory, and the file must be named exactly
.dollarlint.toml. |
--force | Overwrite an existing config file. |
--defaults | Skip prompts and use defaults plus provided flags. |
--comments | Add inline comments explaining each generated config option. |
--fetch-remote | Allow fetching HTTP(S) schemas and catalogs in the generated
config. Pass --fetch-remote=false to disable. |
--fetch-retries | Set generated retry count for transient fetch failures. Defaults to 2. |
--catalogs | Enable catalog matching in the generated config. Defaults to
enabled; pass --catalogs=false to write catalog matching
disabled. |
--catalog-failure | Set 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.