Skip to content

peervw/envmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnvManager

A beautiful, native macOS app for managing environment variables and PATH entries

Version Platform Swift License

Built with SwiftUI • Native macOS Design • Open Source


✨ Features

  • 🎯 Visual Environment Manager - View, add, edit, delete environment variables
  • 🗂️ PATH Management - Drag & drop to reorder PATH entries
  • Undo/Redo - Full history with ⌘Z/⌘⇧Z (50 actions)
  • 🛡️ Auto-Backup - Automatic backups before every change
  • 📋 30+ Templates - Pre-built for AWS, Docker, Node.js, databases
  • 📁 .env Support - Import/export .env, Docker Compose, Kubernetes
  • 🖱️ Inline Editing - Double-click any value to edit
  • ⌨️ Keyboard Shortcuts - ⌘N, ⌘Z, ⌘R, Delete key
  • 📋 Quick Copy - Copy buttons & context menus
  • 🔍 Search & Filter - Real-time search across all variables
  • 🐚 Multi-Shell - Supports .zshrc, .bashrc, .profile, fish

🚀 Installation

Requirements

  • macOS 13.0 (Ventura) or later
  • ~5 MB disk space

Build from Source

# Clone repository
git clone https://github.com/yourusername/envmanager.git
cd envmanager

# Build and install
./create-icon.sh  # Generate app icon
./create-app.sh   # Build app bundle
cp -r EnvManager.app /Applications/

First Launch

macOS may show a security warning on first launch:

# Remove quarantine attribute
xattr -cr /Applications/EnvManager.app

# Launch
open /Applications/EnvManager.app

Or: Right-click app → Open → Click "Open"


💡 Usage

Quick Start

  1. Launch - ⌘+Space → "EnvManager"
  2. Add Variable - Click + or press ⌘N
  3. Edit Value - Double-click any value
  4. Use Templates - Click "From Template"
  5. Undo - Press ⌘Z to undo changes

Managing Variables

Add New:

  • Click "+" button or press ⌘N
  • Or use "From Template" for common variables

Edit:

  • Double-click value for inline editing
  • Or hover and click pencil icon

Copy:

  • Hover over variable → click copy icon
  • Or right-click for more options:
    • Copy key
    • Copy value
    • Copy as export KEY="value"

Delete:

  • Hover → click trash icon
  • Confirm deletion (can undo with ⌘Z)

Managing PATH

  1. Go to PATH Entries tab
  2. Add - Click "+" and browse for directory
  3. Reorder - Drag entries up/down (order matters!)
  4. Validate - Green ✓ = exists, Red ✗ = missing

Using Templates

30+ pre-built templates organized by category:

  • Cloud & APIs - AWS, Google Cloud, Azure, OpenAI
  • Development - Node.js, Python, Debug settings
  • Databases - PostgreSQL, MongoDB, Redis, MySQL
  • System Paths - Java, Android SDK, Go, Cargo
  • General - Editor, timezone, SSH keys

Click "From Template" → Browse or search → Click to add

Import/Export

Import .env file:

  1. Click Import/Export menu
  2. Select "Import from .env"
  3. Choose your .env file

Export formats:

  • .env - Standard format
  • Docker Compose - For docker-compose.yml
  • Kubernetes - ConfigMap YAML
  • JSON - Full backup

Keyboard Shortcuts

  • ⌘N - Add new variable
  • ⌘Z - Undo
  • ⌘⇧Z - Redo
  • ⌘R - Refresh from config files
  • Delete - Delete selected variable
  • ⌘, - Preferences

🛠️ Technical Details

Architecture

Pattern: MVVM (Model-View-ViewModel) Framework: SwiftUI Build System: Swift Package Manager

Sources/
├── Models/              # Data structures
│   ├── EnvironmentVariable.swift
│   └── PathEntry.swift
├── Services/            # Business logic
│   ├── ShellConfigService.swift   # Shell config I/O
│   ├── BackupService.swift        # Auto-backups
│   ├── TemplateService.swift      # Variable templates
│   ├── EnvFileService.swift       # .env operations
│   └── UndoManager.swift          # Undo/redo
├── ViewModels/          # State management
│   └── EnvManagerViewModel.swift
└── Views/               # UI components
    ├── ContentView.swift
    ├── EnvironmentVariablesView.swift
    ├── PathEntriesView.swift
    ├── SystemEnvironmentView.swift
    └── EmptyStateView.swift

Supported Shell Configs

  • ~/.zshrc (default on modern macOS)
  • ~/.bashrc
  • ~/.bash_profile
  • ~/.profile
  • ~/.config/fish/config.fish

Backups

  • Created automatically before every modification
  • Location: ~/Library/Application Support/EnvManager/Backups
  • Keeps 10 most recent backups per file
  • Timestamped for easy identification

🔧 Development

Building

# Debug build
swift build

# Release build
swift build -c release

# Run directly
swift run

# Create .app bundle
./create-app.sh

Requirements

  • Xcode 15.0+
  • Swift 5.9+
  • macOS 13.0+ SDK

Project Structure

  • 14 Swift files (~3,000 lines)
  • 5 Services for business logic
  • 5 Views for UI
  • 2 Models for data
  • 30+ Templates included

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors