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

nid-inbox

v0.5.0

Published

Local email API, inbox, and webhook simulator for testing apps and AI agents.

Readme

nid

Local email API, inbox, and webhook simulator for testing apps and AI agents.

While you build or run tests, your app sends email to nid instead of real recipients. nid intercepts official email SDKs with zero app-code changes, validates requests with provider-shaped errors, triggers signed webhooks back to your app, and wakes waiting tests and AI agents when mail arrives. No email leaves your machine. nid calls out only to the webhook URLs you set.

Two emails arrive in the nid web view. Opening one shows its sign-in code and link.

Read the documentation, or start with the ten-minute tutorial.

Quick start

You need Node.js 22.13 or later.

  1. Run your app with nid:

    npx nid-inbox run -- npm run dev

    nid run starts nid in the background and redirects outbound HTTP calls for the Resend, Amazon SES, Brevo, SendGrid, Postmark, and Mailgun SDKs without changing your app code.

  2. Open http://127.0.0.1:4400 in your browser to see arrived messages, HTML previews, sign-in codes, links, refused requests, and webhook deliveries.

If your app runs outside nid run (such as Docker or another language), start nid on its own and point your email SDK or SMTP client at it:

npx nid-inbox serve

SMTP listens on 127.0.0.1:1025, and HTTP provider APIs and the read API listen on http://127.0.0.1:4400.

Read mail in tests

Your tests can wait on mail with zero polling. In Playwright:

import { test, expect } from '@nid-inbox/client/playwright'

test('sign up, then resend the code', async ({ page, inbox }) => {
  const email = inbox.address('signup')
  await page.fill('#email', email)
  await page.click('text=Send code')
  const first = await inbox.waitFor(email, { hasCode: true })
  await page.click('text=Resend code')
  const second = await inbox.waitFor(email, { hasCode: true })
  expect(second.code).not.toBe(first.code)
  await page.fill('#code', second.code!)
})

What sets nid apart

  • Zero-code provider APIs and SDK error fidelity: Answers the HTTP APIs for Resend, Amazon SES (v2 JSON and v1 XML), Brevo, SendGrid, Postmark, and Mailgun, plus SMTP on port 1025. Redirects official Node SDKs via nid run or nid-inbox/intercept and returns provider-shaped 4xx validation errors.
  • Event-driven test helpers and rejection diagnostics: @nid-inbox/client and /api/wait wake over an internal event bus when mail arrives, with Playwright fixtures and automatic code and link extraction. When a wait times out, nid reports matching refused sends so failures explain why email never arrived.
  • Signed webhook simulation and fault injection: Triggers provider-signed webhooks (delivered, bounced, deferred, complained, opened, clicked), supports --auto-webhook after acceptance, and simulates rate limits, bounces, deferrals, complaints, and custom HTTP errors via magic addresses (ratelimit@, bounce@, defer@, complain@) or /api/faults.
  • Built-in MCP server for AI agents: Exposes new_address, wait_for_email, get_code, get_links, get_message, list_messages, list_rejections, trigger_webhook, and clear over HTTP (/mcp) and stdio (nid mcp).

Packages

| Package | What it is | | --- | --- | | nid-inbox | The server, nid run / nid serve CLI, and nid-inbox/intercept preload hook. | | @nid-inbox/client | Typed test client and Playwright fixture. | | ghcr.io/oluwatobiadegoke/nid | The Docker image. |

Documentation

| Kind | Pages | | --- | --- | | Tutorial | Get started | | How-to guides | See your mail in the web view, Run nid (npm, Docker, Playwright, GitHub Actions), Point your app at nid, Read mail in tests, Test your webhook handler, Use the command line, Let an AI agent read your mail, Embed nid in your own code | | Reference | Command line, Configuration, Read API, Client library, Providers, MCP reference | | Explanation | How nid works, Security |

Contributing

Each provider is one file under packages/server/src/providers/, and docs change in the same pull request as the code. See CONTRIBUTING.md.

License

Apache-2.0.