Skip to content

Commit 63ee32d

Browse files
committed
chore: rename to envstash due to crates name conflict
1 parent 9d3f311 commit 63ee32d

13 files changed

Lines changed: 99 additions & 99 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ jobs:
3333
- name: Package
3434
run: |
3535
cd target/${{ matrix.target }}/release
36-
tar czf ../../../envmgr-${{ matrix.target }}.tar.gz envmgr
36+
tar czf ../../../envstash-${{ matrix.target }}.tar.gz envstash
3737
cd ../../..
38-
shasum -a 256 envmgr-${{ matrix.target }}.tar.gz > envmgr-${{ matrix.target }}.tar.gz.sha256
38+
shasum -a 256 envstash-${{ matrix.target }}.tar.gz > envstash-${{ matrix.target }}.tar.gz.sha256
3939
4040
- name: Upload artifacts
4141
uses: actions/upload-artifact@v4
4242
with:
43-
name: envmgr-${{ matrix.target }}
43+
name: envstash-${{ matrix.target }}
4444
path: |
45-
envmgr-${{ matrix.target }}.tar.gz
46-
envmgr-${{ matrix.target }}.tar.gz.sha256
45+
envstash-${{ matrix.target }}.tar.gz
46+
envstash-${{ matrix.target }}.tar.gz.sha256
4747
4848
deb:
4949
runs-on: ubuntu-latest
@@ -61,7 +61,7 @@ jobs:
6161
- name: Upload deb artifact
6262
uses: actions/upload-artifact@v4
6363
with:
64-
name: envmgr-deb
64+
name: envstash-deb
6565
path: target/debian/*.deb
6666

6767
rpm:
@@ -83,7 +83,7 @@ jobs:
8383
- name: Upload rpm artifact
8484
uses: actions/upload-artifact@v4
8585
with:
86-
name: envmgr-rpm
86+
name: envstash-rpm
8787
path: target/generate-rpm/*.rpm
8888

8989
release:
@@ -101,7 +101,7 @@ jobs:
101101
generate_release_notes: true
102102
draft: false
103103
files: |
104-
envmgr-*.tar.gz
105-
envmgr-*.tar.gz.sha256
104+
envstash-*.tar.gz
105+
envstash-*.tar.gz.sha256
106106
*.deb
107107
*.rpm

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "envmgr"
3-
version = "0.1.2"
2+
name = "envstash"
3+
version = "0.1.3"
44
edition = "2024"
55
authors = ["Franz Geffke <mail@gofranz.com>"]
66
description = "Manage .env files across git branches with versioning, diffing, and optional encryption"
77
license = "GPL-3.0"
8-
repository = "https://github.com/franzos/envmgr"
9-
homepage = "https://github.com/franzos/envmgr"
8+
repository = "https://github.com/franzos/envstash"
9+
homepage = "https://github.com/franzos/envstash"
1010
keywords = ["env", "dotenv", "git", "encryption", "cli"]
1111
categories = ["command-line-utilities", "development-tools"]
1212
readme = "README.md"
@@ -33,12 +33,12 @@ git2 = { version = "0.19", default-features = false, features = ["vendored-libgi
3333
maintainer = "Franz Geffke <mail@gofranz.com>"
3434
section = "utils"
3535
assets = [
36-
["target/release/envmgr", "usr/bin/", "755"],
36+
["target/release/envstash", "usr/bin/", "755"],
3737
]
3838

3939
[package.metadata.generate-rpm]
4040
assets = [
41-
{ source = "target/release/envmgr", dest = "/usr/bin/envmgr", mode = "755" },
41+
{ source = "target/release/envstash", dest = "/usr/bin/envstash", mode = "755" },
4242
]
4343

4444
[dev-dependencies]

README.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# envmgr
1+
# envstash
22

33
A 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

9999
Three 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

107107
Architecture (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

128128
Supports `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
```

src/cli/commands/exec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn run(
5151
}
5252

5353
// Never leak the store password to child processes.
54-
cmd.env_remove("ENVMGR_PASSWORD");
54+
cmd.env_remove("ENVSTASH_PASSWORD");
5555

5656
let status = cmd
5757
.status()

src/cli/commands/init.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub fn run(encrypt: &str, recipients: &[String], key_file: Option<&str>) -> Resu
8585
}
8686

8787
set_file_permissions(&path)?;
88-
println!("Initialized envmgr store at {}", dir.display());
88+
println!("Initialized envstash store at {}", dir.display());
8989
println!("Encryption: gpg (key: {})", rcpts.join(", "));
9090
return Ok(());
9191
}
@@ -98,17 +98,17 @@ pub fn run(encrypt: &str, recipients: &[String], key_file: Option<&str>) -> Resu
9898

9999
set_file_permissions(&path)?;
100100

101-
println!("Initialized envmgr store at {}", dir.display());
101+
println!("Initialized envstash store at {}", dir.display());
102102
if encrypt == "password" {
103103
println!("Encryption: password");
104104
}
105105
Ok(())
106106
}
107107

108-
/// Get password for init: check ENVMGR_PASSWORD first, then prompt
108+
/// Get password for init: check ENVSTASH_PASSWORD first, then prompt
109109
/// with confirmation.
110110
fn get_init_password() -> Result<String> {
111-
if let Ok(pw) = std::env::var("ENVMGR_PASSWORD") {
111+
if let Ok(pw) = std::env::var("ENVSTASH_PASSWORD") {
112112
if !pw.is_empty() {
113113
return Ok(pw);
114114
}

src/cli/commands/share.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ mod tests {
355355

356356
#[test]
357357
fn encrypt_export_password() {
358-
let data = b"# envmgr export\nDB_HOST=localhost\n";
358+
let data = b"# envstash export\nDB_HOST=localhost\n";
359359
let encrypted = encrypt_export(data, "password", None, Some("test-pw"), Path::new("/tmp"))
360360
.unwrap();
361361
assert!(encrypted.starts_with(b"EVPW"));
@@ -367,7 +367,7 @@ mod tests {
367367

368368
#[test]
369369
fn encrypt_export_password_no_password_errors() {
370-
// Without password and without ENVMGR_PASSWORD, this should
370+
// Without password and without ENVSTASH_PASSWORD, this should
371371
// fall through to prompt which will fail in test context.
372372
// We test by setting the env var.
373373
let data = b"test data";

0 commit comments

Comments
 (0)