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

@yoyo-org/envtui-config

v1.0.6

Published

Interactive TUI for managing environment variables across multiple .env files with config-driven dynamic forms

Readme

@yoyo-org/envtui-config

npm version License: MIT

Interactive TUI for managing environment variables across multiple .env files

Quick Start:

# 1. Install Bun (one-time):
curl -fsSL https://bun.sh/install | bash

# 2. Run with bunx (recommended):
bunx @yoyo-org/envtui-config ./env-config.ts

Note: Use bunx for best experience. While npx is supported, it may have issues with interactive terminal features.


What It Does

Before: You have multiple .env files that need manual updates

# ./apps/web/.env
API_URL=http://localhost:3000
DATABASE_URL=localhost:5432

# ./apps/mobile/.env
API_URL=http://localhost:3000
BACKEND_URL=http://localhost:3000

# ./apps/api/.env
API_URL=http://localhost:3000

After: Run the tool, select "Production", and all files update automatically

# ./apps/web/.env
API_URL=https://api.example.com
DATABASE_URL=localhost:5432

# ./apps/mobile/.env
API_URL=https://api.example.com
BACKEND_URL=https://api.example.com

# ./apps/api/.env
API_URL=https://api.example.com

Demo

┌─API Domain (Enter: confirm | Esc: exit)─────────────────┐
│ ▶ Skip (no change)                                       │
│   Development                dev.api.example.com         │
│   Staging                    staging.api.example.com     │
│   Production                 api.example.com             │
│                                                           │
└───────────────────────────────────────────────────────────┘

🔄 Updating environment files...

✅ Updated ./apps/web/.env
   API_URL=dev.api.example.com

✅ Updated ./apps/mobile/.env
   API_URL=dev.api.example.com
   BACKEND_URL=dev.api.example.com

✨ Environment configuration complete!

Quick Start

1. Create a config file env-config.ts:

import type { EnvConfig } from '@yoyo-org/envtui-config/types';

export default {
  envFiles: ['./apps/web/.env', './apps/mobile/.env'],
  groups: [{
    name: 'api_url',
    label: 'API URL',
    variables: ['API_URL', 'BACKEND_URL'],
    options: [
      { name: 'Local', value: 'http://localhost:3000' },
      { name: 'Production', value: 'https://api.example.com' },
    ],
  }],
} as EnvConfig;

2. Run it:

npx @yoyo-org/envtui-config ./env-config.ts

3. Select an option and all your .env files update automatically!


Features

  • 🔄 Update multiple .env files at once
  • 🎯 Group related variables together
  • ⚡ Quick presets for dev/staging/prod
  • 🔧 Value formatters (http://{value}:3000)
  • 🌐 Auto-detect local IP with {LOCAL_IP} token
  • 📝 TypeScript support with autocomplete
  • ✅ Config validation

Installation

Requires Bun - Install with: curl -fsSL https://bun.sh/install | bash

Recommended: Use bunx (no package installation needed):

bunx @yoyo-org/envtui-config ./env-config.ts

Or add to your project:

bun add -d @yoyo-org/envtui-config

Add to package.json:

{
  "scripts": {
    "env": "bunx @yoyo-org/envtui-config ./env-config.ts"
  }
}

Configuration Examples

Value Formatters

Add prefixes/suffixes automatically:

{
  variables: [
    'HOST',
    { name: 'API_URL', formatter: 'http://{value}:3000' },
    { name: 'WS_URL', formatter: 'ws://{value}:3001' },
  ],
  options: [
    { name: 'Localhost', value: 'localhost' },
  ],
}
// Selecting "localhost" sets:
// HOST=localhost
// API_URL=http://localhost:3000
// WS_URL=ws://localhost:3001

Local IP Token

Use {LOCAL_IP} for mobile development:

{
  options: [
    { name: 'Local IP', value: '{LOCAL_IP}' },  // Auto-detects your machine's IP
    { name: 'Localhost', value: 'localhost' },
  ],
}

Multiple Environments

{
  options: [
    { name: 'Development', value: 'http://localhost:3000' },
    { name: 'Staging', value: 'https://staging-api.example.com' },
    { name: 'Production', value: 'https://api.example.com' },
  ],
}

Supported Config Formats

  • TypeScript: .ts (recommended for autocomplete)
  • JavaScript: .js, .mjs
  • JSON: .json

Keyboard Controls

  • ↑/↓ Navigate | Enter Confirm | Esc Exit

Requirements

  • Bun >= 1.0.0 (Install: curl -fsSL https://bun.sh/install | bash)

License

MIT © yoyo67


Made with ❤️ by yoyo67