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

@mnapoli/exspec

v0.1.7

Published

Executable specs - run Gherkin feature files with an AI agent in the browser

Readme

Executable specs

AI writes code. AI writes tests. But confidence comes from tests you actually read and write.

exspec runs plain-text specs in a real browser using AI. No test code, no step definitions. Write specs as acceptance criteria, then let agents build and run exspec to check they pass.

Example

Feature: Order management

  Scenario: Place an order and check it appears in the dashboard
    Given I am logged in as a store manager
    When I create a new order for customer "Alice Martin" with 2 items
    Then the order should appear in the orders list with status "Pending"

  Scenario: Cancel an order
    Given I am logged in as a store manager
    And there is at least one pending order
    When I open the most recent order and cancel it
    Then the order status should change to "Cancelled"
    And the customer should see a cancellation notice
$ npx exspec

Suite: 2 scenario(s) in 1 domain(s)

  orders (2 scenarios)
    ✓ Place an order and check it appears in the dashboard
    ✗ Cancel an order
      > `And the customer should see a cancellation notice`
      Error: No cancellation notice is visible on the page.

────────────────────────────────────────
Total: 1 passed, 1 failed, 0 skipped, 0 not executed

Detailed results in features/exspec/2026-03-20-1430.md

Unlike Cucumber or Behat, there's no glue code - no step definitions, no page objects, no regex matchers to wire up. The AI agent reads your specs and navigates the app like a real user would. It figures out where to click, what to fill in, and what to check on screen.

This also means specs aren't brittle. Traditional browser tests break when a CSS class changes or a button moves. The AI agent adapts to the actual UI - and if the UX is so broken that a human couldn't complete the task, the spec fails too. That's a feature, not a bug.

Specs are written in Gherkin, a simple Given/When/Then format. You can write them in 70+ languages (English, French, German, Spanish, etc.).

Install

npm install -D @mnapoli/exspec

Prerequisites

Quick start

  1. Create a features/exspec.md configuration file:
URL: http://localhost:3000

Use the `[email protected]` / `password` credentials for authentication.
  1. Write a feature file in features/:
Feature: Shopping cart

  Scenario: Add a product to the cart
    Given I am logged in
    When I navigate to the product catalog
    And I add the first product to my cart
    Then the cart should show 1 item
  1. Run:
npx exspec

That's it. No step definitions to implement, no test code to write.

Usage

# Run all feature files
npx exspec

# Run a specific file or directory
npx exspec features/auth/login.feature
npx exspec features/auth/

# Filter by scenario name
npx exspec --filter "invalid password"

# Stop at first failure
npx exspec --fail-fast

# Run with visible browser (for debugging)
npx exspec --headed

# Show agent activity in real-time (tool calls, thinking)
npx exspec --verbose

Configuration

features/exspec.md

This file is passed to the AI agent as context. Describe your app, provide credentials, set the URL - anything the agent needs to know to test your application.

URL: http://localhost:3000

## Application

This is an e-commerce app. The user is a store manager.
For detailed feature documentation, see the `docs/` directory.

## Authentication

Use the `[email protected]` / `password` credentials for authentication.

## Browser

Resolution: 1920x1080

Setup commands

You can run shell commands before tests start using YAML frontmatter in exspec.md. This is useful for resetting the database, seeding data, or any other preparation needed before testing.

---
setup: php artisan migrate:fresh --seed
---

URL: http://localhost:3000
...

Setup commands run once before all tests, on the local machine. You can also provide a list of commands:

---
setup:
  - php artisan migrate:fresh --seed
---

Domain timeout

Scenarios are grouped by subdirectory (domain) and each domain runs as a single agent session. Set domainTimeout (in minutes) to cap how long a domain can run:

---
domainTimeout: 10
---

If the timeout is reached, any unreported scenarios are marked as not_executed. Scenarios already reported before the timeout are preserved.

Environment variables

If your project has a .env file, exspec loads it automatically. You can reference variables in exspec.md with $VAR or ${VAR} syntax:

URL: $APP_URL

How it works

  1. Discovers .feature files in features/ and groups them by subdirectory
  2. For each group, launches a Claude agent with only Playwright browser tools (no database, no code, no shell access)
  3. The agent reads your specs and interacts with the browser autonomously
  4. Results (PASS/FAIL/SKIP) are written to features/exspec/

The agent is sandboxed to browser-only interaction. If a scenario can't be verified through the browser, it's marked as FAIL.

Results

Results are written to features/exspec/{YYYY-MM-DD-HHmm}.md with failure screenshots and a real-time activity log (tool calls, timestamps, token usage).

When the agent encounters ambiguous test steps or has to make assumptions, it may include recommendations in its summary.

The CLI exits with code 1 on failures (CI-friendly).