Skip to content

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@latest

    Scan the current directory.

  • npx @abiramcodes/angular-doctor@latest path/to/app

    Scan that directory. Workspace detection walks up to a parent workspace root.

  • npx @abiramcodes/angular-doctor@latest --verbose --scope changed

    Scan 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.ts

    Read only the paths you list.

  • npx @abiramcodes/angular-doctor@latest --scope contextual --files src/app/app.ts

    Keep files under the same top-level folder as each seed.

  • npx @abiramcodes/angular-doctor@latest --category security

    Print one category: correctness, performance, maintainability, security, accessibility, or hygiene. The score is still the full scan.

Change the output

  • npx @abiramcodes/angular-doctor@latest --json

    Print one JSON object: score, diagnostics, totals, project, report path, skipped checks, duration, and file counts.

  • npx @abiramcodes/angular-doctor@latest --score-only

    Print the numeric score and nothing else.

  • npx @abiramcodes/angular-doctor@latest --colors pastel

    Color the terminal with the pastel palette. Also accepts default or velvet.

Inspect rules and migrations

  • npx @abiramcodes/angular-doctor@latest rules list

    List built-in rules grouped by category.

  • npx @abiramcodes/angular-doctor@latest rules list --category accessibility

    List one category.

  • npx @abiramcodes/angular-doctor@latest rules explain angular-doctor/client-secret

    Print one rule. Use the full rule id.

  • npx @abiramcodes/angular-doctor@latest migrations

    Print the ng generate @angular/core migrations that match this scan. Run them with --dry-run first.

Install

  • npx @abiramcodes/angular-doctor@latest install

    Copy 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 --force

    Overwrite an existing skill install.

  • npx @abiramcodes/angular-doctor@latest ci install

    Write .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.

Template lint rules
RuleWhat it catches
button-has-typeA <button> without a type attribute. Clicks submit by default in a form.
label-has-associated-controlA <label> with no control assigned to it.
no-anyThe any type in a template expression.
eqeqeqLoose equality (== or !=) in a template expression.
no-autofocusThe 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

Scan and install flags
FlagWhat it does
[path]Project directory. Defaults to the current working directory.
--colorsdefault, pastel, or velvet. Default is default. Applied before the command runs.
--scopefull, changed, files, or contextual. Default is full.
--filesPaths used by --scope files and --scope contextual.
--categoryLimits the printed findings. Does not change the score.
--htmlAlso write angular-doctor-report.html: one self-contained file with category tabs and grouped findings.
--jsonPrint the scan result as JSON. Skips the progress line and the text summary.
--score-onlyPrint the number. Skips the progress line and the text summary.
--verboseAccepted on a scan. Printed findings include the rule, file, line, and message. The agent skill runs with --verbose --scope changed.
--forceOn install, overwrite a skill that is already present.