DEV Community

Felipe Leon
Felipe Leon

Posted on

I built a CLI that gives your Angular project a health score (0-100)

The problem

Every Angular codebase I've worked on had the same invisible issues:

  • Components without ChangeDetectionStrategy.OnPush
  • RxJS subscriptions that never unsubscribe
  • *ngFor without trackBy
  • Zero Signals adoption in Angular 17+ projects

These don't break your app immediately. They pile up silently until
performance tanks and nobody knows why.

What I built

Angular Health Check — a CLI that scans your project statically and
returns a normalized score from 0 to 100.


bash
npx @angular-health-check/cli scan .
Output:


✔ Scanned 47 files in 1.2s

Score: 74 / 100  ·  Good

Issues found:
  ✗ 3 errors    → OnPush missing (HomeComponent, UserListComponent, CardComponent)
  ⚠ 7 warnings  → RxJS: subscribe without takeUntil/async pipe (5 files)
  ℹ 4 infos     → ngFor without trackBy
The score is normalized by project size — a 5-file project and a
500-file project are scored on the same scale.

Detection rules
Rule    Severity
Missing OnPush  Error
RxJS leak (no unsubscribe)  Warning
ngFor without trackBy   Info
No Signals adoption (Angular 17+)   Warning
Performance anti-patterns   Warning
The dashboard
Every scan auto-syncs to angularhc.dev:

Score history chart over time
Scan-to-scan diff comparison
GitHub PR integration (auto-comment on every PR with the score)
Team dashboard sharing
First you authenticate the CLI:


ahc login
Then every ahc scan . pushes results to your dashboard automatically.

GitHub PR integration
With the Pro plan, every pull request gets an automatic comment:


Angular Health Check · Score: 81/100 (+7 vs main)
✔ OnPush: all components
⚠ 2 RxJS warnings in auth.service.ts
Install

npm install -g @angular-health-check/cli
ahc login
ahc scan .
Free plan includes 20 stored scans. Pro is $9/mo for unlimited scans,
full history, and GitHub integration.

→ angularhc.dev
→ npm: @angular-health-check/cli

What's your Angular project's score? Drop it in the comments.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)