Skip to content

litepacks/envx-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

envx-ui

A minimal local web UI for managing dotenv[x] environment files.

⚑ Fast, zero-config, developer-friendly

Main UI

πŸ”’ Privacy & Security

This tool is 100% local and offline.

  • βœ… No data leaves your machine - All operations happen locally
  • βœ… No external API calls - Zero network requests to third parties
  • βœ… No telemetry or analytics - We don't track anything
  • βœ… No cloud storage - Your secrets stay on your disk
  • βœ… No authentication required - It's your local machine
  • βœ… Open source - Inspect the code yourself

The server runs on localhost only and is not accessible from other machines. Your environment variables and encryption keys never leave your computer.

πŸ’‘ Tip: You can verify this by checking the network tab in your browser's developer tools while using the app - you'll see only local requests to localhost.

Features

  • πŸ“ Scan and list all .env* files in current directory
  • πŸ” Fuzzy folder search - quickly switch between projects
  • πŸ”’ Mask values by default with show/hide toggle
  • ✏️ Inline editing of environment variables
  • βž• Add new keys
  • πŸ—‘οΈ Delete keys
  • πŸ” dotenvx encryption support (decrypt/encrypt with DOTENV_KEY)
  • πŸ’Ύ Preserve comments and formatting when saving
  • ⭐ Save favorite folders for quick access
  • πŸ• Recent folders history
  • 🎨 Beautiful dark theme UI

Screenshots

Main Interface

The main UI shows your environment variables with masked values. Click the πŸ‘ button to reveal values.

Main UI

Folder Search

Fuzzy search to quickly find and switch between project folders.

Folder Search

Installation

npm install

Usage

# Start in current directory
node cli.js

# Or specify a port
node cli.js --port 8080

# Or run via npm
npm start

The UI will automatically open in your default browser.

πŸ” Security: By default, the server starts on a random port to prevent browser extension attacks.

Press Ctrl+C to stop the server.

CLI Options

Option Description
-p, --port PORT Port to run server on (default: random)
-h, --help Show help message
-v, --version Show version number

Keyboard Shortcuts

Shortcut Action
Enter Save current edit
Escape Cancel edit or close modal
Ctrl+S Save current edit
Ctrl+N Add new key (when file is selected)
↑ / ↓ Navigate folder search results

Supported Files

The UI scans for these files in the current working directory:

  • .env
  • .env.local
  • .env.development
  • .env.staging
  • .env.production
  • .env.test
  • .env.* (any other .env files)

dotenvx Encryption

This tool fully supports dotenvx encryption for secure environment variable management.

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        dotenvx Encryption Flow                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  πŸ“„ .env.production                    πŸ”‘ .env.keys                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ DB_HOST=localhost       β”‚          β”‚ DOTENV_PRIVATE_KEY_PROD=... β”‚  β”‚
β”‚  β”‚ DB_PASS=encrypted:...   │◄────────►│ DOTENV_PUBLIC_KEY_PROD=...  β”‚  β”‚
β”‚  β”‚ API_KEY=encrypted:...   β”‚  decrypt β”‚                             β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  encrypt β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚           β”‚                                       β”‚                     β”‚
β”‚           β”‚                                       β”‚                     β”‚
β”‚           β–Ό                                       β–Ό                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                        envx-ui                                   β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚   β”‚
β”‚  β”‚  β”‚  DB_HOST    β”‚ localhost      β”‚ πŸ‘ ✏️ πŸ—‘                 β”‚    β”‚   β”‚
β”‚  β”‚  β”‚  DB_PASS    β”‚ β€’β€’β€’β€’β€’β€’β€’β€’       β”‚ πŸ‘ ✏️ πŸ—‘  πŸ” encrypted   β”‚    β”‚   β”‚
β”‚  β”‚  β”‚  API_KEY    β”‚ β€’β€’β€’β€’β€’β€’β€’β€’       β”‚ πŸ‘ ✏️ πŸ—‘  πŸ” encrypted   β”‚    β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚   β”‚
β”‚  β”‚                                                                  β”‚   β”‚
β”‚  β”‚  [πŸ” Encrypt] - Encrypts all plain text values                  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

File Structure

your-project/
β”œβ”€β”€ .env                    # Plain text (development)
β”œβ”€β”€ .env.production         # Contains encrypted values
β”œβ”€β”€ .env.staging            # Contains encrypted values
└── .env.keys               # πŸ” Private keys (add to .gitignore!)
    β”œβ”€β”€ DOTENV_PRIVATE_KEY_PRODUCTION=ec...
    β”œβ”€β”€ DOTENV_PUBLIC_KEY_PRODUCTION=03...
    β”œβ”€β”€ DOTENV_PRIVATE_KEY_STAGING=ab...
    └── DOTENV_PUBLIC_KEY_STAGING=02...

Encrypted Value Format

Encrypted values in .env files look like this:

# Plain text value
DB_HOST=localhost

# Encrypted value (dotenvx format)
DB_PASSWORD="encrypted:BE9Y7LKANx8setup0uyYkBA+Z..."
API_KEY="encrypted:BA3pP5eKIxqN6rSFWz9nXw4C..."

Encryption Workflow

  1. Reading Encrypted Files

    • UI detects .env.keys file in the project
    • Loads private keys (DOTENV_PRIVATE_KEY_*)
    • Automatically decrypts values for display
    • Shows πŸ” indicator for encrypted values
  2. Editing Encrypted Values

    • Click ✏️ to edit any value
    • Edit the decrypted plain text
    • Save - value is re-encrypted automatically
  3. Encrypting Plain Text Files

    • Click "πŸ” Encrypt" button
    • All plain text values are encrypted
    • Creates/updates .env.keys with new keys
    • Original file is updated with encrypted values

Security Notes

Item Recommendation
.env.keys ⚠️ Add to .gitignore - Never commit!
.env.production βœ… Safe to commit (values are encrypted)
Private keys πŸ” Share securely with team (1Password, etc.)
Public keys βœ… Can be shared openly

Example .gitignore

# Environment files with secrets
.env
.env.local
.env.*.local

# dotenvx private keys - NEVER COMMIT
.env.keys

# Encrypted env files are safe to commit
# .env.production
# .env.staging

Using with dotenvx CLI

This UI is fully compatible with dotenvx CLI:

# Encrypt a file
dotenvx encrypt -f .env.production

# Decrypt and run
dotenvx run -- node app.js

# Set specific key
dotenvx set API_KEY "secret" -f .env.production

Values encrypted by dotenvx CLI can be read/edited in envx-ui, and vice versa.

How It Works

  1. Local Server: Starts an Express.js server on localhost
  2. File System Access: Reads/writes .env files in your project directory
  3. Browser UI: Opens automatically in your default browser
  4. No Network: All communication stays between your browser and local server
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Your Computer                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      localhost      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Browser  β”‚ ◄──────────────────► β”‚ Express.js  β”‚  β”‚
β”‚  β”‚   UI     β”‚                      β”‚   Server    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                           β”‚          β”‚
β”‚                                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚                                    β”‚  .env files  β”‚  β”‚
β”‚                                    β”‚  (your disk) β”‚  β”‚
β”‚                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ❌ No external connections

Project Structure

envx-ui/
β”œβ”€β”€ cli.js                   # Entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ index.js             # Express server & routes
β”‚   β”œβ”€β”€ env.service.js       # Env file parsing/writing
β”‚   β”œβ”€β”€ crypto.service.js    # Encryption/decryption
β”‚   └── folder.service.js    # Folder management
β”œβ”€β”€ views/
β”‚   └── index.ejs            # Main UI template
└── public/
    β”œβ”€β”€ style.css            # Dark theme styles
    └── app.js               # Client-side interactions

Requirements

  • Node.js 18+
  • npm or yarn

Dependencies

  • express - Web server
  • ejs - Template engine
  • open - Browser launcher
  • @dotenvx/dotenvx - Encryption support
  • helmet - Security headers (CSP, XSS protection)

Release

# Release a new version (patch/minor/major)
npm run release

# Or specify version
npm run release -- patch
npm run release -- minor
npm run release -- major

Contributing

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

License

MIT


Made with ⚑ by litepacks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors