Reference
The commands, the flags they accept, and how the score is calculated.
These are the commands. --colors works on all of them. Anything other than default, pastel, or velvet exits with an error that names those three.
Scan
npx @abiramcodes/angular-doctor@latestScan the current directory.
npx @abiramcodes/angular-doctor@latest path/to/appScan that directory. Workspace detection walks up to a parent workspace root.
npx @abiramcodes/angular-doctor@latest --verbose --scope changedScan source files git shows as changed. This is the command to run after an edit. With no changes, it scans nothing.
npx @abiramcodes/angular-doctor@latest --scope files --files src/app/app.tsRead only the paths you list.
npx @abiramcodes/angular-doctor@latest --scope contextual --files src/app/app.tsKeep files under the same top-level folder as each seed.
npx @abiramcodes/angular-doctor@latest --category securityPrint one category: correctness, performance, maintainability, security, accessibility, or hygiene. The score is still the full scan.
Change the output
npx @abiramcodes/angular-doctor@latest --jsonPrint one JSON object: score, diagnostics, totals, project, report path, skipped checks, duration, and file counts.
npx @abiramcodes/angular-doctor@latest --score-onlyPrint the numeric score and nothing else.
npx @abiramcodes/angular-doctor@latest --colors pastelColor the terminal with the pastel palette. Also accepts default or velvet.
Inspect rules and migrations
npx @abiramcodes/angular-doctor@latest rules listList built-in rules grouped by category.
npx @abiramcodes/angular-doctor@latest rules list --category accessibilityList one category.
npx @abiramcodes/angular-doctor@latest rules explain angular-doctor/client-secretPrint one rule. Use the full rule id.
npx @abiramcodes/angular-doctor@latest migrationsPrint the ng generate @angular/core migrations that match this scan. Run them with --dry-run first.
Install
npx @abiramcodes/angular-doctor@latest installCopy the agent skill to .cursor/skills/angular-doctor and .agents/skills/angular-doctor. An existing skill is left in place.
npx @abiramcodes/angular-doctor@latest install --forceOverwrite an existing skill install.
npx @abiramcodes/angular-doctor@latest ci installWrite .github/workflows/angular-doctor.yml when that file is not already there.
Template lint
Standalone templates and inline component templates run through the Angular template rules. Five rules are enabled; the rest are deliberately off because the built-in scanner already covers them with class context the linter cannot see.
| Rule | What it catches |
|---|---|
button-has-type | A <button> without a type attribute. Clicks submit by default in a form. |
label-has-associated-control | A <label> with no control assigned to it. |
no-any | The any type in a template expression. |
eqeqeq | Loose equality (== or !=) in a template expression. |
no-autofocus | The autofocus attribute, which steals focus on load. |
The angular-doctor/defer-missing-trigger check covers @defer blocks without an on, when, or prefetch trigger. See the Rules page for details.
Flags
| Flag | What it does |
|---|---|
[path] | Project directory. Defaults to the current working directory. |
--colors | default, pastel, or velvet. Default is default. Applied before the command runs. |
--scope | full, changed, files, or contextual. Default is full. |
--files | Paths used by --scope files and --scope contextual. |
--category | Limits the printed findings. Does not change the score. |
--html | Also write angular-doctor-report.html: one self-contained file with category tabs and grouped findings. |
--json | Print the scan result as JSON. Skips the progress line and the text summary. |
--score-only | Print the number. Skips the progress line and the text summary. |
--verbose | Accepted on a scan. Printed findings include the rule, file, line, and message. The agent skill runs with --verbose --scope changed. |
--force | On install, overwrite a skill that is already present. |