lacspace-har

Analyze a browser .har export offline — waterfall, weight and waste.

● Live · v0.2.0npmSource
terminal
npx lacspace-har session.har
What it does

Everything, in one command

lacspace-har parses a HAR 1.2 export and turns it into a readable report: how many requests and bytes, where the time and weight went, how much is third-party, what came from cache, and how much compression saved (or could save). It now draws a request waterfall (ASCII in the terminal or a standalone HTML page), diffs two HARs to show what changed between before/after, gates a --budget for CI, filters requests with a query, suggests savings with rough web-vitals estimates, and can redact a HAR (strip cookies/auth/bodies) so it's safe to share. Everything runs locally — the HAR never leaves your machine. Summed phase times aren't wall-clock (requests overlap), and it's only as complete as the HAR your browser wrote.

Features

What's inside

Totals & timing

Request count, transfer + content bytes, DOMContentLoaded/load, and aggregated timing phases.

Slowest & largest

The top requests by time and by weight, with status and type.

1st vs 3rd party

Domain breakdown split by first- and third-party origin.

Cache & compression

Cache hits, redirects, errors, and how many bytes compression saved.

Issue flags

Uncompressed text, oversized images, too many third parties, missing cache headers.

Offline & typed

Nothing uploaded; parseHar / analyzeHar / formatReport exported for your own tooling.

Waterfall (ASCII/HTML)

--waterfall draws request timing in the terminal, or -f html for a standalone page.

Diff two HARs

diff a.har b.har surfaces what got bigger, slower or newly added between two captures.

Perf budgets

--budget "js<300kb,requests<50,total<2mb" fails CI when a capture exceeds a limit.

Redact for sharing

redact strips cookies, auth headers and bodies so a HAR is safe to hand over.

How to use

Copy, paste, done

Real commands and snippets — from a one-liner to the typed library.

Standalone HTML report
terminal
npx lacspace-har session.har -f html -o report.html

A shareable page with the waterfall and breakdowns.

ASCII waterfall
terminal
npx lacspace-har session.har --waterfall --width 60

Request timing right in the terminal.

Diff before vs after
terminal
npx lacspace-har diff before.har after.har

Shows what changed in weight and timing between two captures.

Budget gate for CI
terminal
npx lacspace-har session.har \
  --budget "js<300kb,requests<50,total<2mb"

Exits non-zero when a capture blows the budget.

Redact for safe sharing
terminal
npx lacspace-har redact session.har -o safe.har

Strips cookies, auth and bodies.

Good for

What people build with it

Triage a slow page load offline

Quantify third-party weight

Find uncompressed or oversized assets

Turn a HAR into a shareable report

Start now

Run lacspace-har today

Free, open-source, no API keys. It's a CLI and a typed library.

terminal
npx lacspace-har session.har