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

dotenv-push

v0.3.0

Published

CLI tool to push environment variables to cloud providers

Readme

dotenv-push

A CLI tool to push environment variables to cloud providers.

Features

  • Push .env files to Vercel (more providers coming soon)
  • Support for reading environment variables from stdin
  • Works with both encrypted (via dotenvx) and plain .env files
  • Support for multiple environments (.env.production, .env.staging, etc.)
  • Interactive or automated deployment modes

Installation

npm install -g dotenv-push

Usage

Basic Usage

# Push .env.production to Vercel (uses .vercel/project.json)
dotenv-push vercel

# Specify project ID and token
dotenv-push vercel --project abc123 --token your-vercel-token

# Push different environment file
dotenv-push vercel --env .env.staging

# Push to Vercel development environment
dotenv-push vercel --target development --env .env.development

# Push to Vercel preview environment
dotenv-push vercel --target preview --env .env.preview

# Push to a custom Vercel environment (custom environment name)
dotenv-push vercel --target staging --env .env.feature

# Skip confirmation prompts
dotenv-push vercel --yes

With stdin (piping)

# From a file
cat .env | dotenv-push vercel --stdin

# From dotenvx (for encrypted files)
dotenvx decrypt --env-file=.env.production --stdout | dotenv-push vercel --stdin

# From any command that outputs env format
echo "API_KEY=secret" | dotenv-push vercel --stdin --project abc123

Advanced Examples

# Decrypt with dotenvx and push to Vercel
dotenvx decrypt --env-file=.env.production --stdout | dotenv-push vercel --stdin --yes

# Use with environment substitution
envsubst < .env.template | dotenv-push vercel --stdin

# Filter specific variables
grep "^NEXT_PUBLIC_" .env | dotenv-push vercel --stdin

Options

  • -p, --project <id> - Project ID (optional for Vercel, uses .vercel/project.json)
  • -t, --token <token> - Provider API token
  • -e, --env <file> - Environment file path (defaults to .env.production)
  • --target <name> - Vercel environment target (production, preview, development, or a custom environment name, defaults to production)
  • -s, --stdin - Read environment variables from stdin
  • -y, --yes - Skip confirmation prompts
  • -h, --help - Show help message

Environment Variables

  • VERCEL_TOKEN - Vercel API token (used if --token not provided)

Providers

Vercel

For Vercel, the tool will:

  1. Read project ID from .vercel/project.json if not specified
  2. Replace ALL environment variables for the selected Vercel environment (default: production) with the ones from your file/stdin. Supports production, preview, development, and custom environment names.
  3. Automatically mark sensitive variables (containing KEY, SECRET, TOKEN) as encrypted

Use Cases

  1. Plain .env files: Push unencrypted environment variables directly
  2. Encrypted files: Use with dotenvx decrypt --stdout for encrypted variables
  3. CI/CD pipelines: Use --yes flag to skip confirmations
  4. Filtered deployments: Use grep/sed to deploy only specific variables

Requirements

  • Node.js 18+
  • Provider-specific setup (e.g., .vercel/project.json for Vercel)

Development

# Install dependencies
npm install

# Develop with Bun
npm run dev

# Build (Bun bundler → Node-compatible ESM)
npm run build

# Run tests (Bun test runner)
npm run test

# Lint & Format (Biome)
npm run check         # lint + format diagnostics
npm run lint          # lint only
npm run lint:fix      # apply safe lint fixes
npm run format:check  # format check (no write)
npm run format        # write formatted files

Note: The published CLI remains Node-compatible; dist output is built with Bun and includes a Node shebang so node can execute it. Bun is used for local dev, tests, and builds.

Releasing

To publish a new version to npm, use one of the following commands:

# Patch release (0.1.0 → 0.1.1) - for bug fixes
npm version patch && git push origin main --tags

# Minor release (0.1.0 → 0.2.0) - for new features
npm version minor && git push origin main --tags

# Major release (0.1.0 → 1.0.0) - for breaking changes
npm version major && git push origin main --tags

This updates package.json, creates a git tag, and pushes it. The GitHub Actions workflow will automatically publish to npm.

License

MIT