Github 地址:
https://github.com/dean2021/SwitchEnvs
README 如下:
SwitchEnvs
A desktop environment variable management tool built with Wails (Go + React/TypeScript). SwitchEnvs allows you to manage, save, and switch between multiple environment variable configurations with ease.
Screenshot

Features
Tech Stack
Getting Started
Prerequisites
Installation
# Install Wails CLI if not already installed
go install github.com/wailsapp/wails/v2/cmd/wails@latest
# Clone and setup
git clone https://github.com/dean2021/SwitchEnvs.git
cd SwitchEnvs
# Install frontend dependencies
cd frontend && npm install
# Return to project root
cd ..
Development
Run the application in development mode with hot reload:
wails dev
This will start both the Go backend and the React frontend with automatic rebuilding.
Building
Build the production version:
wails build
Build for specific platforms:
# macOS ARM64
wails build -platform darwin/arm64
# Windows AMD64
wails build -platform windows/amd64
# Linux
wails build -platform linux/amd64
Usage
Creating a Scheme
[ol]
[/ol]
Switching Schemes
Exporting/Importing
File Structure
SwitchEnvs/
├── app.go # Main application logic (Go)
├── main.go # Application entry point
├── wails.json # Wails configuration
├── frontend/ # React frontend
│ ├── src/
│ │ ├── App.tsx # Main React component
│ │ ├── main.tsx # React entry point
│ │ ├── style.css # Global styles
│ │ └── types/ # TypeScript type definitions
│ ├── package.json
│ └── vite.config.ts
└── build/ # Build configurations
Data Storage
[td]Path[/td]
[td]Purpose[/td]
~/.switchenvs/schemes.json
All saved schemes in JSON format
~/.switchenvs/applied_scheme.json
Persisted applied scheme name
~/.switch_env
Shell script with export KEY="value" entries
Architecture
Backend (Go)
The Go backend handles:
Frontend (React + TypeScript)
The frontend provides:
Shell Integration
SwitchEnvs writes environment variables to ~/.switch_env and automatically adds a source command to ~/.zshrc. To use the environment variables in your terminal:
source ~/.switch_env
Or restart your terminal session.
License
MIT License

