Diffs your PR, judges each test's relevance in parallel, and runs the real subset through your existing runner.
$ leanest select playwright --base origin/main Changed: src/app/lib/api.ts src/app/lib/csv.ts src/worker/email-layout.ts src/worker/routes/admin.ts tests/e2e/admin-users-export.pw.ts 35 tests found Selected 4 / 35 tests RUN tests/e2e/admin-users-export.pw.ts RUN tests/e2e/billing-truth.pw.ts RUN tests/e2e/downgrade.pw.ts RUN tests/e2e/privacy-and-email-abuse.pw.ts Skipping 31 tests.
Measured on a real PR against rdyrct 's Playwright suite. A pure CI or config diff gives Jev no application code to reason about, so confidence drops and leanest runs closer to everything, on purpose. The number above is the representative case: a real feature change.
git diff against your base branch. No API call yet, this step is free.
Finds your e2e specs by reading the framework's own config, not a guessed glob.
One semantic question per test, evaluated in parallel by Jev: could this diff affect it.
Low confidence always means run. A test whose own file changed always runs.
Hands the selected paths to your real playwright or vitest, unmodified.
One binary. It selects, then hands off to your real runner, so your reporter, retries and CI-required-check behavior stay exactly as they are.
leanest playwright Select, then actually run Playwright on the selection.
leanest vitest Select, then actually run Vitest on the selection.
leanest select playwright Show the selection only, run nothing.
leanest inspect playwright Rank every test by relevance, for debugging.
--base <ref> Base branch to diff against. Default main.
--dir <path> Target directory. Default the current one.
--changed Diff the working tree instead of a branch.
--json Machine-readable output.
--shadow Run the full suite, but log what would have been skipped.
--full Skip selection, run everything.
leanest has no server of its own. The CLI calls TypeSafe's Jev API directly with your
TYPESAFE_API_KEY. Nothing routes through
leanest's infrastructure, because there isn't any.
No key, an expired one, or a timeout all resolve the same way: leanest runs the full suite and prints why, instead of silently skipping coverage.
⚠ Jev unavailable (...), running the full suite.
gh secret set TYPESAFE_API_KEY --repo you/your-repo
typesafe-api-key: ${{ secrets.TYPESAFE_API_KEY }} GitHub does not expose repo secrets to workflows triggered from forked-repo pull requests by default, the same protection Codecov and similar tokens rely on.
Replace your existing "run e2e tests" step. Same reporter, same exit code, fewer tests executed.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: baronunread/leanest@v1
with:
framework: playwright
typesafe-api-key: ${{ secrets.TYPESAFE_API_KEY }}