7 unstable releases (3 breaking)
Uses new Rust 2024
| new 0.4.1 | May 11, 2026 |
|---|---|
| 0.4.0 | May 11, 2026 |
| 0.3.0 | May 11, 2026 |
| 0.2.0 | May 11, 2026 |
| 0.1.2 | May 11, 2026 |
#182 in Development tools
125KB
3.5K
SLoC
Fast Git context for Bash and Zsh. Branch, status, and counts right in the prompt.
Docs · Changelog · Contributing
curl -fsSL https://raw.githubusercontent.com/shravanngoswamii/gitflect/main/install.sh | sh
The install script detects your shell, places the binary on PATH, and wires up the prompt hook. Open a new terminal and you're done.
Via Cargo
cargo install gitflect
Then add the init line to your shell profile and reload:
# Bash — add to ~/.bashrc
echo 'eval "$(gitflect init bash)"' >> ~/.bashrc && exec $SHELL
# Zsh — add to ~/.zshrc
echo 'eval "$(gitflect init zsh)"' >> ~/.zshrc && exec $SHELL
To update:
cargo install gitflect
To remove:
cargo uninstall gitflect
# then remove the eval line from ~/.bashrc or ~/.zshrc
Update
Rerun the install script to update to the latest release:
curl -fsSL https://raw.githubusercontent.com/shravanngoswamii/gitflect/main/install.sh | sh
Usage
gitflect status # print current Git segment
gitflect theme list # list themes, active one marked with *
gitflect theme set minimal # switch theme
gitflect settings # browse and edit all settings interactively
gitflect --version
Prompt segment example:
user@host ~/project (main ≡ +1 ~0 -0 | !2 ~1 -0 ?)
See the docs for themes and settings.
Development
git config core.hooksPath .githooks # enable pre-commit fmt check (once per clone)
cargo test
cargo clippy --all-targets -- -D warnings
cargo build --release
Issues at github.com/shravanngoswamii/gitflect/issues.