master-css inspect
Inspect scanner state, stylesheet entries, generated CSS, and missing CSS.
Invocation and options
master-css inspect [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. Use this report to connect missing CSS to source discovery, stylesheet entries, and generated output.
Complete command help
Usage: master-css inspect [options] [source paths...]Inspect scanner state, stylesheet entries, generated CSS, and missing CSS.Arguments: source paths The glob pattern paths to inspectOptions: --classes <classes> Whitespace-separated class names to verify in generated CSS. --include-css Include generated CSS text in the JSON report. --format <format> Diagnostic output format: json or stylish. (default: "json") --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
This command reads sources and composes an inspection report without publishing CSS or rewriting source files. --classes requests checks against the scan output; it does not add those classes to source or safelist them. --include-css adds the generated text to the report.
Inspect the returned stylesheet entries and diagnostics for project configuration. In the current standalone path, entry discovery and inspection have limitations with package-backed entries; an empty result does not prove that no CSS is needed. See Authoring Packages for the documented boundary.
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 includes cwd, inputs, files, scanner, stylesheets, css, missingCSS, diagnostics, and summary. Check missingCSS.present and missingCSS.missing alongside the actual entries and diagnostics. css.text is included only when requested.
Example
Run from the project root after installing the CLI:
Check a class used by an existing source file and include generated CSS:
master-css inspect \ "src/button.html" \ --classes "p-md" \ --include-cssRead a human-readable report on stderr:
master-css inspect \ --classes "p-md" \ --format stylishSave JSON for automation while retaining diagnostic-based exit status:
master-css inspect \ --include-css > inspection.jsonSee the CLI guide for setup.