1- # envmgr
1+ # envstash
22
33A CLI tool for managing ` .env ` files across git branches. Save, version, diff, restore, and share environment variables with optional encryption.
44
@@ -7,63 +7,63 @@ A CLI tool for managing `.env` files across git branches. Save, version, diff, r
77** From crates.io:**
88
99``` bash
10- cargo install envmgr
10+ cargo install envstash
1111```
1212
1313** Pre-built binaries:**
1414
15- Download the latest release from [ GitHub Releases] ( https://github.com/franzos/envmgr /releases ) and extract the binary to a directory in your ` PATH ` :
15+ Download the latest release from [ GitHub Releases] ( https://github.com/franzos/envstash /releases ) and extract the binary to a directory in your ` PATH ` :
1616
1717``` bash
1818# macOS (Apple Silicon)
19- curl -sL https://github.com/franzos/envmgr /releases/latest/download/envmgr -aarch64-apple-darwin.tar.gz | tar xz
20- sudo mv envmgr /usr/local/bin/
19+ curl -sL https://github.com/franzos/envstash /releases/latest/download/envstash -aarch64-apple-darwin.tar.gz | tar xz
20+ sudo mv envstash /usr/local/bin/
2121
2222# macOS (Intel)
23- curl -sL https://github.com/franzos/envmgr /releases/latest/download/envmgr -x86_64-apple-darwin.tar.gz | tar xz
24- sudo mv envmgr /usr/local/bin/
23+ curl -sL https://github.com/franzos/envstash /releases/latest/download/envstash -x86_64-apple-darwin.tar.gz | tar xz
24+ sudo mv envstash /usr/local/bin/
2525
2626# Linux (x86_64)
27- curl -sL https://github.com/franzos/envmgr /releases/latest/download/envmgr -x86_64-unknown-linux-gnu.tar.gz | tar xz
28- sudo mv envmgr /usr/local/bin/
27+ curl -sL https://github.com/franzos/envstash /releases/latest/download/envstash -x86_64-unknown-linux-gnu.tar.gz | tar xz
28+ sudo mv envstash /usr/local/bin/
2929```
3030
3131** Debian/Ubuntu:**
3232
33- Download the ` .deb ` from [ GitHub Releases] ( https://github.com/franzos/envmgr /releases ) and install:
33+ Download the ` .deb ` from [ GitHub Releases] ( https://github.com/franzos/envstash /releases ) and install:
3434
3535``` bash
36- sudo dpkg -i envmgr_ * _amd64.deb
36+ sudo dpkg -i envstash_ * _amd64.deb
3737```
3838
3939** Fedora/RHEL:**
4040
41- Download the ` .rpm ` from [ GitHub Releases] ( https://github.com/franzos/envmgr /releases ) and install:
41+ Download the ` .rpm ` from [ GitHub Releases] ( https://github.com/franzos/envstash /releases ) and install:
4242
4343``` bash
44- sudo rpm -i envmgr -* .x86_64.rpm
44+ sudo rpm -i envstash -* .x86_64.rpm
4545```
4646
4747## Quick start
4848
4949``` bash
5050# Initialize the store
51- envmgr init
51+ envstash init
5252
5353# Save the current .env file
54- envmgr save
54+ envstash save
5555
5656# Save with a note
57- envmgr save -m " trying new DB config"
57+ envstash save -m " trying new DB config"
5858
5959# List saved versions
60- envmgr list
60+ envstash list
6161
6262# Restore a saved version
63- envmgr apply 1
63+ envstash apply 1
6464
6565# See what changed between versions
66- envmgr diff 1 2
66+ envstash diff 1 2
6767```
6868
6969## Features
@@ -79,29 +79,29 @@ envmgr diff 1 2
7979
8080| Command | Description |
8181| ---------| -------------|
82- | ` envmgr init` | Initialize the store (choose encryption mode) |
83- | ` envmgr save [file] [-m msg]` | Save a ` .env ` file with optional message |
84- | ` envmgr list` | List saved versions on the current branch |
85- | ` envmgr diff <a> <b>` | Diff two versions (by number or hash) |
86- | ` envmgr apply <version>` | Restore a version to disk |
87- | ` envmgr env [version]` | Print ` export ` statements for shell eval |
88- | ` envmgr exec [version] -- <cmd>` | Run a command with saved env vars |
89- | ` envmgr history` | Show what changed between consecutive versions |
90- | ` envmgr delete <version>` | Remove saved versions |
91- | ` envmgr global` | List all projects with saved .env files |
92- | ` envmgr share` | Export a version for sharing |
93- | ` envmgr import <file>` | Import a shared export |
94- | ` envmgr dump <path>` | Export the entire store |
95- | ` envmgr load <path>` | Import a full dump |
82+ | ` envstash init` | Initialize the store (choose encryption mode) |
83+ | ` envstash save [file] [-m msg]` | Save a ` .env ` file with optional message |
84+ | ` envstash list` | List saved versions on the current branch |
85+ | ` envstash diff <a> <b>` | Diff two versions (by number or hash) |
86+ | ` envstash apply <version>` | Restore a version to disk |
87+ | ` envstash env [version]` | Print ` export ` statements for shell eval |
88+ | ` envstash exec [version] -- <cmd>` | Run a command with saved env vars |
89+ | ` envstash history` | Show what changed between consecutive versions |
90+ | ` envstash delete <version>` | Remove saved versions |
91+ | ` envstash global` | List all projects with saved .env files |
92+ | ` envstash share` | Export a version for sharing |
93+ | ` envstash import <file>` | Import a shared export |
94+ | ` envstash dump <path>` | Export the entire store |
95+ | ` envstash load <path>` | Import a full dump |
9696
9797## Encryption
9898
9999Three modes, chosen at init time:
100100
101101``` bash
102- envmgr init # no encryption
103- envmgr init --encrypt gpg # GPG (supports Yubikey)
104- envmgr init --encrypt password # password-based (argon2id)
102+ envstash init # no encryption
103+ envstash init --encrypt gpg # GPG (supports Yubikey)
104+ envstash init --encrypt password # password-based (argon2id)
105105```
106106
107107Architecture (inspired by [ Tomb] ( https://github.com/dyne/Tomb ) ):
@@ -110,19 +110,19 @@ Architecture (inspired by [Tomb](https://github.com/dyne/Tomb)):
110110- Metadata (branches, timestamps, file paths) stays plaintext for fast queries
111111- GPG mode: one Yubikey touch per gpg-agent cache window, not per operation
112112
113- The key file location can be overridden with ` --key-file ` or ` ENVMGR_KEY_FILE ` .
113+ The key file location can be overridden with ` --key-file ` or ` ENVSTASH_KEY_FILE ` .
114114
115115## Shell integration
116116
117117``` bash
118118# Load variables into current shell
119- eval $( envmgr env)
119+ eval $( envstash env)
120120
121121# Run a one-off command with saved variables
122- envmgr exec -- npm start
122+ envstash exec -- npm start
123123
124124# Isolated mode (only saved variables, no inherited env)
125- envmgr exec --isolated -- npm test
125+ envstash exec --isolated -- npm test
126126```
127127
128128Supports ` bash ` , ` fish ` , and ` json ` output via ` --shell ` .
@@ -131,26 +131,26 @@ Supports `bash`, `fish`, and `json` output via `--shell`.
131131
132132``` bash
133133# Export latest version to stdout
134- envmgr share > export.env
134+ envstash share > export.env
135135
136136# Encrypted export
137- envmgr share --encrypt --encryption-method password > export.enc
137+ envstash share --encrypt --encryption-method password > export.enc
138138
139139# Import
140- envmgr import export.env
141- cat export.enc | envmgr import --password secret
140+ envstash import export.env
141+ cat export.enc | envstash import --password secret
142142
143143# Full store backup
144- envmgr dump backup.json
145- envmgr load backup.json
144+ envstash dump backup.json
145+ envstash load backup.json
146146```
147147
148148## Storage
149149
150- Data lives in ` ~/.local/share/envmgr / ` :
150+ Data lives in ` ~/.local/share/envstash / ` :
151151
152152```
153- ~/.local/share/envmgr /
153+ ~/.local/share/envstash /
154154├── store.db # SQLite (mode 0600)
155155└── key.gpg # AES key wrapped in GPG/password (mode 0600)
156156```
0 commit comments