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

@tklein1801/cloudflare-email-routing

v0.1.1

Published

CLI to create Cloudflare Email Routing forwarding rules for proxy email addresses.

Readme

cloudflare-email-routing

CLI tool for managing Cloudflare Email Routing forwarding rules and destination addresses.

Installation

npm install --global @tklein1801/cloudflare-email-routing

cer --help
# The long command name is also available:
cloudflare-email-routing --help

Prerequisites

  1. A Cloudflare account with a managed domain.
  2. An API token with access to the account and the required Email Routing permissions.
  3. The API token exported as CLOUDFLARE_API_TOKEN or stored in a local .env file.
export CLOUDFLARE_API_TOKEN=your-token

Run the configuration check before using the API:

cer config doctor
cer config doctor --json

The token is never accepted as a command-line flag, so it does not appear in shell history or process listings.

Commands

Without a command, cer displays the help dialog. Use cer interactive to open the interactive menu. Every operation is also available as a scriptable subcommand:

The root invocation displays an orange ASCII banner. Subcommands and JSON output remain free of decorative output.

cer accounts list

cer addresses list
cer addresses create <email>
cer addresses delete <address-id>

cer rules list
cer rules create <alias> <destination>
cer rules delete <rule-id>

Account and zone values can be selected interactively, provided through flags, or configured with environment variables:

cer addresses list --account-id ACCOUNT_ID
cer rules list --account-id ACCOUNT_ID --zone example.com
cer rules list --account-id ACCOUNT_ID --zone-id ZONE_ID

The following environment variables are supported:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • CLOUDFLARE_ZONE_ID
  • CLOUDFLARE_ZONE

Automation

Use --non-interactive to fail instead of prompting, --yes to skip destructive-operation confirmations, and --json for machine-readable output:

cer rules create newsletter [email protected] \
  --account-id ACCOUNT_ID \
  --zone example.com \
  --non-interactive \
  --yes \
  --json

cer addresses list --account-id ACCOUNT_ID --json
cer rules list --account-id ACCOUNT_ID --zone example.com --all --filter newsletter --json

Destructive commands require confirmation by default. In non-interactive mode they require --yes.

rules create checks existing matchers before creating a rule and refuses duplicate aliases. addresses list supports --verified; rules list supports --all and --filter.

API Token Permissions

Scope the token to the exact domain whenever possible. Wildcard zone permissions are not recommended.

Accounts

The token must have access to the account.

Zones

  • Zones: Zone Read

Email Routing

  • Email Routing: Routing Write
  • Email Routing: Addresses Write

See the token permission overview and the Cloudflare API token documentation.

Development

npm install
npm run format:check
npm test
npm run build
npm pack --dry-run

The CLI is implemented with oclif. Commands are discovered from src/commands and compiled to dist/commands. The test suite uses Vitest.

Resources