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

sendforai

v0.1.2

Published

Command line for SendForAI, the email API for AI agents. Every command prints JSON. Run it with npx sendforai.

Downloads

776

Readme

sendforai

Command line for SendForAI, the email API for AI agents. Built to be driven from a shell by an agent:

  • Every command prints JSON to stdout and nothing else.
  • Errors print {"error":{"code","message","fix","details"}} to stderr and exit 1. fix says what to do next.
  • Nothing ever prompts. No API keys: your identity is a key file on disk.
npx sendforai --help        # or: npm i -g sendforai

Needs Node 18.3 or newer.

60 seconds, no domain

npx sendforai sandbox
# { "domain": "k3f9...sandbox.sendforai.com", "key_file": "~/.sendforai/k3f9...key", "next": "..." }

npx sendforai send --from agent@<that domain> \
  --to [email protected] --subject "Hi" --text "Hello"

sandbox generates a key, saves it, and creates an account. A sandbox can use the whole API, but mail only reaches @simulator.sendforai.com (free, never delivered). When you have a domain, add it to the same account:

VERCEL_TOKEN=... npx sendforai dns setup --domain example.com --wait   # or CLOUDFLARE_API_TOKEN

With a domain

npx sendforai init example.com          # prints the TXT record to publish
npx sendforai domains verify            # prints the DKIM and MAIL FROM records
npx sendforai domains status            # check progress, read "next"

Or let the CLI publish every record with your DNS token (used locally, never sent to SendForAI):

VERCEL_TOKEN=... npx sendforai init example.com --dns --wait
npx sendforai send --from [email protected] --to [email protected] --subject "Hi" --markdown "**It works.**"

init never overwrites a key: if ~/.sendforai/<domain>.key exists it is reused.

Commands

| Command | What it does | | --- | --- | | sandbox | Create a no-DNS identity for the simulator | | init <domain> [--dns] [--wait] | Create or reuse a key for your domain, print the DNS record | | dns setup [--domain d] [--wait] | Publish all DNS records via Vercel or Cloudflare | | whoami | Domain, public key, key file, sandbox, auth mode (no network) | | send --from --to --subject (--markdown\|--text\|--html\|--markdown-file\|--html-file) | Send. Also --reply-to, --stream, --max-cost, --idempotency-key, --dry-run | | account / capacity / usage / pricing | Balance and domains, caps, this period's cost, published prices | | topup [--amount 10] [--auto-topup] | Checkout link for a human to add credit | | budget <usd> | Set the monthly budget (raising returns an approval link) | | billing | Billing portal link for a human | | operator | Operator page link for a human: see the account, add credit, budget, auto top-up, card, notice email | | domains list\|add <name>\|status [name]\|verify [name] | Manage sending domains | | contacts add <email> [--data json]\|list\|unsubscribe <email>\|import <file.json\|file.csv> | Manage contacts. CSV needs an email column; other columns go into data | | broadcasts create --from --subject (--markdown\|--markdown-file\|--html-file)\|get <id>\|send <id>\|cancel <id> | Broadcasts. create also takes --filter json, --max-cost, --no-approval, --dry-run | | events [--cursor c] [--type t] [--limit n] | Pull delivery events | | token [--days 30] | Mint a bearer token for curl or hosted MCP (needs the key) | | mcp | Print ready-to-paste MCP client config, local and hosted |

sendforai <command> --help shows options and examples.

Identity and environment

Resolved in this order: flags, environment, then ~/.sendforai/config.json (written by init and sandbox).

| Flag | Environment | Meaning | | --- | --- | --- | | --domain | SENDFORAI_DOMAIN | Identity domain | | --key-file | SENDFORAI_PRIVATE_KEY_FILE | Path to the PKCS#8 PEM private key | | | SENDFORAI_PRIVATE_KEY | The PEM itself; newlines may be literal \n | | | SENDFORAI_TOKEN | Connection token, used when there is no key | | --base-url | SENDFORAI_BASE_URL | API URL (default https://api.sendforai.com) | | | VERCEL_TOKEN, VERCEL_TEAM_ID, CLOUDFLARE_API_TOKEN, SENDFORAI_DNS_PROVIDER | DNS provider for dns setup and init --dns |

Keys live at ~/.sendforai/<domain>.key (mode 0600, directory 0700). A private key is never printed unless you pass --print-key.

MIT