A powerline-style bash prompt in pure bash — one script, no dependencies, no patched fonts.
napalm powerbash » updates + $
Segments, in display order: virtual environment, username, hostname, path, git
branch and state, background job count, $/# symbol, and the return code of
the last command. Everything is toggled at runtime with the powerbash command
and persisted to a small config file.
Full documentation: powerbash.org/docs
powerbash installs into your own account. It does not need root, and a per-user install is the recommended way to run it.
brew install powerbash/powerbash/powerbashThen add the line the caveats print to ~/.bashrc (Linux) or ~/.bash_profile
(macOS). Upgrades come along with the rest of your brew upgrade, which is
why this is the path to prefer where you have it.
For machines without Homebrew.
curl -s https://get.powerbash.org | bashDownloads the script to ~/.local/share/powerbash/ and wires it into your
shell startup file. Re-run it any time to upgrade. To remove it:
curl -s https://get.powerbash.org | bash -s -- uninstallmkdir -p ~/.local/share/powerbash
curl -Ls https://download.powerbash.org/powerbash.sh -o ~/.local/share/powerbash/powerbash.sh
echo 'source ~/.local/share/powerbash/powerbash.sh' >> ~/.bashrcOn macOS use ~/.bash_profile — Terminal.app and iTerm2 start login shells.
A multi-user install into /etc/profile.d/ is still possible but discouraged;
see the docs for why and how.
powerbash help # every subcommand, also available via [tab]
powerbash path parted # /full/.../no/where
powerbash git timeout 1 # give up on slow git repos after a second
powerbash config save # persist the current settings- bash 3.2 or newer — including the
/bin/bashthat ships with macOS. - A UTF-8 locale, for the
»,⇡,⇣, and▶glyphs. tputfor colors andgitfor the git segment. Both optional: powerbash degrades to a plain prompt without them.
Runs on Linux, macOS, and WSL.
make # list every target
make check # lint, the suite, and the suite under bash 3.2
make toolbox # build the dev container (one time)
make shell # a shell in it, running the working copy of the prompttests/smoke.sh also runs on its own — it has to, since it runs inside a
bash 3.2 container with no make in it. CI calls the same targets.
See AGENTS.md for the architecture and the constraints that shape the script.
MIT — see LICENSE.