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

@nexsend/sdk

v0.2.0

Published

Isomorphic SDK for the nexSend transactional email API.

Readme

NexSend

The official SDK for NexSend — the Cloudflare-native transactional email platform. Send transactional email from anywhere your code runs: Cloudflare Workers, Node 18+, Deno, Bun, or the browser. Zero dependencies — it only needs a fetch.

Before you start

The SDK talks to your NexSend account, so set that up first:

  1. Create an accounthttps://dev.nexb.me/ Sign up (passwordless magic link), then sign in to the dashboard.
  2. Verify a sending domain. In the dashboard, add the domain you'll send from and follow the DNS steps until it shows verified. You can only send from a domain your account has verified.
  3. Create an API key. Generate a key in the dashboard — it's shown once, so copy it. This is the apiKey you pass to the SDK.
  4. Read the docs. The full guides, request/response reference, and live examples live in the dashboard under Docs (https://dev.nexb.me/docs).

Once your domain is verified and you have an API key, install the SDK and send.

Install

npm install @nexsend/sdk
# or
pnpm add @nexsend/sdk

Quick start

import { NexSend } from "@nexsend/sdk";

const ns = new NexSend({ apiKey: process.env.NEXSEND_API_KEY });

const { data, error } = await ns.emails.send({
  from: "[email protected]", // must be a verified domain
  to: "[email protected]",
  subject: "Hello",
  html: "<p>Hi there</p>",
});

if (error) {
  console.error(error.code, error.message);
} else {
  console.log("queued", data.id, data.status);
}

Every method returns { data, error } — it never throws on an API error (only on network/programmer errors). Inspect error for { code, message, status }.

Options

new NexSend({
  apiKey: "cm_live_...",      // required — created in the dashboard
  baseUrl: "https://...",     // default https://dev-api.nexb.me
  maxRetries: 2,              // 429/5xx retries for idempotent requests
  fetch: globalThis.fetch,    // custom fetch (e.g. undici)
});

CLI (npx)

The same package ships a CLI, so you can send mail and inspect your account without writing any code. Authenticate with the NEXSEND_API_KEY env var (or pass --api-key):

# Send an email
NEXSEND_API_KEY=cm_live_... npx @nexsend/sdk send \
  --from [email protected] \
  --to [email protected] \
  --subject "Hello" \
  --text "Hi there"

# Inspect your account
npx @nexsend/sdk emails list --limit 5
npx @nexsend/sdk emails get cm_email_123
npx @nexsend/sdk domains list
npx @nexsend/sdk api-keys list

# Machine-readable output
npx @nexsend/sdk emails list --json

Run npx @nexsend/sdk --help for the full command list. Every command exits non-zero on error.

API surface

| Resource | Methods | | ------------- | ---------------------------------------------------- | | emails | send, get, list | | domains | create, list, verify, setupDns, delete | | apiKeys | create, list, revoke | | suppressions| list, remove |

Idempotent sends

send only retries on 429/5xx when you pass an idempotency key:

await ns.emails.send(input, { idempotencyKey: crypto.randomUUID() });

Links

License

MIT