What this project is

When you're trying to land web design clients, you need a hook. "Your website could be better" isn't a pitch — it's noise. But "your site scores 34 on performance, has no meta descriptions, and is serving 4MB uncompressed images" — that lands differently.

I built this CLI tool to give me data before every cold outreach. You pass it a URL, it runs a full Lighthouse audit under the hood, and spits back a color-coded report: performance score, SEO score, security headers check, biggest issues, and a one-line summary of what's broken.

It takes about 8 seconds to run. I used it before reaching out to every potential client, and it changed how those conversations started.

How I built it

The tool is a Node.js script you run from the terminal. Under the hood, it uses the Lighthouse Node.js API — not the browser extension, but the programmatic version that Google ships as an npm package. To run Lighthouse programmatically, you need a headless Chrome instance, which is where Puppeteer comes in.

The flow:

  1. User runs node audit.js https://example.com
  2. Script launches a headless Chrome via Puppeteer
  3. Lighthouse connects to that Chrome instance and audits the URL
  4. Script extracts the scores and top issues from the Lighthouse JSON
  5. Results are formatted and printed with ANSI color codes
$ node audit.js https://example-barbershop.com Launching headless Chrome... Running Lighthouse audit... ━━━ AUDIT RESULTS ━━━━━━━━━━━━━━━━━━━━━ Performance 58 / 100 SEO 41 / 100 Best Practices 87 / 100 Top Issues: ✗ Images not compressed (saves 2.3MB) ✗ Missing meta description ✗ No HTTPS redirect on all resources ✗ Render-blocking JS (saves 1.1s)

The Lighthouse API returns a massive JSON object with hundreds of audit fields. I extracted just the ones that matter for a quick pre-sales scan: performance, seo, best-practices, and accessibility category scores, plus the top failing audits sorted by impact.

ANSI color codes in Node make the output readable without needing a UI library — green for scores above 80, yellow for 50–80, red for below 50.

What I didn't expect: Lighthouse's programmatic API is significantly more flexible than the DevTools panel. You can run custom config flags, throttle the network, set the device emulation, and access audit metadata that the browser UI doesn't expose. The data goes much deeper than what most people realize.

What's running under the hood

Node.js
Runtime + CLI shell
Lighthouse API
Core audit engine
Puppeteer
Headless Chrome launcher

What I learned

The pattern I kept seeing across small business sites was painfully consistent: uncompressed images, missing meta tags, and mixed HTTP/HTTPS content. These three things alone explain why so many local business sites feel slow and rank poorly. None of them require a site rebuild to fix — but most owners don't even know they're happening.

Having audit data before a client conversation changes the dynamic completely. Instead of pitching vaguely, you can show a screenshot of the terminal output and say "here's specifically what's dragging your site down." It's harder to dismiss a number than a feeling.

If I were extending this tool, I'd add batch mode (audit a CSV of URLs) and a JSON output flag for piping results into other tools. The single-URL workflow is fine for manual prospecting, but automation would make it genuinely scalable.

Previous 3D Multiplayer Snake
Next Post Phishing Awareness Capstone