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

@rusintez/cfmail

v0.0.3

Published

Cloudflare-native email CLI + SDK — receive and send mail on any dev domain, powered by Email Routing, D1, R2 and the send_email binding.

Readme

cfmail

Receive and send email on any dev domain via Cloudflare. CLI + TypeScript SDK + Playwright fixture. No Gmail, no IMAP, no Mailgun — one vendor, one token.

cfmail config add example.dev
cfmail wait --to [email protected] --extract-link

cfmail sending enable --subdomain mail.example.dev
cfmail send -f [email protected] -t [email protected] -s "hi" --text "hi"

Why

  • Magic-link tests — block until the signup email arrives, extract the link, follow it.
  • Agents with email — give an AI agent [email protected] and let it receive mail autonomously.
  • Disposable addresses — catch-all accepts [email protected], so you can invent addresses on the fly.
  • Outbound too — CF Email Sending (beta) bound into the worker; DKIM managed by Cloudflare. Multipart form on POST /send, attachments + inline supported.

Install

npm i -g @rusintez/cfmail       # or: pnpm add -g @rusintez/cfmail

Or from source:

git clone https://github.com/rusintez/cfmail && cd cfmail
pnpm install && pnpm build && pnpm link --global

Quickstart

cfmail config add example.dev      # browser opens with pre-filled token template; paste token
# → provisions D1 + R2 + Worker, wires Email Routing catch-all → Worker

cfmail address --prefix signup # prints e.g. [email protected]

cfmail inbox                   # list received mail with routing latency
cfmail get <id>                # pretty-print body + attachments
cfmail tail                    # stream as it arrives

Full command reference: see SKILL.md.

SDK

import { cfmail } from "cfmail";

const client = cfmail({ workspace: "example.dev" });
const mbox = await client.createMailbox({ prefix: "signup" });

await fetch("https://api.example.com/signup", {
  method: "POST",
  body: JSON.stringify({ email: mbox.address }),
});

const email = await mbox.wait({ subject: /verify/i, timeout: 60_000 });
console.log(email.links[0]);

Playwright

import { test as base, expect } from "@playwright/test";
import { withMailbox } from "cfmail/playwright";

const test = base.extend(withMailbox({ workspace: "example.dev" }));

test("signup", async ({ page, mailbox }) => {
  await page.fill("[name=email]", mailbox.address);
  await page.click("button[type=submit]");
  const email = await mailbox.wait({ subject: /sign in/i });
  await page.goto(email.links[0]);
  await expect(page).toHaveURL(/dashboard/);
});

Architecture

inbound:  sender → CF Email Routing MX → Email Worker
                                          ├── postal-mime parse
                                          ├── R2 ← raw.eml + attachments
                                          └── D1 ← metadata row
                                                  ↑
                                              GET /messages (bearer) ← CLI / SDK

outbound: CLI / SDK ─── POST /send (bearer, multipart) ───▶ Email Worker
                                                           │
                                                           └── env.EMAIL.send(...)
                                                                 │ DKIM by CF
                                                                 ▼
                                                            Recipient inbox
  • D1 for metadata (queryable, indexed on recipient + date)
  • R2 for raw RFC822 + attachment bytes (no 1 MiB D1 row cap)
  • Worker bundle shipped inside the npm package — cfmail config add uploads it via the CF REST API (no Wrangler dep at runtime)

Requirements

  • A domain on Cloudflare with no existing MX records
  • A Cloudflare API token (CLI opens dashboard with pre-filled template on first run)
  • Node ≥ 20

Config

~/.config/cfmail/config.json — one entry per domain.

License

MIT