bath-0.3.3 is not a library.
bath is a terminal UI (TUI) tool for managing environment-variable profiles (e.g. PATH, compiler flags, and linker flags) backed by SQLite.
Features
- Profiles in SQLite: store multiple named profiles and switch/export them consistently
- Interactive TUI: edit variables with live preview of the resulting export output
- Export for shell eval: print
export ...statements for the selected profile - Modes: prepend/append/replace behavior per variable
Installation
Usage
- TUI mode:
-
TUI navigation (k9s-style)
-
Views: single active view with an always-visible bottom Details pane.
-
Global keys
:: command palette (jump views / run commands)/: filter current view (live while typing,Esccancels/clears)j/kor Arrow keys: move selectiong/End: jump to bottomG/Home: jump to topq: quit
-
Common
:commands:profiles:vars:parts:items:defs:preview:export:help:use <profile>:themes(list available theme presets):theme <name>(switch theme; also persists to config):new-var(create a custom env var definition):new-item(create an item):quit
-
Theming
- Config file:
~/.config/bath/config.toml(or$XDG_CONFIG_HOME/bath/config.toml) - Example:
- Config file:
[]
= "dracula"
# Optional overrides (accepts oklch(...) like DaisyUI, or #RRGGBB)
= "oklch(75% 0.18 346)"
= "#0b0f19"
- Demo
The README includes a GIF (assets/bath.gif) showing the TUI in action.
- Export a profile:
- Eval in your shell:
- Choose export mode (
prependis default):
- Export help:
Data storage
Bath stores profiles in a SQLite database at:
~/.bath.db
Development
pre-commit hooks
This repository includes a .pre-commit-config.yaml to run basic checks locally (formatting, clippy, tests).
CI
GitHub Actions runs the following on every push and pull request:
cargo fmt --checkcargo clippy -- -D warningscargo test
Releasing (crates.io)
Releases are automated with release-plz (it opens a release PR and publishes to crates.io after merge).
- Required GitHub setting: in
Settings → Actions → General, set workflow permissions to allow GitHub Actions to create and approve pull requests. See the official quickstart: https://release-plz.dev/docs/github/quickstart - Required secret:
CARGO_REGISTRY_TOKEN(crates.io token with scopespublish-newandpublish-update), used by.github/workflows/release-plz.yml.
License
GPL-3.0. See LICENSE.