https://github.com/prohunter00017/envmanager
A free, open-source macOS app for managing system-wide environment variables — no Terminal required. Built with Tauri 2 + React.
https://github.com/prohunter00017/envmanager
desktop-app developer-tools environment-variables launchctl macos open-source react rust tauri
Last synced: 3 months ago
JSON representation
A free, open-source macOS app for managing system-wide environment variables — no Terminal required. Built with Tauri 2 + React.
- Host: GitHub
- URL: https://github.com/prohunter00017/envmanager
- Owner: prohunter00017
- Created: 2026-04-04T12:40:36.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-04T14:48:01.000Z (3 months ago)
- Last Synced: 2026-04-04T14:49:06.842Z (3 months ago)
- Topics: desktop-app, developer-tools, environment-variables, launchctl, macos, open-source, react, rust, tauri
- Language: TypeScript
- Homepage:
- Size: 464 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
EnvManager
A free, open-source macOS app for managing system-wide environment variables — no Terminal required.
---
## What It Does
EnvManager gives you a clean, native GUI to manage your Mac's environment variables. Add, edit, delete, search, import, and export variables — they're applied system-wide instantly and automatically restored every time you log in.
**No Terminal. No config files. No developer tools needed.**
Built with [Tauri 2](https://tauri.app/) (Rust) and React for a fast, lightweight, native experience.
## Key Features
| Feature | Details |
|---------|---------|
| Visual editor | Click-to-edit table with inline validation, keyboard navigation, and tab-to-next-field |
| Auto-save | Changes are saved and applied automatically 2 seconds after you stop editing |
| Variable categories | Organize variables into collapsible groups (General, API Keys, Paths, etc.) with per-row category selector and inline new-category creation |
| Variable interpolation | Reference other vars with `${VAR}` or `$VAR`, embed shell output with `$(command)`, escape with `$$` |
| Sensitive value masking | Keys containing SECRET, TOKEN, KEY, PASSWORD, etc. are masked by default with an eye toggle to reveal |
| Quick copy | One-click copy button on every value with checkmark feedback |
| Delete confirmation | Confirmation dialog before deleting variables — prevents accidental loss |
| File-watching agent | LaunchAgent monitors `env.json` via `WatchPaths` — changes apply instantly, not just at login |
| Config file viewer | Built-in viewer/editor for `env.json`, `~/.zshrc`, and LaunchAgent plist with syntax highlighting for managed blocks |
| Tracking variable cleanup | Stores `_ENVMANAGER_VARS` to track and unset removed variables across sessions |
| Shell profile sync | Automatically exports variables to `~/.zshrc` so they work in Terminal and CLI tools |
| System-wide application | Applies via `launchctl setenv` — works across all apps |
| Persistence | Auto-restores variables at login via LaunchAgent + Login Item |
| Search & filter | Filter variables by key, value, or category |
| Import / Export | JSON import/export for backup, sharing, or team onboarding — supports both array and legacy object formats |
| Duplicate detection | Real-time inline warnings for conflicting keys |
| Dark & Light theme | OKLCH-based dark and light themes with one-click toggle in the title bar |
| Atomic file operations | Crash-safe writes with tmp+rename pattern |
| Thread-safe backend | Mutex-protected file I/O prevents race conditions |
| Accessibility | Full keyboard navigation, focus traps, ARIA labels, screen reader support |
## Installation
### 1. Download
Go to the [Releases page](https://github.com/prohunter00017/envmanager/releases/latest) and download the `.dmg` for your Mac (Apple Silicon).
### 2. Install
1. Open the downloaded `.dmg` file
2. Drag **EnvManager** into the **Applications** folder
### 3. First Launch
Since EnvManager is distributed without an Apple Developer certificate (it's free and open source), macOS Gatekeeper will block the first launch. Use one of these methods to open it:
**Option A — Right-click to open (recommended):**
1. Open **Applications** in Finder
2. **Right-click** (or Control-click) on **EnvManager**
3. Click **Open**, then **Open** again in the confirmation dialog
**Option B — Terminal (one-time command):**
If right-click doesn't work, run this in Terminal to remove the quarantine flag:
```bash
xattr -cr /Applications/EnvManager.app
```
Then open EnvManager normally.
**Option C — System Settings:**
1. Try to open EnvManager normally (it will be blocked)
2. Go to **System Settings → Privacy & Security**
3. Scroll down and click **"Open Anyway"** next to the EnvManager message
After the first successful launch, the app opens normally every time.
### 4. Updating to a New Version
When you install a new version from a fresh DMG, macOS may ask you to re-trust the app (each build produces a new ad-hoc code signature). To avoid this:
1. Quit EnvManager if it's running
2. Open the new DMG and drag **EnvManager** to **Applications** (replace the old version)
3. Remove the quarantine flag:
```bash
xattr -cr /Applications/EnvManager.app
```
Or download and run the `install.sh` helper script included with each release.
Your environment variables and settings in `~/Library/Application Support/EnvManager/` are preserved across updates.
## How It Works
```
┌─────────────────────────────────────────────────────────┐
│ EnvManager.app (React + Tauri) │
│ │
│ ┌──────────┐ Save ┌──────────────────────────┐ │
│ │ GUI │ ─────────► │ Rust Backend │ │
│ │ Editor │ │ ┌────────────────────┐ │ │
│ └──────────┘ │ │ Validate keys │ │ │
│ │ │ Atomic JSON write │ │ │
│ │ │ launchctl setenv │ │ │
│ │ └────────────────────┘ │ │
│ └──────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
┌────────┼────────┐
▼ ▼
~/Library/ ~/Library/
Application Support/ LaunchAgents/
EnvManager/env.json com.envmanager.env.plist
(persistent store) (re-applies at login)
```
- **Storage**: Variables are persisted to `~/Library/Application Support/EnvManager/env.json` as `[{key, value, category}]` arrays
- **Auto-save**: Changes are automatically saved and applied 2 seconds after you stop editing
- **Interpolation**: Values support `${VAR}`, `$VAR` (variable references), `$(command)` (shell output), and `$$` (literal `$`)
- **Application**: Calls `launchctl setenv KEY RESOLVED_VALUE` for every variable with interpolated values
- **Shell sync**: Exports variables to `~/.zshrc` in a managed block (`# >>> EnvManager >>>` / `# <<< EnvManager <<<`) so CLI tools see them too
- **File-watching**: The LaunchAgent uses `WatchPaths` to monitor `env.json` — any change (even from a text editor) triggers re-application immediately
- **Tracking cleanup**: A `_ENVMANAGER_VARS` tracking variable remembers which variables were set, so removed variables are properly unset across sessions
- **Persistence**: A LaunchAgent is auto-installed so variables survive reboots and logouts
- **Deletion**: Removing a variable requires confirmation, then takes effect immediately
- **Note**: Already-running apps need to be restarted to pick up new variables (no reboot required)
## Caveats
- **PATH**: macOS overrides `PATH` at shell startup (via `/usr/libexec/path_helper` and shell profiles). Setting `PATH` via `launchctl setenv` will not have the expected effect in Terminal shells. Use your shell's profile (`~/.zshrc`, `~/.bashrc`) instead.
- **DYLD_\* variables**: macOS strips `DYLD_LIBRARY_PATH`, `DYLD_FRAMEWORK_PATH`, and other `DYLD_*` variables from the environment for security (System Integrity Protection). These cannot be set via `launchctl`.
- **Already-running apps**: Environment variable changes only affect apps launched *after* the change. Already-running apps must be restarted.
- **GUI vs Terminal**: Variables set via `launchctl setenv` are visible to GUI apps launched from Finder/Spotlight. Terminal apps see them too, but shell profiles may override them.
## Screenshots
## Uninstalling
1. Quit EnvManager
2. Delete `EnvManager.app` from Applications
3. Optionally remove stored data:
```bash
rm -rf ~/Library/Application\ Support/EnvManager
rm -f ~/Library/LaunchAgents/com.envmanager.env.plist
```
## Building from Source
Requires macOS with Xcode Command Line Tools, Rust, and Node.js 22+. See [CONTRIBUTING.md](CONTRIBUTING.md) for full setup instructions.
```bash
git clone https://github.com/prohunter00017/envmanager.git
cd envmanager
pnpm install
pnpm tauri dev # development with hot reload
pnpm tauri build # production .app + .dmg
```
## Tech Stack
| Layer | Technology |
|-------|-----------|
| Frontend | React 19, TypeScript, Tailwind CSS v4, Vite 7 |
| Backend | Rust, Tauri 2 |
| System integration | `launchctl`, LaunchAgent, Login Items (via AppleScript) |
| Distribution | GitHub Actions CI/CD, Apple Silicon DMG |
## Project Structure
```
envmanager/
├── src/ # React frontend
│ ├── App.tsx # Main application logic
│ ├── main.tsx # React entry point
│ ├── index.css # Tailwind CSS v4 + OKLCH theme variables
│ ├── types/ # TypeScript types
│ ├── hooks/
│ │ └── useTauri.ts # Tauri command wrappers
│ └── components/
│ ├── EnvTable.tsx # Editable variable table with masking & copy
│ ├── Toolbar.tsx # Search, category filter, Add, Save, Import/Export, Reset
│ ├── StatusBar.tsx # Data dir + LaunchAgent/Login Item/Shell status
│ ├── FileViewer.tsx # Config file viewer & editor
│ ├── InfoBanner.tsx # Info banner about launchctl
│ ├── ConfirmDialog.tsx # Reusable confirmation modal
│ └── Toast.tsx # Toast notification system
├── src-tauri/
│ ├── Cargo.toml # Rust dependencies
│ ├── tauri.conf.json # Tauri configuration
│ ├── build.rs # Tauri build script
│ ├── entitlements.plist # macOS entitlements
│ ├── capabilities/
│ │ └── default.json # Tauri permission capabilities
│ ├── icons/ # App icons (all sizes)
│ ├── dmg/ # DMG background assets
│ └── src/
│ └── main.rs # Tauri commands + business logic
├── scripts/
│ ├── generate-icon.mjs # SVG → PNG icon generation
│ ├── generate-ico-icns.mjs # ICO/ICNS generation
│ ├── generate-dmg-background.mjs # DMG background generator
│ └── install.sh # Post-install Gatekeeper helper
├── .github/
│ └── workflows/
│ └── release.yml # CI/CD: build + release on tag push
├── index.html
├── vite.config.ts
├── tsconfig.json
├── package.json
├── CHANGELOG.md
├── CONTRIBUTING.md
└── LICENSE
```
## Contributing
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## Author
**Hamza Zoubir** — [GitHub](https://github.com/prohunter00017)
## License
MIT License — see [LICENSE](LICENSE) for details.