A beautiful and intuitive desktop application built with Electron.js for managing environment variables locally. Store, edit, and organize your environment variables with a modern, user-friendly interface and full .env file support.
- β¨ Modern UI: Clean, responsive design with beautiful animations
- π Local Storage: All data stored securely in local JSON files
- π Full CRUD Operations: Create, Read, Update, and Delete environment variables
- π Search & Filter: Quickly find variables with real-time search
- π€ Import/Export: Backup and restore your environment variables in .env or JSON format
- β¨οΈ Keyboard Shortcuts: Efficient workflow with keyboard navigation
- π Cross-Platform: Works on Windows, macOS, and Linux
- π― Validation: Prevents duplicate keys and empty values
- π Copy to Clipboard: One-click copying of variable values
- π§ .env File Support: Import and export standard .env files with comments and formatting
The main interface provides a clean, organized view of all your environment variables with easy-to-use controls for managing them.
Simple form interface for adding new variables or editing existing ones with real-time validation.
Support for both .env and JSON file formats with proper parsing and formatting.
- Node.js (version 16 or higher)
- npm or yarn package manager
For Windows users, follow these additional steps:
-
Install Node.js for Windows
- Download from nodejs.org
- Choose the LTS version for better stability
- Run the installer as Administrator if you encounter permission issues
-
Install dependencies
npm install
-
Run the application
# Option 1: Using npm npm start # Option 2: Using the Windows batch file run-windows.bat
-
Building for Windows
# Build installer (.exe) npm run build:win # Build portable version npm run build:win-portable
Windows Troubleshooting:
- If you get "node is not recognized" error, restart your command prompt after installing Node.js
- If you get permission errors, run Command Prompt as Administrator
- If the app doesn't start, check Windows Defender or antivirus software isn't blocking it
- For build issues, ensure you have Visual Studio Build Tools installed
-
Clone or download the project files
# If using git git clone <repository-url> cd environment-variables-manager
-
Install dependencies
npm install
-
Run in development mode
npm start # or npm run dev
To create distributable packages for your platform:
# Build for current platform
npm run build
# Build for specific platforms
npm run build:win # Windows
npm run build:mac # macOS
npm run build:linux # Linux
# Create distribution packages
npm run distBuilt applications will be available in the dist/ directory.
-
Launch the application
- Run
npm startfor development - Or run the built executable for your platform
- Run
-
Add your first environment variable
- Enter a key (e.g.,
API_KEY) in the "Key" field - Enter the corresponding value in the "Value" field
- Click "Save Variable"
- Enter a key (e.g.,
-
Manage your variables
- Edit: Click the edit icon next to any variable to modify it
- Delete: Click the delete icon and confirm removal
- Copy: Click the copy icon to copy the value to your clipboard
- Search: Use the search box to filter variables by key or value
- Export: Click the "Export .env" button to save all variables to a .env file
- Import: Click the "Import .env" button to load variables from a .env or JSON file
- Multiple Formats: Supports both .env and JSON file formats
- Comments: .env files with comments are properly handled
- Quotes: Values with spaces or special characters are automatically quoted
- Importing will merge with existing variables (duplicates will be overwritten)
The application fully supports standard .env file format:
# Comments are supported
API_KEY=your_api_key_here
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
PORT=3000
DEBUG=true
CORS_ORIGIN=http://localhost:3000
REDIS_URL=redis://localhost:6379
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Ctrl/Cmd + N: Focus on the key input field to add a new variableEscape: Cancel current edit operation or close modal dialogsEnter: Submit the form when in input fields
- All environment variables are stored in
env.jsonin your user data directory - Windows:
%APPDATA%/electron-env-manager/env.json - macOS:
~/Library/Application Support/electron-env-manager/env.json - Linux:
~/.config/electron-env-manager/env.json
environment-variables-manager/
βββ main.js # Main Electron process
βββ renderer.js # Frontend logic and IPC communication
βββ index.html # User interface
βββ styles.css # Custom styling
βββ preload.js # IPC bridge for secure communication
βββ package.json # Dependencies and scripts
βββ sample.env # Sample .env file for testing
βββ README.md # This file
The application follows Electron's recommended architecture:
- Main Process (
main.js): Handles file operations, IPC communication, and window management - Renderer Process (
renderer.js): Manages the user interface and communicates with the main process - Preload Script (
preload.js): Secure bridge for IPC communication - IPC Communication: Secure communication between processes using Electron's IPC system
-
EnvironmentManager Class (Main Process)
- Handles file I/O operations
- Manages application lifecycle
- Provides IPC handlers for renderer communication
- Parses and formats .env files
-
EnvironmentUI Class (Renderer Process)
- Manages user interface interactions
- Handles form validation and submission
- Provides search and filtering functionality
The application includes robust .env file processing:
- Parsing: Converts .env format to key-value pairs
- Formatting: Converts key-value pairs back to .env format
- Comments: Preserves and handles comment lines
- Quotes: Automatically handles quoted values
- Validation: Ensures proper .env syntax
- Context isolation enabled for security
- Node integration disabled in renderer
- All file operations handled in the main process
- Input validation and sanitization
- Secure IPC communication through preload script
-
App won't start
- Ensure Node.js is installed (version 16+)
- Run
npm installto install dependencies - Check for error messages in the console
-
Variables not saving
- Check file permissions in the user data directory
- Ensure the application has write access
- Look for error notifications in the app
-
Import/Export not working
- Verify file format (.env or JSON) for imports
- Check file permissions for the target directory
- Ensure the file isn't corrupted
- For .env files, ensure proper KEY=value format
-
.env import issues
- Check that the .env file uses proper KEY=value format
- Ensure no extra spaces around the equals sign
- Verify that comments start with # and are on separate lines
- Run with
npm run devto open developer tools - Check the console for error messages
- Main process logs appear in the terminal
- Renderer process logs appear in the developer tools
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add comments for complex functionality
- Test on multiple platforms when possible
- Update documentation for new features
- Test .env file import/export functionality
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Electron.js
- Styled with Tailwind CSS
- Icons from Heroicons
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Search existing issues in the repository
- Create a new issue with detailed information about the problem
Happy Environment Variable Managing! π
