| Crates.io | bath |
| lib.rs | bath |
| version | 0.3.0 |
| created_at | 2025-02-03 22:08:08.437544+00 |
| updated_at | 2025-02-03 23:19:31.342868+00 |
| description | A TUI tool to manage and export environment variable profiles |
| homepage | https://github.com/4thel00z/bath |
| repository | https://github.com/4thel00z/bath |
| max_upload_size | |
| id | 1541137 |
| size | 77,682 |
$PATH is outdated.
So are a lot of other environment variables and mechanisms that rely on juggling : characters to establish implicit
lookup precedence. It's 2025—why are we still managing our toolchains like it's the 90s?
Imagine a world where you can manage different versions of your applications, compiler flags, and linker options *
properly*—all stored neatly in an SQLite database. No more weird shell scripts, no more lost configurations, and
no more wondering why gcc just picked up the wrong library version again.
Bath is a TUI-based CLI tool that helps you manage, edit, preview, and export your environment variable
profiles. It brings order to your $PATH, compiler flags, and other C/C++-related variables without making you do
mental gymnastics.
✅ Manage $PATH like a sane person
✅ Store multiple environment profiles in SQLite
✅ Interactive TUI with fuzzy search & live previews
✅ Export configurations in a format you can eval
✅ Prepend, Append, or Replace mode for any env var
✅ No weird shell scripts, just pure config bliss
cargo install bath
Inside bath, you get:
a → Edit/add a variable (with a fuzzy search for types and live export preview).e → Modify an existing variable.d → Delete a variable.eval'd in your shell).Bath doesn't generate weird scripts with shebangs. It just prints what you need to eval, like this:
➜ bath export my_profile
export PATH="/opt/coolstuff/bin:$PATH"
export CFLAGS="-O2 -Wall"
export LDFLAGS="-L/opt/coolstuff/lib"
Or, if you don't specify a profile, you'll get a TUI where you can select one interactively.
The recommended way to use bath export is by eval-ing it's output!
eval $(bath export my_profile)
This project is licensed under the GPL-3 license.