Share a Lighthouse report
Lighthouse gives you two outputs, and neither of them is shareable.
The JSON is a machine artifact — thousands of lines, no one reads it. The HTML report is a self-rendering JavaScript application: to share it you either host it somewhere, mail a file around, or tell your colleague to drag it into the Lighthouse Viewer. In practice, most teams do none of these. They screenshot the four coloured circles into Slack and the underlying opportunities — the part with the actual work in it — get lost.
Publish the report, a digest, or both
Lighthouse's HTML output is one self-contained file, and Comma renders
report HTML verbatim with scripts enabled inside a sandboxed iframe — so
lh.report.html can be published as-is and stays interactive:
lighthouse https://example.com --output html --output-path ./lh.report.html
curl -fsS -X POST https://commareports.com/api/v1/reports \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html lh.report.html \
'{title: "Lighthouse — example.com", html: $html}')"
The reason to render your own digest anyway is review, not rendering. The full audit list is 40+ sections; the thing a team argues about every week is five scores and three opportunities. A short table is a better comment surface and a far better diff between runs.
lighthouse https://example.com \
--output json --output html \
--output-path ./lh
# lh.report.json → digest.html (a ~30-line script: scores + opportunities)
curl -fsS -X POST https://commareports.com/api/v1/reports \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html digest.html \
'{title: "Performance — example.com", html: $html}')"
A useful digest is a table, not a dashboard: the five category scores,
Core Web Vitals (LCP, CLS, INP, TBT), and the top opportunities with their
estimated savings. Attach lh.report.json and lh.report.html as
assets — 25 MB per file — so the full interactive report is
one download away when someone needs to dig.
Store the token in your CI secret store as a scoped
token with only reports:write. The mechanics are the
same in any pipeline; see publish from CI.