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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cfman

v0.4.0

Published

A beautiful CLI tool to manage multiple Cloudflare accounts and deploy Workers with ease

Readme

🌩️ cfman

A beautiful CLI tool to manage multiple Cloudflare accounts and deploy Workers/Pages with ease

NPM version License Package Provenance

✨ Features

  • 🔐 Secure Token Management - Store multiple Cloudflare API tokens safely
  • 🚀 One-Command Deployment - Deploy Workers or Pages to any account with a single command
  • 🎨 Beautiful CLI - Colorful, intuitive interface with helpful prompts and emojis
  • 🔄 Complete Wrangler Integration - Full overlay on top of Wrangler with account management
  • 📄 Pages Support - Deploy Next.js and other static sites to Cloudflare Pages
  • Smart Fallback - Automatically uses npx wrangler if global installation is not found
  • 🛡️ Type-Safe - Built with TypeScript for reliability
  • Fast & Lightweight - Single bundled executable

🚀 Quick Start

Installation

# Global installation (recommended)
npm install -g cfman

# Or use with npx (no installation needed)
npx cfman --help

Setup Your First Account

# Add your first Cloudflare account
cfman token add --name production --token your_cf_token_here

# Check status with beautiful output
cfman status

# Use any Wrangler command with account management
cfman wrangler --account production whoami

📚 Usage

Token Management

# Add a new account token with guided prompts
cfman token add --name staging --token cf_abc123...

# List all configured accounts (tokens never shown)
cfman token list

# Remove an account with confirmation
cfman token remove staging

# Show config file locations and security info
cfman token info

Universal Wrangler Commands

# Run ANY Wrangler command with account management
cfman wrangler --account myaccount whoami
cfman wrangler --account myaccount pages project list
cfman wrangler --account myaccount d1 list
cfman wrangler --account myaccount kv namespace list

# Examples for Pages
cfman wrangler --account myaccount pages deploy out
cfman wrangler --account myaccount pages deployment list

# Examples for Workers
cfman wrangler --account myaccount deploy
cfman wrangler --account myaccount tail my-worker
cfman wrangler --account myaccount secret put SECRET_KEY

# Works without global Wrangler installation (uses npx automatically)
cfman wrangler --account myaccount whoami

Status & Setup

# Check current configuration with beautiful interface
cfman status

# Interactive setup wizard for new users
cfman setup

🔧 Configuration

Token Storage

Tokens are securely stored in your system's config directory:

  • macOS/Linux: ~/.config/cfman/tokens.json
  • Windows: %APPDATA%/cfman/tokens.json

File permissions are set to 600 (owner read/write only) for security.

Wrangler Integration

cfman is a complete overlay on top of Wrangler supporting:

  1. Universal Commands - Run ANY Wrangler command with cfman wrangler --account name <command>
  2. Smart Fallback - Uses npx wrangler automatically if global Wrangler is not installed
  3. Fallback Support - Uses wrangler auth login when no tokens are configured
  4. Beautiful Interface - Enhanced with colors, emojis, and helpful prompts

Wrangler Installation:

  • Recommended: npm install -g wrangler (faster execution)
  • Automatic: cfman automatically uses npx wrangler as fallback
  • No Setup Required: Works out of the box with Node.js installed

🎯 Why cfman?

Before cfman:

# Switch between accounts manually
export CLOUDFLARE_API_TOKEN=cf_token_for_client_a
wrangler deploy --env production

export CLOUDFLARE_API_TOKEN=cf_token_for_client_b  
wrangler pages deploy out

With cfman (Universal Overlay):

# Clean, simple, safe - Works with ANY Wrangler command
cfman wrangler --account client-a deploy --env production
cfman wrangler --account client-b pages deploy out
cfman wrangler --account client-a d1 create my-database
cfman wrangler --account client-b kv namespace create my-kv

# Beautiful interface with helpful guidance
cfman status  # See what's configured
cfman setup   # Interactive setup wizard

🛠️ Development

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Setup

# Clone the repository
git clone https://github.com/novincode/cfman.git
cd cfman

# Install dependencies
pnpm install

# Build the project
pnpm build

# Test locally
./dist/index.js --help

Build & Release

# Build for production
pnpm build

# Run in development mode with auto-reload
pnpm dev

# Publish to npm
npm publish

🔒 Security

  • 🛡️ Package Provenance: Published with cryptographic verification linking npm package to GitHub source code
  • 🔐 Secure Token Storage: API tokens stored locally with secure file permissions (600)
  • 👁️ Privacy: Tokens are never logged, printed, or transmitted
  • 🔒 OS-Level Encryption: Each account's token is isolated and encrypted at rest by the OS
  • ✅ Supply Chain Security: Verifiable build process through GitHub Actions and npm attestations
  • Compatible with existing Wrangler authentication methods

🤝 Contributing

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

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

📄 License

MIT © Shayan Moradi

🙏 Acknowledgments

  • Built on top of Wrangler - the official Cloudflare Workers CLI
  • Inspired by the need for better multi-account management in modern development workflows