A CLI tool to manage multiple environments in projects, written in Golang.
The main source of inspiration for this was the need to build a lightweight, self-hosted method to store and share .env files in an organized manner. There are other tools which can do this, but they are overkill and overweight for this use case.
The current version performs all actions locally on the current system, but v2 will add support to give global access.
- Create separate environments for different sets of environment variables
- Switch between environments with a simple command
- Update environments with any changes made
- Pin an environment to a project to auto pull the environment on a fresh initialization of the project
- Format
.envfiles and open them in your default editor - Export all environments created as separate files
You need to have Go 1.25.0 installed.
- Clone the repo:
git clone https://github.com/silicoflare/envy
- Install dependencies and build the binary
make
- Move the
envybinary in thedistdirectory to PATH
- Enable or disable environment variables in the current
.envfile (comment or uncomment)
- Initializes envy in your config directory
- Creates a config and a database file to store environments
- In a directory with no project, it creates a project and an environment with the
.envfile in that directory - In a directory with an existing project, it creates an environment
- An
envy.tomlfile is created
- List all the environments in the current project
- Switch to another environment in the same project
.envfile content is replaced with the new one
- Update the current environment data with new data
- Pin an environment to the
envy.tomlfile
- Fetch the pinned environment in a fresh project without a
.envfile (like installing dependencies)
- Format
.envfile in UNIX format (KEY=Value)
- Export each environment in the project as a separate
.envfile
- Open .env file in the default editor
- Delete a particular environment, or the entire project
- Cannot delete current environment