env-diff-viewer
v1.0.0
Published
A secure, lightweight desktop app to compare .env files locally without exposing sensitive data to online diff tools
Maintainers
Readme
ENV File Diff Viewer 🔍
Securely compare
.envfiles locally without exposing sensitive data to online diff tools
A lightweight, privacy-focused desktop application built with Node.js. Keep your API keys, secrets, and credentials safe by comparing environment files entirely on your local machine.
Why ENV Diff Viewer? 🔒
Stop risking your sensitive data! Many developers use online diff tools to compare .env files, unknowingly exposing:
- API keys and tokens
- Database credentials
- Secret keys and passwords
- OAuth client secrets
- Private configuration values
ENV Diff Viewer runs 100% locally - your sensitive data never leaves your machine.
Features ✨
- 🔐 Privacy First: All comparisons happen locally on your machine
- ⚡ Quick Comparison: Paste two
.envfile contents and instantly see differences - 🎨 Visual Highlighting: Color-coded diff showing added, removed, modified, and unchanged variables
- 📊 Statistics Dashboard: At-a-glance summary of changes
- ✨ Clean UI: Modern, responsive design with smooth interactions
- 🪶 Lightweight: Runs as a local web server, can be compiled to standalone executable
- 🚀 No Dependencies: Pure Deno 2 with built-in HTTP server
- 💻 Cross-Platform: Works on macOS, Linux, and Windows
Installation 📦
Install via npm
npm install -g env-diff-viewerManual Installation
Clone this repository:
git clone https://github.com/arancibiajav/env-diff-viewer.git
cd env-diff-viewer
npm installUsage 💡
Quick Start
After installation, simply run:
env-diffOr if installed locally:
npm startStep-by-Step
Launch the application
env-diff # or: npm start # or: node main.jsOpen your browser to
http://localhost:8080Paste your
.envfiles- Left panel: Your first environment file (e.g.,
.env.local) - Right panel: Your second environment file (e.g.,
.env.production)
- Left panel: Your first environment file (e.g.,
Click "⚡ Compare Files" to see the diff
Review the results:
- 🟢 Green (+): Variables added in the second file
- 🔴 Red (-): Variables removed from the second file
- 🟡 Yellow (~): Variables with modified values
- ⚪ Gray (=): Variables unchanged between files
Security Note 🔒
Your data stays local! The comparison happens entirely in your browser. No data is sent to any server.
Example Use Cases 📝
Compare Local vs Production
# .env.local
DATABASE_URL=postgresql://localhost:5432/dev_db
API_KEY=dev_key_abc123
DEBUG=true
PORT=3000# .env.production
DATABASE_URL=postgresql://prod-server:5432/prod_db
API_KEY=prod_key_xyz789
DEBUG=false
PORT=8080
CACHE_ENABLED=trueFind Missing Environment Variables
Quickly identify which variables are missing when setting up a new environment.
Audit Configuration Changes
See exactly what changed between different versions of your configuration.
Building Standalone Executables 🔨
You can create standalone executables using pkg:
# Install dependencies
npm install
# Build executables for all platforms
npm run pkg
# Executables will be in the dist/ folder:
# - dist/env-diff-linux
# - dist/env-diff-macos
# - dist/env-diff-win.exeRunning from Source
# Clone the repository
git clone https://github.com/arancibiajav/env-diff-viewer.git
cd env-diff-viewer
# Run directly
node main.js
# Or use npm
npm startProject Structure 📁
├── main.ts # Main application server with embedded HTML/CSS/JS
├── deno.json # Deno configuration and tasks
├── package.json # npm package configuration
├── check-deno.js # Preinstall script to verify Deno installation
├── README.md # This file
└── .gitignore # Git ignore rulesContributing 🤝
Contributions are welcome! Please feel free to submit a Pull Request.
Support 💬
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check existing issues for solutions
Security 🛡️
This tool is designed with security in mind:
- ✅ All data processing happens locally
- ✅ No external API calls
- ✅ No data collection or telemetry
- ✅ No network requests except localhost
- ✅ Open source - verify the code yourself
License 📄
MIT License - see LICENSE file for details
Author ✍️
Created by [email protected]
Remember: Your secrets are valuable. Keep them local, keep them safe. 🔐
