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 |
|---|---|
--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 and JSON output. SARIF requests 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 files skipped because they do not declare or match a schema. |
--include | Set 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-exclude | Add 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-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. |
--schema-store | Match conventional filenames using the SchemaStore catalog. |
--schema-store-url | Use a SchemaStore-format catalog URL or local path and enable catalog matching. |
--schema-store-failure | Set catalog failure policy to warn, error, or skip. |
--max-depth | Set maximum external schema reference depth. |
--fetch-remote | Allow fetching HTTP schemas. 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. |
--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.
Init flags
| Flag | Description |
|---|---|
--output, -o | Path to the .dollarlint.toml file to create. |
--force | Overwrite an existing config file. |
--defaults | Skip prompts and use defaults plus provided flags. |
--fetch-remote | Allow fetching HTTP schemas in the generated config. Pass --fetch-remote=false to disable. |
--fetch-retries | Set generated retry count for transient fetch failures. Defaults to 2. |
--schema-store | Enable the built-in SchemaStore catalog in the generated config. Defaults to enabled. |
--schema-store-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.