Skip to content

Reporters

svelte-vitals supports seven output reporters. Select one with --reporter <fmt>, or let auto-selection pick the right one for your environment.

Human-readable text output, suitable for terminal use. Groups findings by severity and includes route paths and file locations.

Terminal window
svelte-vitals --reporter console

Machine-readable JSON output. Useful for scripts, dashboards, or feeding results into other tools.

Terminal window
svelte-vitals --reporter json

A Markdown remediation document designed for AI coding agents. Each failing finding includes:

  • The route and source file location
  • A concrete code fix with a snippet
  • An acceptance check

The agent reporter is auto-selected when svelte-vitals detects a known AI-agent environment (e.g. Claude Code sets CLAUDECODE). When auto-selected (not explicitly requested), a one-line hint is printed to stderr explaining how to override.

Terminal window
svelte-vitals --reporter agent

Override auto-selection via the environment variable:

Terminal window
SVELTE_VITALS_REPORTER=agent svelte-vitals

SARIF v2.1 format, compatible with GitHub Code Scanning, Azure DevOps, and other SAST tooling that consumes SARIF.

Terminal window
svelte-vitals --reporter sarif

GitHub Actions workflow command format. Outputs ::error and ::warning annotations that appear inline in pull requests.

The github reporter is auto-selected when GITHUB_ACTIONS=true is set (which GitHub Actions sets automatically).

Terminal window
svelte-vitals --reporter github

A compact Markdown summary — Health score, per-category score table, severity counts, and a findings table with links to each rule’s docs page. Designed for a GitHub Actions job summary or a PR comment; capped at 50 finding rows to stay within GitHub’s comment size limits. See the CI integration guide for svelte-vitals ci install, which wires this reporter into a generated workflow automatically.

Terminal window
svelte-vitals --reporter md

--reporter html writes a self-contained HTML report that you open in a browser. It’s the same UI as the live dashboard — one shared renderer, so the two can’t drift apart: the master/detail layout with a searchable, sortable route list, severity/category filters, dark mode, and a copy-to-clipboard AI Prompt on every finding. The only difference is that a static file has no dev server behind it, so the live-update machinery (SSE connection, measured refinement as you browse) is absent. The file inlines all its CSS and JS, so it works offline and is easy to attach to a CI run or share.

Terminal window
svelte-vitals --reporter html # writes svelte-vitals-report.html
svelte-vitals --reporter html --out-file report.html
svelte-vitals --reporter html --out-file - # write to stdout instead of a file

By default it writes svelte-vitals-report.html in the current directory and prints the path to stderr. Use --out-file <path> to change the location, or --out-file - to stream it to stdout (for piping or CI artifacts).

  1. Explicit --reporter <fmt> — always wins.
  2. SVELTE_VITALS_REPORTER environment variable — overrides auto-detection.
  3. AI-agent environment (e.g. CLAUDECODE is set) → agent.
  4. GitHub Actions (GITHUB_ACTIONS=true) → github.
  5. Defaultconsole.
.github/workflows/seo.yml
- name: Check SEO
run: npx svelte-vitals@latest --fail-on warning
# GITHUB_ACTIONS is already set; github reporter is auto-selected