Reporters
svelte-vitals supports seven output reporters. Select one with --reporter <fmt>, or let auto-selection pick the right one for your environment.
Available reporters
Section titled “Available reporters”console (default)
Section titled “console (default)”Human-readable text output, suitable for terminal use. Groups findings by severity and includes route paths and file locations.
svelte-vitals --reporter consoleMachine-readable JSON output. Useful for scripts, dashboards, or feeding results into other tools.
svelte-vitals --reporter jsonA 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.
svelte-vitals --reporter agentOverride auto-selection via the environment variable:
SVELTE_VITALS_REPORTER=agent svelte-vitalsSARIF v2.1 format, compatible with GitHub Code Scanning, Azure DevOps, and other SAST tooling that consumes SARIF.
svelte-vitals --reporter sarifgithub
Section titled “github”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).
svelte-vitals --reporter githubA 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.
svelte-vitals --reporter mdHTML report
Section titled “HTML report”--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.
svelte-vitals --reporter html # writes svelte-vitals-report.htmlsvelte-vitals --reporter html --out-file report.htmlsvelte-vitals --reporter html --out-file - # write to stdout instead of a fileBy 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).
Auto-selection priority
Section titled “Auto-selection priority”- Explicit
--reporter <fmt>— always wins. SVELTE_VITALS_REPORTERenvironment variable — overrides auto-detection.- AI-agent environment (e.g.
CLAUDECODEis set) →agent. - GitHub Actions (
GITHUB_ACTIONS=true) →github. - Default →
console.
Example: CI pipeline
Section titled “Example: CI pipeline”- name: Check SEO run: npx svelte-vitals@latest --fail-on warning # GITHUB_ACTIONS is already set; github reporter is auto-selected