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

@lando/leia

v2.0.0

Published

Runs tests cleverly hidden in documentation

Readme

Leia

Leia turns fenced commands in markdown into mocha tests. Keep runnable examples beside the prose they explain, then prove the documentation still tells the truth.

Runs on Node.js 24 or newer, or Bun with explicit invocation.

[!WARNING] Leia executes real commands that can change files, install software, or alter your machine. Prefer ephemeral CI runners. Before running locally, read the scenarios and repository guidance; a temporary working directory does not isolate machine-wide changes.

Install

# add leia to your project's development dependencies.
npm install --save-dev @lando/leia

Usage

Write your first scenario

Save this as quickstart.md:

# Leia quickstart

## Testing

```sh
# should print a greeting
echo "Hello from Leia"
```

The title names the suite, the Testing heading selects the commands, and each comment names a test. Blank lines separate tests. See scenario authoring for assertions, setup, and cleanup.

Run with the CLI

# run the locally installed leia without downloading another version.
npm exec --offline -- leia quickstart.md

Leia reports one passing test. A command that exits nonzero, cannot start, or exceeds its deadline fails the scenario.

# equivalent when leia is already on path, including inside an npm script.
leia quickstart.md

# quote globs so leia expands them; retry failed commands twice.
leia "docs/**/*.md" --retry 2

For Bun, define the project script, then run bun run leia quickstart.md. See the CLI guide for all options and environment defaults.

Run programmatically

Save as test-docs.mjs and run with node test-docs.mjs:

import Leia from '@lando/leia';

const leia = new Leia();
// compile the same markdown scenario.
const files = leia.find(['quickstart.md']);
const sources = leia.parse(files, { moduleFormat: 'esm' });
const harnesses = leia.generate(sources);
const runner = await leia.runAsync(harnesses);

// return a failing exit status when any test fails.
runner.run((failures) => {
  process.exitCode = failures ? 1 : 0;
});

The API reference includes CommonJS usage, TypeScript declarations, and every supported export.

Run in GitHub Actions

Commit quickstart.md, package.json, and package-lock.json, then save this workflow as .github/workflows/leia.yml:

name: Leia
on:
  pull_request:
permissions:
  contents: read
jobs:
  scenarios:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: '24'
      - run: npm ci
      - run: npm exec --offline -- leia quickstart.md

See GitHub Actions for a platform matrix and scenario prerequisites.

Use with an agent

Install the Leia plugin for Codex or OpenClaw, then ask:

Use Leia to find a useful missing scenario in this project, implement it, and run it.

The skill can also run and diagnose existing tests or configure their GitHub Actions matrix. See plugin installation for both hosts, prerequisites, and example requests.

Development

Leia uses pinned Bun tooling and TypeScript source. CONTRIBUTING covers setup, validation, builds, and releases.

Issues, questions, and support

Leia 1.x is unsupported. Upgrade to 2.x; see the migration notes.

Join the Lando Slack community for community help. Report bugs and request features through the issue queue.

Changelog

See the changelog and published releases.

Maintainers

Contributors

Made with contrib.rocks.

License and policies