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

@azanir/lexb

v0.1.0

Published

Explore an authenticated page (or a scenario) into verified Playwright locators + a test-case draft.

Readme

lexb

Explore an authenticated page — or a step-by-step scenario — into verified Playwright locators and a test-case draft. Uses the Playwright library directly (no agent-browser / playwright-cli / jq / curl).

The cheap LLM only ever sees locators that were proven to resolve to exactly one element (count()===1), so it can't hallucinate selectors.

Install

In a Playwright + TypeScript repo (peer: @playwright/test >= 1.49):

npm i -D @azanir/lexb              # from npm  (CLI command stays `lexb`)
# or git dependency:  npm i -D github:AZANIR/lexb
npm i -D @playwright/test          # peer (every PW+TS repo already has it)

Commands

lexb <codename> <url>          # explore -> verified locators + test-case (+ --emit-spec)
lexb scenario --file s.md      # guided test from a human step list
lexb auth <loginUrl>           # capture storageState (+ session tokens)

explore

lexb dashboard https://app/dashboard --state .auth/auth-state.json --emit-spec

documents/reports/spike-dashboard/: screenshot.png, aria.snapshot.txt, console.json, errors.json, locators.md (verified getByRole, count===1), test-case.md (LLM draft), dashboard.spec.ts (skeleton, with --emit-spec), lexb.json.

scenario

Write a step list (from a screenshot); lexb maps each step to a verified locator + action:

# Scenario: Upload a CV enables conversion
url: https://app/dashboard
## Steps
1. Upload "fixtures/cv.md" into the "File upload area"
2. Observe the "Convert to PDF" button
## Expected
- "Convert to PDF" becomes enabled
lexb scenario --file scenario.md --name dashboard-upload --emit-spec

A step whose target isn't in the verified set becomes a // TODO, never an invented locator. Starter: templates/scenario.example.md.

auth (cookies + localStorage + session tokens)

  • --state — storageState (cookies + localStorage).
  • --tokens — optional { entries, savedAt } injected into sessionStorage (--tokens-target localStorage to switch) via addInitScript, before navigation. For apps whose session tokens live in sessionStorage (which storageState doesn't capture).
lexb auth https://app/login --state .auth/auth-state.json --tokens .auth/auth-tokens.json

Options / env

| Flag | Env | Default | |---|---|---| | --state | LEXB_STATE | .auth/auth-state.json | | --tokens | LEXB_TOKENS | .auth/auth-tokens.json if present | | --tokens-target | LEXB_TOKENS_TARGET | sessionStorage | | --model | LEXB_MODEL | openai/gpt-4o-mini | | --key | LEXB_KEY | .auth/openrouter.key (OpenRouter key file) | | --out | LEXB_OUT | documents/reports | | --emit-spec, --headed, --url, --name | — | — |

The LLM "brain" uses OpenRouter — put your key in .auth/openrouter.key (gitignored).

Programmatic

import { explore, generateTestCase } from '@azanir/lexb';

const r = await explore({ url, state: '.auth/auth-state.json' });
// r.verified -> [{ role, name, count }]  (count===1 = good)

Local dev

npm install
npm run build      # -> dist/
node dist/cli.js --help

License

MIT