npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

twd-js

v1.14.1

Published

Test While Developing (TWD): in-browser test runner with a live sidebar UI. Works with React, Vue, Angular, Solid, Astro, Nuxt, HTMX and vanilla JS, on Vite, Webpack, or a CDN. Built-in API and component mocking.

Readme

TWD (Test While Developing)

CI npm version license Maintainability Code Coverage OSAF: TWD (Test While Developing)

Frontend tests that run in the browser you develop in.

A sidebar in your dev server runs component and flow tests against your real app: the same DOM, routes and state you are building. Your AI agent can drive the same loop headlessly, and every mock gets checked against the real API before you merge.

Take the live tour → Run real TWD tests from the sidebar and watch them drive the page, in your browser, with nothing to install. Best on a laptop or desktop.

Open source under the MIT license.

Why TWD

  • Tests live where you build. No second browser to keep open and no separate harness. Write a test next to your code and press play in the sidebar.
  • Built for AI agents. The agent writes a test, runs it headlessly against your real app, reads the failure, fixes it and re-runs until green. Results come back as structured text, not screenshots, so the loop stays cheap in tokens.
  • Review AI pull requests with your eyes. Put a record label on a pull request and CI posts one video per test the branch added, from the same run that turned the check green. No extra tokens, and it cannot drift from the code.
  • Mocks that can't drift. twd-cli validates every mocked response against your OpenAPI spec and points at the exact field that broke, so a renamed field shows up in CI instead of in production.
  • Mistakes caught before the run. twd-lint flags a missing await, a wrong runner import or a forgotten it.only in your editor and in CI.

TWD complements end-to-end tools like Playwright and Cypress: TWD gives fast, deterministic feedback on your UI with mocked boundaries while you develop, and end-to-end tests check that your systems work together.

Quick start

With an AI agent

Install the TWD skills in your agent:

npx skills add BRIKEV/twd-ai   # Cursor, Copilot, Windsurf, Codex and other agents

On Claude Code, install it as a plugin:

claude plugin marketplace add BRIKEV/twd-ai
claude plugin install twd@twd-ai

The skills are also listed in the Grok Build Directory.

Then ask your agent to set up TWD (/twd:twd-setup in Claude Code, /twd-setup in other agents). It detects your stack, installs twd-js and twd-cli, and wires the Vite plugin. Start npm run dev and ask for tests: "Write tests for the checkout page".

→ Get started with AI agents

By hand

npm install --save-dev twd-js

Add the Vite plugin (it loads the sidebar and discovers your test files):

// vite.config.ts
import { defineConfig } from 'vite'
import { twd } from 'twd-js/vite-plugin'

export default defineConfig({
  plugins: [twd({ open: true })],
})

Write a test next to your code:

// src/App.twd.test.ts
import { twd, screenDom } from 'twd-js'
import { describe, it } from 'twd-js/runner'

describe('App', () => {
  it('shows the heading', async () => {
    await twd.visit('/')
    const heading = await screenDom.findByRole('heading', { level: 1 })
    twd.should(heading, 'be.visible')
  })
})

Run npm run dev and open the app. The sidebar appears next to it; press play on any test and watch it run against the page you are building.

Works with React, Vue, Angular, Solid, Astro, Nuxt, HTMX and vanilla JS, on Vite, Webpack or a CDN. TWD code is guarded by import.meta.env.DEV, so nothing reaches your production bundle.

→ Full setup guide · Framework integration

The TWD ecosystem

Start with twd-js. Add the rest when you need it. Everything is MIT licensed.

| Package | What it does | | --- | --- | | twd-js | The core: the in-browser runner and sidebar, request mocking and assertions. | | twd-cli | Headless runs for CI and AI agents, with coverage, OpenAPI contract validation and per-test video recording. | | twd-lint | Catches TWD test mistakes in the editor and in CI before a browser run. Works with npx twd-lint or as an ESLint plugin. | | twd-ai | Agent skills (and a Claude Code plugin) that set TWD up, then write, run and fix your tests. | | twd-relay | Optional: watch your agent's test runs live in your own browser tab. |

Examples

→ All examples and community content

Documentation

Bringing TWD to your team?

TWD is open source and stays that way. If you would rather not do the adoption work alone, write to [email protected] and we set aside as much time as your team needs: we set TWD up in your repo, wire the agent loop and the record job into your CI, and leave you with tests your team wrote together. For response targets, supported versions and support options for teams, see the support page.

Contributing

Open issues or pull requests on GitHub. If you're starting out in tech and looking for a beginner-friendly first PR, see the open issues. Reach out and the maintainer will help with setup and walk you through it.

Contributors ✨

This project follows the all-contributors specification. Contributions of any kind are welcome.

License

MIT