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

@mjrussell/resend-cli

v0.1.0

Published

Unofficial CLI for Resend email API

Readme

resend-cli

CI npm version License: MIT

Unofficial CLI for Resend — Not affiliated with or endorsed by Resend.

A command-line interface for the Resend email API for managing received (inbound) emails and attachments.

Features

  • List and view received emails
  • View email attachments
  • JSON output for scripting
  • Simple environment-based configuration

Installation

From npm (recommended)

npm install -g @mjrussell/resend-cli

From source

git clone https://github.com/mjrussell/resend-cli.git
cd resend-cli
npm install
npm run build
npm install -g .

Configuration

Set your Resend API key as an environment variable:

export RESEND_API_KEY="re_your_api_key_here"

Getting an API Key

  1. Sign up at resend.com
  2. Set up inbound email routing for your domain
  3. Go to API Keys → Create API key (needs read permissions)
  4. Store securely (e.g., in your shell profile or a secrets manager)

Quick Start

# List received emails
resend email list

# Get details for a specific email
resend email get <email_id>

# List attachments for an email
resend email attachments <email_id>

# JSON output for scripting
resend email list --json | jq '.data.data[0]'

Commands

resend email list [options]

List received (inbound) emails (default: 10 most recent).

| Option | Description | |--------|-------------| | -j, --json | Output as JSON | | -l, --limit <n> | Number of emails (default: 10) |

resend email get <id>

Get details for a received email (from, to, subject, text, html).

| Option | Description | |--------|-------------| | -j, --json | Output as JSON |

resend email attachments <email_id>

List all attachments for a received email.

| Option | Description | |--------|-------------| | -j, --json | Output as JSON |

resend email attachment <email_id> <attachment_id>

Get metadata for a specific attachment.

| Option | Description | |--------|-------------| | -j, --json | Output as JSON | | -o, --output <path> | Output path (metadata only) |

Examples

# List 5 most recent emails
resend email list --limit 5

# Get the most recent email ID
EMAIL_ID=$(resend email list --json | jq -r '.data.data[0].id')

# Get email details
resend email get $EMAIL_ID

# Check attachment count
resend email attachments $EMAIL_ID --json | jq '.data.data | length'

Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | RESEND_API_KEY | Your Resend API key | Yes |

Exit Codes

| Code | Description | |------|-------------| | 0 | Success | | 1 | API error or generic failure | | 2 | Invalid usage or missing API key |

Development

git clone https://github.com/mjrussell/resend-cli.git
cd resend-cli
npm install
npm run build      # Build the CLI
npm run dev        # Run with tsx (dev mode)
npm run watch      # Watch mode with tsup
npm run typecheck  # Type check without emitting

Roadmap

  • [ ] Send emails (resend email send)
  • [ ] Domain management (resend domain list)
  • [ ] Actual attachment file downloads
  • [ ] Pagination support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © Matt Russell

Disclaimer

This is an unofficial tool. Resend is a trademark of Resend Inc.