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

@stepandel/agentmail-cli

v1.0.0

Published

CLI tool for AgentMail - manage inboxes and messages from the command line

Readme

AgentMail CLI

A command-line interface for AgentMail - manage email inboxes and messages from your terminal.

Installation

# Install globally
npm install -g agentmail-cli

# Or run directly with npx
npx agentmail-cli

Configuration

API Key

Set your API key using one of these methods:

Option 1: Environment variable (recommended for CI/CD)

export AGENTMAIL_API_KEY=your-api-key

Option 2: Config file

agentmail config set-key your-api-key

The config file is stored at ~/.agentmail/config.json.

View Configuration

agentmail config show

Usage

Inbox Commands

Create an inbox:

# Create with auto-generated email
agentmail inbox create

# Create with custom domain
agentmail inbox create --domain example.com

# Create with specific username
agentmail inbox create --username support --domain example.com

# Create with display name
agentmail inbox create --display-name "Support Team"

List all inboxes:

agentmail inbox list

# Limit results
agentmail inbox list --limit 10

Get inbox details:

agentmail inbox get <inbox-id>

Delete an inbox:

agentmail inbox delete <inbox-id>

Message Commands

Send a message:

# Basic message
agentmail message send \
  --from <inbox-id> \
  --to [email protected] \
  --subject "Hello" \
  --text "Hello, World!"

# With HTML body
agentmail message send \
  --from <inbox-id> \
  --to [email protected] \
  --subject "Hello" \
  --html "<h1>Hello</h1><p>World!</p>"

# Multiple recipients
agentmail message send \
  --from <inbox-id> \
  --to "[email protected],[email protected]" \
  --subject "Hello" \
  --text "Hello everyone!"

# With CC and BCC
agentmail message send \
  --from <inbox-id> \
  --to [email protected] \
  --cc "[email protected],[email protected]" \
  --bcc [email protected] \
  --subject "Hello" \
  --text "Hello, World!"

List messages in an inbox:

agentmail message list <inbox-id>

# Limit results
agentmail message list <inbox-id> --limit 20

Get a specific message:

agentmail message get <inbox-id> <message-id>

Delete a message:

agentmail message delete <inbox-id> <message-id>

Note: Deleting a message deletes the entire thread containing that message.

Output Formats

All commands support a --json flag for machine-readable output:

# Human-readable (default)
agentmail inbox list

# JSON output
agentmail inbox list --json

JSON Output Examples

Inbox list:

{
  "count": 2,
  "inboxes": [
    {
      "inboxId": "abc123",
      "podId": "pod_xyz",
      "displayName": "Support",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ]
}

Send message response:

{
  "messageId": "msg_abc123",
  "threadId": "thread_xyz789"
}

Help

# General help
agentmail --help

# Command-specific help
agentmail inbox --help
agentmail message --help
agentmail config --help

Environment Variables

| Variable | Description | |----------|-------------| | AGENTMAIL_API_KEY | API key for authentication (takes precedence over config file) |

Examples

Workflow: Create inbox and send email

# 1. Configure API key
export AGENTMAIL_API_KEY=your-api-key

# 2. Create an inbox
agentmail inbox create --json | tee inbox.json
INBOX_ID=$(cat inbox.json | jq -r '.inboxId')

# 3. Send an email
agentmail message send \
  --from "$INBOX_ID" \
  --to [email protected] \
  --subject "Welcome!" \
  --text "Thanks for signing up!"

# 4. Check for responses
agentmail message list "$INBOX_ID"

Workflow: Process incoming messages

# Get all messages as JSON for processing
agentmail message list "$INBOX_ID" --json | jq '.messages[] | {from, subject}'

License

MIT