mirror of
https://github.com/silicoflare/envy.git
synced 2026-05-26 11:49:52 +05:30
8822a0a8da61a1b44c96a01af30b99160be73b56
envy
A CLI tool to manage multiple environments in projects, written in Golang.
Inspiration
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.
Features
- 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
Installation
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
Commands
envy
- Enable or disable environment variables in the current
.envfile (comment or uncomment)
envy init
- Initializes envy in your config directory
- Creates a config and a database file to store environments
envy create
- 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
envy list
- List all the environments in the current project
envy switch
- Switch to another environment in the same project
.envfile content is replaced with the new one
envy update
- Update the current environment data with new data
envy pin
- Pin an environment to the
envy.tomlfile
envy fetch
- Fetch the pinned environment in a fresh project without a
.envfile (like installing dependencies)
envy pretty
- Format
.envfile in UNIX format (KEY=Value)
envy export
- Export each environment in the project as a separate
.envfile
envy edit
- Open .env file in the default editor
Languages
Go
97.3%
Makefile
2.7%