Skip to content

Install

Every @flaky-tests/* package is published to both npm and JSR. Pick whichever registry fits your workflow — the code is identical.

A working setup needs exactly one runner plugin (plugin-bun or plugin-vitest) plus one store adapter (store-sqlite, store-turso, store-supabase, or store-postgres). The core package ships the CLI and is pulled in as a peer — install it explicitly if you want to run flaky-tests directly.

The CLI + shared types. Installed automatically as a peer of every plugin, but you’ll want it explicitly if you run flaky-tests --html or flaky-tests --prompt from your own scripts.

Terminal window
npm i -D @flaky-tests/core

Pick one. These wire into your test runner and capture failures into the store.

Bun test preload. Registers a global lifecycle hook and writes to the store via bun:sqlite.

Terminal window
npm i -D @flaky-tests/plugin-bun

See Setting up with Bun for the bunfig.toml preload step.

Vitest reporter implementing onInit / onFinished. Works with Vitest 1.x+.

Terminal window
npm i -D @flaky-tests/plugin-vitest

See Setting up with Vitest for the vitest.config.ts reporter registration.

Pick one. All adapters implement the same IStore interface, so swapping later only requires an environment variable change.

Local libSQL / SQLite, runs on Node and Bun. Zero-config, perfect for local dev.

Terminal window
npm i -D @flaky-tests/store-sqlite

Details: SQLite store

@flaky-tests/store-turso — remote libSQL (free tier)

Section titled “@flaky-tests/store-turso — remote libSQL (free tier)”

Turso/libSQL for shared team visibility without infrastructure to run.

Terminal window
npm i -D @flaky-tests/store-turso

Details: Turso store

Supabase-hosted Postgres via the Supabase client.

Terminal window
npm i -D @flaky-tests/store-supabase

Details: Supabase store

@flaky-tests/store-postgres — Postgres / Neon

Section titled “@flaky-tests/store-postgres — Postgres / Neon”

Direct Postgres (Neon, RDS, self-hosted) via postgres.js.

Terminal window
npm i -D @flaky-tests/store-postgres

Details: Postgres / Neon store

PackagenpmJSRSource
@flaky-tests/corenpmjs.comjsr.iopackages/core
@flaky-tests/plugin-bunnpmjs.comjsr.iopackages/plugin-bun
@flaky-tests/plugin-vitestnpmjs.comjsr.iopackages/plugin-vitest
@flaky-tests/store-sqlitenpmjs.comjsr.iopackages/store-sqlite
@flaky-tests/store-tursonpmjs.comjsr.iopackages/store-turso
@flaky-tests/store-supabasenpmjs.comjsr.iopackages/store-supabase
@flaky-tests/store-postgresnpmjs.comjsr.iopackages/store-postgres