Envoke is a simple, extremely light command-line interface (CLI) tool written in Rust for managing multiple environment profiles. It allows users to initialize a directory, create, switch, list, and remove profiles, and check the currently active profile. Envoke is designed to be simple, fast, and reliable for developers who need to manage environment configurations efficiently.
- Initialize a Directory: Set up a directory for managing profiles with the
initcommand. - Create Profiles: Create new environment profiles using the
createcommand. - Switch Profiles: Seamlessly switch between profiles with the
switchcommand. - List Profiles: View all available profiles with the
listcommand. - Remove Profiles: Delete profiles permanently using the
removecommand. - Check Current Profile: Display the currently active profile with the
currentcommand.
Envoke follows a convention over configuration approach. When you run the
init command, a .envoke directory is created in the current working directory.
A profile is simply any <profile>.env file located in the .envoke directory.
- Profile Creation: When you create a profile with
envoke create <PROFILE>, Envoke stores the<profile>.envfile within the.envokedirectory. - Symlinking: When you switch to a profile using
envoke switch <PROFILE>, Envoke creates a symbolic link (symlink) to the corresponding.envfile for that profile. - Profile Deletion: When you remove a profile with
envoke remove <PROFILE>, the corresponding<profile>.envfile is permanently deleted. If that profile was the currently active profile, the symlink will also be removed.
This approach ensures that environment configurations are cleanly managed within
the .envoke directory, with the active .env file always reflecting the current profile.
Envoke is designed to work on Unix-like systems (e.g., Linux, macOS). It will not function on non-Unix-like systems.
To install Envoke, you need to have Rust installed: https://www.rust-lang.org/
Then, clone this repository and build the project:
git clone https://github.com/TSxo/envoke.git
cd envoke
cargo build --releaseThe compiled binary will be available in the target/release directory. You can move it to a
directory in your $PATH for global access:
sudo mv target/release/envoke /usr/local/bin/Usage: envoke <COMMAND>
Commands:
init Initializes the directory
create Creates a new profile
switch Switch to a specified profile
remove Deletes a profile - cannot be undone
list Lists available profiles
current Display the current active profile
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-
Initialize a directory:
envoke init
-
Create a development profile:
envoke create dev
-
Switch to the
devprofile:envoke switch dev
-
Check the current profile:
envoke current # Output: dev -
Create and switch to a production profile:
envoke create prod envoke switch prod
-
List all profiles:
envoke list # Output: dev, prod -
Remove the
prodprofile:envoke remove prod
This project is licensed under the MIT License. See the LICENSE file for details.
Built with Rust and the clap crate for CLI parsing.