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

env-ironmint

v1.0.1

Published

CLI tool to validate .env files, detect security issues, and prevent production disasters

Readme

🔧 env-ironmint

A modern utility to verify, compare and validate .env files across your project. Perfect for CI/CD pipelines and local development.

✨ Features

  • 🔍 Automatic Detection - Finds all .env* files in your project
  • 🔒 Security Validation - Detects exposed secrets and weak patterns
  • 📊 Smart Comparison - Compares against .env.example template
  • 🎨 Beautiful Output - Colorful, readable console output
  • 🔄 Sync Mode - Sync .env.local with .env.example
  • 📝 Git Integration - Check .gitignore and tracking status
  • 🚀 CLI Ready - Run with npx env-ironmint

🚀 Quick Start

# Install globally
npm install -g env-ironmint

# Or run directly with npx
npx env-ironmint

# Validate with git checks
npx env-ironmint validate --git

# Sync your local environment
npx env-ironmint sync

# List all .env files
npx env-ironmint list

📋 Commands

validate (default)

Validate all .env files against .env.example

npx env-ironmint validate [options]

Options:

  • --mode <mode> - Environment mode (development, production, test)
  • --git - Check git integration and .gitignore
  • --verbose - Show detailed output
  • --output <format> - Output format (table, json, summary)

sync

Sync .env.local with .env.example

npx env-ironmint sync [target]

Options:

  • --target <file> - Target file to sync (default: .env.local)

list

List all .env files in the current directory

npx env-ironmint list

🔧 Configuration

Environment Files Structure

env-ironmint automatically detects these file patterns:

.env                    # Main environment file
.env.local             # Local overrides (should be gitignored)
.env.development       # Development environment
.env.test              # Test environment
.env.production        # Production environment
.env.staging           # Staging environment
.env.example           # Template file (should be in git)
.env.defaults          # Default values

.gitignore Recommendations

Make sure your .gitignore includes:

# Environment files
.env
.env.local
.env.*.local
.env.production
.env.staging

# But keep these in git
!.env.example
!.env.defaults

🛡️ Security Features

env-ironmint detects:

  • Exposed Secrets - Variables with secret patterns but weak values
  • Weak Patterns - Common placeholder values like "test", "password"
  • Empty Variables - Missing required values
  • Git Tracking - Files that shouldn't be in version control

📊 Output Examples

Validation Summary

╔══════════════════════════════════════════════════════════════╗
║                    🔧 env-ironmint v1.0.0                   ║
║              Environment Variables Validator                 ║
╚══════════════════════════════════════════════════════════════╝

📊 Summary:
  Files checked: 3
  Valid files: 2 / 1
  Average score: 85.0/100
  Status: ❌ 1 file(s) have issues

📄 .env.local ✅ Valid 95.0/100
   Path: /project/.env.local

📄 .env.development ❌ Issues found 70.0/100
   Path: /project/.env.development
  ❌ Missing variables:
    • API_KEY
  🔴 Empty variables:
    • DATABASE_URL
  ⚠️  Suspicious values:
    • PASSWORD = "password"

Security Warnings

🚨 Security Issues:
  🔴 High Severity:
    • API_KEY: Secret variable 'API_KEY' has a weak or default value
  🟡 Medium Severity:
    • PASSWORD: Variable 'PASSWORD' has a weak or placeholder value: 'password'

🔄 Sync Mode

The sync command helps you create a local environment file:

npx env-ironmint sync

This will:

  • Create .env.local if it doesn't exist
  • Copy all variables from .env.example
  • Preserve existing values in .env.local
  • Fill empty values with TODO_ placeholders

🏗️ Development

# Clone the repository
git clone <repository-url>
cd env-ironmint

# Install dependencies
npm install

# Build the project
npm run build

# Run in development
npm run dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Test the CLI
npm start validate --git

🧪 Testing

The project includes comprehensive testing setup:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

# Run tests for CI
npm run test:ci

Test Structure

  • Unit Tests: Test individual utility functions
  • Integration Tests: Test CLI commands end-to-end
  • Coverage: Minimum 50% code coverage required

📦 Publishing

# Build for production
npm run build

# Run tests before publishing
npm run test:ci

# Publish to npm
npm publish

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Built with TypeScript and Node.js
  • Uses commander.js for CLI interface
  • Styled with chalk for beautiful output
  • Inspired by modern development workflows