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

envcf

v1.1.9

Published

πŸš€ Beautiful CLI tool to push environment variables to Cloudflare Pages/Workers

Readme

πŸŒ₯️ EnvCF

Beautiful CLI tool to push environment variables to Cloudflare Pages/Workers

npm version License: MIT

EnvCF is a modern, user-friendly CLI tool that makes it super easy to sync your environment variables from .env files to Cloudflare Pages or Workers. No more manual copying and pasting!

✨ Features

  • πŸ” Auto-discovery - Automatically finds your wrangler.toml or wrangler.jsonc configuration
  • πŸ“ Multiple file support - Handle .env, .env.local, .env.production, etc.
  • 🎯 Environment targeting - Deploy to production or preview environments
  • 🎨 Beautiful interface - Interactive prompts with colors and emojis
  • πŸ”’ Type-safe - Built with TypeScript for reliability
  • πŸƒβ€β™‚οΈ Dry run mode - Preview changes before applying them
  • ⚑ Fast & lightweight - Minimal dependencies, maximum performance
  • 🌩️ Multi-account support - Seamlessly integrates with cfman for managing multiple Cloudflare accounts

πŸš€ Installation

Global Installation (Recommended)

npm install -g envcf
# or
pnpm add -g envcf
# or
yarn global add envcf

Use without installing

npx envcf

πŸ“– Usage

Basic Usage

Navigate to your project directory and run:

envcf

The CLI will guide you through:

  1. πŸ” Finding your wrangler config - Automatically detects wrangler.toml or wrangler.jsonc
  2. 🎯 Choosing environment - Select between production and preview
  3. πŸ“ Selecting env files - Pick which .env files to use
  4. βœ… Confirmation - Review variables before pushing
  5. πŸš€ Deployment - Push variables to Cloudflare

Advanced Options

# Dry run - see what would happen without making changes
envcf --dry-run

# Use custom env file
envcf --file .env.custom

# Use custom wrangler config
envcf --config wrangler.custom.toml

# Show help
envcf --help

Multi-Account Management

EnvCF integrates seamlessly with cfman for managing multiple Cloudflare accounts:

# First, set up your accounts with cfman
npx cfman token add --name production --token cf_your_production_token
npx cfman token add --name staging --token cf_your_staging_token

# Then use envcf with specific accounts
envcf --account production     # Deploy to production account
envcf --account staging        # Deploy to staging account

# You can combine with other options
envcf --account production --dry-run --file .env.prod

Benefits of cfman integration:

  • πŸ” Secure token management - Store multiple API tokens safely
  • πŸš€ One-command deployment - No manual token switching
  • πŸ›‘οΈ Isolated accounts - Each account's tokens are kept separate
  • 🎯 Environment specific - Perfect for agencies or multi-client setups

πŸ—οΈ Prerequisites

  1. Wrangler CLI installed and authenticated:

    npm install -g wrangler
    wrangler login
  2. Optional: cfman for multi-account management:

    npm install -g cfman
    cfman token add --name production --token your_token
  3. Project structure with either:

    • wrangler.toml file
    • wrangler.jsonc file
  4. Environment files like:

    • .env
    • .env.local
    • .env.production
    • .env.preview

πŸ“ Example Workflow

$ envcf

πŸŒ₯️  EnvCF - Environment Variables to Cloudflare

πŸ” Looking for wrangler configuration...
βœ… Found config: wrangler.toml
πŸ“¦ Project: my-awesome-app

? Which environment do you want to deploy to? 
❯ πŸš€ Production
  πŸ§ͺ Preview

πŸ” Looking for environment files...
? Which environment files do you want to use? 
❯ β˜‘ πŸ“„ .env
  β˜‘ πŸ“„ .env.local
  ☐ πŸ“ All files

πŸ“ Parsing environment variables...
βœ… Found 12 environment variables

πŸ“‹ Environment variables to be pushed:
  β€’ DATABASE_URL (from .env)
  β€’ API_KEY (from .env)
  β€’ SECRET_TOKEN (from .env.local)
  ...

? Push these 12 variables to production? Yes

πŸš€ Pushing to Cloudflare...
πŸ”‘ Authenticated with Cloudflare
  βœ… DATABASE_URL
  βœ… API_KEY
  βœ… SECRET_TOKEN
  ...

πŸ“Š Results:
  βœ… Success: 12

✨ All environment variables pushed successfully!

πŸ”§ Configuration

Wrangler Configuration

EnvCF works with standard Wrangler configuration files:

wrangler.toml:

name = "my-app"
compatibility_date = "2023-12-01"

[env.preview]
# Preview environment config

[env.production]
# Production environment config

wrangler.jsonc:

{
  "name": "my-app",
  "compatibility_date": "2023-12-01",
  "env": {
    "preview": {},
    "production": {}
  }
}

Environment Files

Standard .env file format:

# Database
DATABASE_URL=postgresql://localhost:5432/mydb
DATABASE_POOL_SIZE=10

# API Keys
STRIPE_SECRET_KEY=sk_test_...
SENDGRID_API_KEY=SG....

# Feature Flags
ENABLE_ANALYTICS=true
DEBUG_MODE=false

🀝 Contributing

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

πŸ“„ License

MIT Β© Shayan Moradi

πŸ™ Acknowledgments


Happy deploying! πŸš€