Skip to content

objz/envm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envm

License: GPL v3 AUR Rust Shells


A minimal, portable environment variable manager. No systemd. No daemons.

  • Stores vars in ~/.config/envm/env
  • Works in any POSIX shell (bash, zsh, dash) + fish
  • Subcommands: add, edit, remove, list, export, completions

Install

On Arch Linux, envm is available on the AUR:

paru -S envm
# or
yay -S envm

Build

git clone https://github.com/objz/envm.git
cd envm
cargo build --release

The binary is at target/release/envm.


Usage

Add a variable

envm add TEST 123

Edit a variable

envm edit TEST 456

Remove a variable

envm remove TEST

List variables

envm list
TEST = 456

Export for your shell

bash/zsh:

eval "$(envm export)"

fish:

envm export | source

Put the appropriate line in your shell's init file (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish) to load all vars automatically in every new session.

Shell completions

# bash - add to ~/.bashrc
eval "$(envm completions bash)"

# zsh - add to ~/.zshrc
eval "$(envm completions zsh)"

# fish
envm completions fish > ~/.config/fish/completions/envm.fish

Tab-completing envm edit or envm remove will suggest your existing variable names.


Licensed under GPLv3. Don't strip the license, thanks.

About

Portable environment variable manager for Bash, Zsh, and Fish.

Topics

Resources

License

Stars

Watchers

Forks

Contributors