master-css lint
Run machine-readable Master CSS diagnostics for source files.
Invocation and options
master-css lint [options] [source paths...]Run from the project root. Omit source paths for ordinary source discovery, or quote a path/glob argument to scope the scan. Explicit paths replace the default file selection; they are not additional includes. This command runs native class diagnostics; it does not load the project’s ESLint configuration.
Complete command help
Usage: master-css lint [options] [source paths...]Run machine-readable Master CSS diagnostics for source files.Arguments: source paths The glob pattern paths to lint sourcesOptions: --stdin Read source content from stdin. --stdin-filepath <path> File path used to infer the stdin source language. --fix Apply safe class-list fixes to files. --fix-dry-run Return fix proposals without writing files. --fix-directives Allow structural directive fixes when --fix writes files. --format <format> Diagnostic output format: json or stylish. (default: "json") --rules <rules> Comma-separated lint rules, "recommended", or "all". --exit-code <mode> Exit code behavior: diagnostics or never. (default: "diagnostics") --max-warnings <number> Exit with a non-zero status if warnings exceed this count. -h, --help display help for commandEffects and lifecycle
Without --fix, source files remain unchanged. --fix applies supported class-list fixes, then reports remaining diagnostics. --fix-dry-run prevents writes even when --fix is also present. Add --fix-directives only when structural directive rewrites are intended.
--stdin reads a buffer instead of project files; --stdin-filepath supplies its language context and defaults to stdin.html. Stdin buffers are not written back to disk, even with --fix.
Output and errors
The default --format json writes a versioned report to stdout. --format stylish writes human-readable output to stderr. With the default --exit-code diagnostics, errors produce a nonzero status; warnings do so when their count exceeds --max-warnings. --exit-code never suppresses diagnostic-based failure, so read the report before treating the command as a passing check. Argument and process failures can still fail.
The JSON report contains cwd, manifest, files, and summary. Clean files are omitted from files; diagnostic records may contain fix proposals. This report is not a complete before/after file diff. Use the MCP preview workflow when you need full proposed file contents before applying them.
Example
Run from the project root after installing the CLI:
Inspect class-order proposals in one existing source file:
master-css lint "src/button.html" \ --rules sort-classes \ --fix-dry-runApply those class-order fixes after reviewing the proposals:
master-css lint "src/button.html" \ --rules sort-classes \ --fixInspect a source buffer on stdin without modifying its virtual file:
master-css lint --stdin \ --stdin-filepath src/button.html \ --rules sort-classes <<'HTML'<button class="p-md flex"> Save</button>HTMLSee the CLI guide for setup.