Skip to main content
Guides

Generating Static Reports

The CI executable can export a dashboard after a successful scan.

pnpm add -D unlighthouse@beta
pnpm exec unlighthouse-ci --site https://example.com --build-static --reporter json

Publish the generated client directory as static files. Keep the complete directory so report assets remain available.

Programmatic export

import { createUnlighthouseHost } from 'unlighthouse'

const host = await createUnlighthouseHost({
  userConfig: { site: 'https://example.com' },
  behavior: { ws: null },
})
const session = await host.start()
await session.done
await host.generateClient({ static: true })

CI result files

JSON exports use ci-result.json; CSV exports use ci-result.csv. These exports are separate from the static dashboard. See CI Integration for reporter selection and device rows.

Did this page help you?
Anything that could be done better? :)
Help us improve this page. You can edit this page on GitHub or provide anonymous feedback below.