Skip to content
@pyreon/cli · lint · devtools · mcp · testing
tools · developer experience

Catch the bug that type-checks and never updates.

pyreon doctor runs up to ten gates over your app and returns one score from 0 to 100, with the fix printed under each finding. Behind it: 144 lint rules that know what a signal is, a test kit that can assert an effect did not re-run, and a DevTools panel for the reactive graph.

bun add -D @pyreon/cli @pyreon/lint @pyreon/testing
Documentation
doctor
15 gates · 0–100 score10 check any app; 5 audit the Pyreon repo itself and skip in yours
lint
144 rules · 26 categories99 on in recommended; 32 more in best-practices
testing
Testing Library API + graph matchersnotToReRunWhen, toHaveRecomputedTimes, leak checks
output
terminal · JSON · GitHub annotations--ci fails the job on errors only
The Reactivity Lens overlay in a dev build of a Pyreon counter app: the Inspect tab explains that the picked text shows one reactive value, derived#32, which recomputed because the count signal changed, with the source file and line of each step. The counter reads 3, with count, doubled and isEven listed below.The Reactivity Lens overlay in a dev build of a Pyreon counter app: the Inspect tab explains that the picked text shows one reactive value, derived#32, which recomputed because the count signal changed, with the source file and line of each step. The counter reads 3, with count, doubled and isEven listed below.
  • 144 lint rules in 26 categories, from reactivity and JSX to SSR, routing, forms and security.allRules in packages/tools/lint/src/rules/index.ts, counted 13 Nov 2026 with #4479, +4 since (consistent-signal-read, prefer-style-modifier, no-raw-css-string, no-theme-props-in-style); pyreon-lint --list prints "144 rules in 11 groups"
  • 10 doctor gates that check any app, feeding one 0–100 score. Unmeasured categories are left out, not counted as 100.GateName in packages/tools/cli/src/doctor/gate-names.ts (15 gates); distribution, doc-claims, audit-leak-classes, audit-types and bundle-budgets skip outside the Pyreon repo (their gates/*.ts skipReason); score.ts (mean of included categories)
  • 7 test-kit subpaths that set up form, router, store, i18n, query, toast and theme for you.packages/tools/testing/package.json exports ./form ./ui ./router ./store ./i18n ./toast ./query

synthetic · author-run · M3 Max · record of 2026-11-05

Every result, including where we lose →
why teams pick it

Tooling that knows how Pyreon breaks.

  1. It knows the framework

    Generic linters see valid TypeScript. pyreon/no-props-destructure sees ({ title }) => and flags it: a destructured prop is read once and breaks reactive prop tracking.

  2. A score you can gate on

    pyreon doctor --ci exits 1 on error findings only. Warnings cost points, advisory best-practice findings never block, and a gate that scanned nothing says so instead of passing.

  3. Findings on the exact line

    --gha prints GitHub Actions annotations with file, line and column, so each finding sits on the diff in "Files changed".

  4. Tests that can say "did not"

    expectEffect(e).notToReRunWhen(() => theme.set('dark')) asserts an unrelated write left an effect alone. A render-counting test cannot express that.

the difference

Valid TypeScript. Dead UI.

ships

Type-checks with tsc, compiles, renders once. When the parent changes title, the heading never updates.

import { signal } from '@pyreon/reactivity'

type Message = { id: string; subject: string }

export function Inbox({ title, messages }: { title: string; messages: Message[] }) {
  const open = signal(false)
  return (
    <section>
      <h2 onClick={() => open.set(!open())}>{title}</h2>
      <ul>{messages.map((m) => <li>{m.subject}</li>)}</ul>
    </section>
  )
}
caught

pyreon lint names the line and the rule. The fix reads props where they are used and keys the list.

$ pyreon lint src

/app/src/Inbox.tsx
  5:22  error  Destructured props in component function — breaks reactive prop tracking. Use `props.x` pattern for reactive prop access.  pyreon/no-props-destructure
  10:11  warning  `.map()` in JSX — use `<For>` for reactive list rendering instead.  pyreon/no-map-in-jsx

✗ 1 error, 1 warning

// fixed
export function Inbox(props: { title: string; messages: Message[] }) {
  const open = signal(false)
  return (
    <section>
      <h2 onClick={() => open.set(!open())}>{props.title}</h2>
      <ul>
        <For each={props.messages} by={(m) => m.id}>
          {(m) => <li>{m.subject}</li>}
        </For>
      </ul>
    </section>
  )
}
the toolbox

Every tool, and when you'd reach for it.

pyreon doctor

Project health in one command

Gates run in parallel and isolate failures. One 0–100 score with a letter grade, a bar per category, and a fix under each finding.

pyreon doctor --ci --gha

pyreon check

The pre-commit scan

Runs the compiler's detectors over the files you changed since HEAD, prints each finding with its fix, and exits 1 if anything is left.

pyreon check

@pyreon/lint

144 rules that know the framework

Five presets, two readable layers, a config file with a JSON schema, watch mode, --why-off to explain a disabled rule, and an LSP server for your editor.

pyreon lint --watch

@pyreon/testing

Testing Library, plus the reactive graph

render, screen, fireEvent and every query as you know them, plus matchers for fire counts, effect re-runs and leaks.

expectSignal · expectEffect · expectNoReactiveLeak

@pyreon/devtools

See the reactive graph

A Chrome DevTools panel with six tabs. Click a component to highlight it on the page. Built from the repo and loaded unpacked.

Components · Graph · Signals · Effects · Profiler · Console

Ctrl+Shift+R

An overlay in every dev build

Built into the runtime, tree-shaken from production: orphan signals, the latest updates with their cause chain, and Pick to inspect bound text.

$p.reactivity() · $p.pick()

pyreon info · upgrade

Keep versions in line

info lists every installed @pyreon/* version and flags skew. upgrade aligns them to one version, as a dry run until you pass --write.

pyreon upgrade --write

pyreon add · new

Start and grow a project

new scaffolds a web app, or iOS and Android too with --native (experimental). add installs a package and prints how to wire it in.

pyreon add @pyreon/form

doctor gates

What doctor checks.

Gates that audit the Pyreon repo itself skip in your app and say why. They never count against your score.

gatecategorycatches
react-patternscorrectnessReact habits: useState, useEffect, className, React imports
pyreon-patternscorrectnessFor without by, destructured props, a signal written as a call
lintper ruleEvery configured @pyreon/lint rule
islands-auditarchitectureDuplicate, dead, nested or unregistered islands
ssg-auditarchitecture404 placement, dynamic routes without getStaticPaths, non-literal revalidate
content-auditarchitectureMissing titles, broken internal links, orphaned pages
native-auditarchitectureWeb-only imports and declarations the native build drops, in files that import @pyreon/primitives (needs @pyreon/native-compiler)
check-deduparchitectureTwo versions of one @pyreon/* package in the lockfile
dependency-fabricarchitecturePhantom deps, version drift, cycles (runs when @pyreon/loom is installed)
audit-teststestingTests that build fake vnodes instead of rendering through h()
distributionarchitecturePackage hygiene for libraries laid out like the Pyreon repo
doc-claimsdocumentationNumbers in the Pyreon docs that disagree with the source (Pyreon repo only)
audit-leak-classesbest practicesMemory-leak heuristics; advisory, never graded (Pyreon repo only)
audit-typesarchitectureTyped but never-read public fields (--full, Pyreon repo only)
bundle-budgetsperformanceGzipped entry size against locked budgets (--full, Pyreon repo only)
coming from

Coming from eslint-plugin-react-hooks, React Testing Library or React DevTools?

No dependency arrays, so no exhaustive-deps. The rules cover what goes wrong instead.

eslint-plugin-react-hooks
// eslint.config.js
import tseslint from 'typescript-eslint'
import reactHooks from 'eslint-plugin-react-hooks'

export default [
  {
    files: ['src/**/*.{ts,tsx}'],
    languageOptions: { parser: tseslint.parser },
    plugins: { 'react-hooks': reactHooks },
    rules: {
      'react-hooks/rules-of-hooks': 'error',
      'react-hooks/exhaustive-deps': 'warn',
    },
  },
]
Pyreon

Save it as .pyreonlintrc.json and run pyreon lint --watch. effect() tracks what it reads, so there is no array to keep in sync. The app preset turns on 96 of the 144 rules, among them destructured props, count(x) used as a write, .map() in JSX, and window read during SSR.

{
  "$schema": "./node_modules/@pyreon/lint/schema/pyreonlintrc.schema.json",
  "preset": "app",
  "include": ["src/"]
}

Same queries, same events. The render comes from @pyreon/testing.

React Testing Library
import { useState } from 'react'
import { render, screen, fireEvent } from '@testing-library/react'

function Cart() {
  const [qty, setQty] = useState(1)
  return (
    <div>
      <button onClick={() => setQty((n) => n + 1)}>Add one</button>
      <output>Total: {qty * 12}</output>
    </div>
  )
}

test('adds to the total', () => {
  render(<Cart />)
  fireEvent.click(screen.getByRole('button', { name: 'Add one' }))
  expect(screen.getByText('Total: 24')).toBeInTheDocument()
})
Pyreon

The queries are re-exported from @testing-library/dom, the package under React Testing Library. Add @pyreon/testing/vitest to setupFiles for cleanup between tests and the jest-dom matchers.

import { signal, computed } from '@pyreon/reactivity'
import { render, screen, fireEvent } from '@pyreon/testing'

function Cart() {
  const qty = signal(1)
  const total = computed(() => qty() * 12)
  return (
    <div>
      <button onClick={() => qty.update((n) => n + 1)}>Add one</button>
      <output>Total: {total()}</output>
    </div>
  )
}

test('adds to the total', () => {
  render(<Cart />)
  fireEvent.click(screen.getByRole('button', { name: 'Add one' }))
  expect(screen.getByText('Total: 24')).toBeInTheDocument()
})

From "what re-rendered?" to "which effect re-ran?", asserted in a test.

React DevTools
import { useState } from 'react'
import { render, screen, fireEvent } from '@testing-library/react'

let totalRenders = 0
function Total({ qty }: { qty: number }) {
  totalRenders++
  return <output>Total: {qty * 12}</output>
}

function Shop() {
  const [qty] = useState(1)
  const [dark, setDark] = useState(false)
  return (
    <div className={dark ? 'dark' : 'light'}>
      <button onClick={() => setDark((d) => !d)}>Dark mode</button>
      <Total qty={qty} />
    </div>
  )
}

test('dark mode re-renders Total', () => {
  render(<Shop />)
  const before = totalRenders
  fireEvent.click(screen.getByRole('button', { name: 'Dark mode' }))
  expect(totalRenders).toBe(before + 1) // memo() would stop it
})
Pyreon

Components run once, so there is no render to count. In the browser, the DevTools panel's Effects and Profiler tabs and the Ctrl+Shift+R overlay show what fired and why.

import { signal, effect } from '@pyreon/reactivity'
import { expectEffect } from '@pyreon/testing'

test('dark mode does not re-run the total', () => {
  const qty = signal(1)
  const dark = signal(false)
  const total = effect(() => {
    document.title = `Total: ${qty() * 12}`
  })
  expectEffect(total).toReRunWhen(() => qty.set(2))
  expectEffect(total).notToReRunWhen(() => dark.set(true))
})
try it

Run doctor.

Four real pyreon doctor runs on a small app, replayed: one planted mistake, three fixes, and the score climbing from 67 to 96.

steps
ColumnStats.tsx · as planted
import { signal } from '@pyreon/reactivity'

interface ColumnStatsProps {
  title: string
  tags: string[]
}

export default function ColumnStats({ title, tags }: ColumnStatsProps) {
  const views = signal(0)
  return (
    <section className="column-stats">
      <h3>{title}</h3>
      <button onClick={() => views(views() + 1)}>Viewed {views()} times</button>
      <ul>{tags.map((tag) => <li>{tag}</li>)}</ul>
    </section>
  )
}

The other findings are the kanban example's own; doctor reports them too.

examples/kanban + a planted ColumnStats.tsx · pyreon doctor
$ pyreon doctor
pyreon doctor · project health audit
Score: 67/100 Grade: D
Scope: 1 package root(s) from single package (.)
Scanned: react-patterns 6 · pyreon-patterns 6 · lint 6 · islands-audit 0 · ssg-audit 0 · content-audit 0 · check-dedup 0
Per category:
correctness █████░░░░░░░ 39 · 4E 7W
performance skipped
architecture ███████████░ 94 · 2W
testing skipped
documentation skipped
best-practices clean (advisory — not graded)
! 2 gate(s) matched no files — their categories were NOT measured:
distribution — no published packages found under packages/<category>/<pkg> — this gate audits the Pyreon framework repo layout
audit-tests — matched no test files under 1 package root(s) from single package (.) — a gate that scanned nothing must not read as clean; check the workspace layout or pass --roots <glob,...>
Top findings (10 of 13):
✗ Use `class` instead of `className` — Pyreon uses standard HTML attributes. lint/pyreon/no-classname
src/components/ColumnStats.tsx:11:13
✗ Destructured props in component function — breaks reactive prop tracking. Use `props.x` pattern for reactive prop access. lint/pyreon/no-props-destructure
src/components/ColumnStats.tsx:8:36
✗ `views(value)` does NOT write the signal — `signal()` is the read-only callable surface and ignores its arguments. Use `views.set(value)` or `views.update((prev) => …)`. lint/pyreon/no-signal-call-write
src/components/ColumnStats.tsx:13:29
✗ Array.map() in JSX is not reactive in Pyreon. Use <For> for efficient keyed list rendering. react-patterns/array-map-jsx
src/components/ColumnStats.tsx:14:11
fix: <For each={tags} by={item => item.id}>
{(tag) => <li>{tag}</li>}
</For>
! [Pyreon] doctor lint: the `packageConfig` pass matched NO package-root config files under 1 package root(s) from single package (.), so 1 rule(s) whose SUBJECT is a package-root config file did not run and cannot have passed: pyreon/vitest-config-uses-shared. A scan that matched nothing is not a clean result — check the workspace layout or pass --roots <glob,...>. lint/empty-scan-packageConfig
! [Pyreon] doctor lint: the `test` pass matched NO test files under 1 package root(s) from single package (.), so 2 rule(s) whose SUBJECT is a test file did not run and cannot have passed: pyreon/no-require-in-esm, pyreon/no-query-selector-cast-in-test. A scan that matched nothing is not a clean result — check the workspace layout or pass --roots <glob,...>. lint/empty-scan-test
! Avoid `autoFocus` — moving focus on mount disorients screen-reader and keyboard users. Manage focus explicitly after a user action instead. lint/pyreon/no-autofocus
src/components/BoardColumn.tsx:109:14
! Avoid `autoFocus` — moving focus on mount disorients screen-reader and keyboard users. Manage focus explicitly after a user action instead. lint/pyreon/no-autofocus
src/routes/index.tsx:72:16
! `.map()` in JSX — use `<For>` for reactive list rendering instead. lint/pyreon/no-map-in-jsx
src/components/ColumnStats.tsx:14:11
! 3 signal `.set()` calls can fire on a single execution path without `batch()` — wrap in `batch(() => { ... })` to collapse N notify cycles into one. (Plain Mode: found in this file's compiled form) lint/pyreon/no-unbatched-updates
src/components/BoardColumn.tsx:55:24
…and 3 more. Run with --json for the full list.
Skipped: doc-claims (doc-claim audit targets the Pyreon monorepo (scripts/check-doc-claims.ts not present here)), dependency-fabric (@pyreon/loom is not installed in this project — install it (`pyreon add @pyreon/loom`) to include dependency health in the score, or run `pyreon loom scan .` directly. Not scored rather than assumed healthy.), native-audit (no @pyreon/primitives importers found (not a multiplatform project)), audit-leak-classes (leak-class audit targets the Pyreon monorepo (scripts/audit-leak-classes.ts not present here)), audit-types (enable with --full), bundle-budgets (enable with --full)
4 errors · 9 warnings · 7 gates · 0.1s
exit 0
real output, replayed · captured 2026-11-11 from a copy of examples/kanban with one planted file; the four runs in order
what's included

What ships in the box.

  • pyreon doctor 15 gates (10 for any app), a 0–100 score with a letter grade, --only / --skip to pick gates, --fix for lint and React-pattern fixes.
  • pyreon check scans git-changed files (or the paths you pass), prints each fix, --json for tools.
  • Five lint presets recommended, strict, app, lib and best-practices; per-rule overrides in .pyreonlintrc.json.
  • pyreon-lint --why-off <rule> says whether a rule will run, and which config line turns it off.
  • Editor support pyreon-lint --lsp serves diagnostics and inlay hints; a VS Code extension ships in the repo.
  • Parallel linting runs of 200 files or more spread across a worker pool; results are sorted so CI diffs stay stable.
  • Reactive-graph matchers expectSignal(s).toHaveChangedTimes(n), expectEffect(e).toReRunWhen(fn) and .notToReRunWhen(fn).
  • Leak matchers expectNoReactiveLeak checks that mount plus unmount leaves no graph growth; expectGarbageCollected replaces the WeakRef dance.
  • DevTools panel Components, Graph, Signals, Effects, Profiler and Console tabs, with click-to-highlight on the page.
  • pyreon info and upgrade find version skew before it trips the duplicate-instance guard, then align every @pyreon/* dependency.
recipes

Things to build with it.

Gate every pull request

One job prints annotations on the diff and fails when an error finding is left. Warnings still lower the score but do not fail the job.

# .github/workflows/health.yml
name: Health
on: [pull_request]
jobs:
  doctor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
      - run: bun install
      - run: bunx pyreon doctor --gha --ci
Block the commit, not the review

With no paths, pyreon check scans files changed since HEAD plus untracked ones and exits 1 on any finding. Silence a line you mean with // pyreon-lint-ignore <code>.

#!/bin/sh
# .githooks/pre-commit  (git config core.hooksPath .githooks)
exec bunx pyreon check
Prove a theme switch leaves the cart alone

Assertions on the reactive graph itself: what re-ran, and how often. Run them through @pyreon/vite-plugin with @pyreon/testing/vitest in setupFiles.

import { expectEffect, expectSignal } from '@pyreon/testing'
import { signal, computed, effect } from '@pyreon/reactivity'

test('a theme switch does not re-run the cart log', () => {
  const qty = signal(1)
  const theme = signal('light')
  const log = effect(() => { qty() })
  expectEffect(log).toReRunWhen(() => qty.set(2))
  expectEffect(log).notToReRunWhen(() => theme.set('dark'))
})

test('total recomputes once per change', () => {
  const qty = signal(1)
  const total = computed(() => qty() * 12)
  total() // first computation counts as 1
  qty.set(3)
  expectSignal(total).toHaveRecomputedTimes(2)
})
api

Commands and exports.

Every export has a reference page with its signature, an example and the mistakes people make with it.

pyreon · 13
  • doctor
  • check
  • lint
  • plain
  • add
  • new
  • info
  • upgrade
  • context
  • mcp
  • atlas
  • loom
  • lathe
pyreon doctor · 9
  • --ci
  • --gha
  • --json
  • --fix
  • --full
  • --only
  • --skip
  • --roots
  • --audit-min-risk
pyreon-lint · 10
  • --preset
  • --fix
  • --watch
  • --lsp
  • --format
  • --rule
  • --rule-options
  • --why-off
  • --init
  • --list
@pyreon/testing · 11
  • render
  • renderHook
  • cleanup
  • screen
  • fireEvent
  • waitFor
  • within
  • expectSignal
  • expectEffect
  • expectGarbageCollected
  • expectNoReactiveLeak
@pyreon/testing subpaths · 9
  • /vitest
  • /matchers
  • /form
  • /router
  • /store
  • /i18n
  • /query
  • /toast
  • /ui
good to know

Good to know before you start.

Add --ci to gate a build

Plain pyreon doctor always exits 0 so it can run as a report. --ci exits 1 when an error finding is left.

check and lint are different engines

pyreon check runs the compiler's detectors on changed files. The lint rules (99 on in recommended) run under pyreon lint. pyreon doctor runs both.

Review --fix on React code

The React fixes turn useState into signal(), but setter calls like setCount(n) stay as written. Rewrite them as count.set(n) before you commit.

Compile tests the way you compile the app

Put @pyreon/vite-plugin in your vitest config. Without the Pyreon compiler, {total()} in JSX renders once and a DOM assertion after a click fails.

Graph matchers need a dev or test build

Production builds drop the reactive graph, so the matchers throw a clear error there. The leak matchers also need --expose-gc.

Two extensions install from the repo

The DevTools panel is built and loaded unpacked; the VS Code extension is linked from packages/tools/lint/vscode. Neither is in a store yet.

questions

What people ask first.

Does doctor work outside the Pyreon monorepo?

Yes. Ten gates check any app. The five that audit the Pyreon repo itself (distribution, doc-claims, audit-leak-classes, and the --full gates audit-types and bundle-budgets) skip in your app with the reason printed, and a category no gate measured is left out of the score rather than counted as 100.

Will a warning fail my build?

No. --ci exits 1 only when an error finding is left. Warnings and info lower the score; findings in the advisory best-practices category are shown but never graded and never fail --ci.

Do I need check, lint and doctor?

Use pyreon check in a pre-commit hook (changed files, compiler detectors), pyreon lint --watch while you write (the lint rules), and pyreon doctor --ci in CI (both of those plus the project gates).

Where do I get the DevTools extension?

Build it from the repo (bun run --filter='@pyreon/devtools' build), then load packages/tools/devtools/dist/ unpacked from chrome://extensions. The Ctrl+Shift+R overlay needs nothing: it is in every dev build.

Which vitest does @pyreon/testing need?

Vitest 5 (^5.0.0 peer). It runs in happy-dom for structure; interaction and layout tests belong in a real browser through @vitest/browser.

Your app gets a grade. Unlike school, the answers are printed underneath.

bun add -D @pyreon/cli @pyreon/lint @pyreon/testing
Read the CLI guide