A blazingly fast shell prompt written in Zig. Drop-in Starship replacement.
~/projects/my-app on main [!?] is 📦 v1.0.0 via v20.11.0
→
| Metric | zprompt | Starship | Improvement |
|---|---|---|---|
| Speed (cached) | 2ms | 30ms | 14x faster |
| Speed (cold) | 20ms | 30ms | 1.5x faster |
| Memory | 4.8 MB | 30 MB | 6x smaller |
| Binary | 306 KB | 4.6 MB | 15x smaller |
curl -fsSL https://raw.githubusercontent.com/darwin808/zprompt/main/install.sh | bashAdd to your shell config:
# ~/.zshrc
eval "$(zprompt init zsh)"
# ~/.bashrc
eval "$(zprompt init bash)"
# ~/.config/fish/config.fish
zprompt init fish | source
# PowerShell
Invoke-Expression (&zprompt init powershell)- Multi-shell: zsh, bash, fish, powershell
- Parallel detection: All modules run concurrently
- Smart caching: Version detection cached for 1 hour
- Native git: Parses
.git/indexdirectly (no subprocess) - Starship config: Uses your existing
~/.config/starship.toml
| Module | Detection | Version Source |
|---|---|---|
| Git | .git/ |
Native index parsing |
| Node.js | package.json |
.nvmrc, .node-version, cache |
| Rust | Cargo.toml |
rust-toolchain.toml, cache |
| Python | requirements.txt, pyproject.toml |
.python-version, cache |
| Ruby | Gemfile |
.ruby-version, cache |
| Go | go.mod |
.go-version, go.mod |
| Java | pom.xml, build.gradle |
.java-version, cache |
| Docker | Dockerfile, docker-compose.yml |
Docker context |
- Directory — current path (truncated in git repos)
- Git — branch + status (
!modified,?untracked,+staged) - Package — version from package.json/Cargo.toml (📦 v1.0.0)
- Language — runtime version with Nerd Font icons
- Duration — for slow commands (>2s)
- Status — green/red arrow based on exit code
Uses ~/.config/starship.toml:
[git_status]
disabled = false
[nodejs]
disabled = false
[rust]
disabled = false
[python]
disabled = false
[cmd_duration]
min_time = 2000 # Show duration for commands >2sRequires Zig 0.14+
git clone https://github.com/darwin808/zprompt
cd zprompt
zig build -Doptimize=ReleaseFast
cp zig-out/bin/zprompt ~/.local/bin/- No runtime — Zig compiles to native code with no GC
- Parallel execution — All module detection runs in threads
- Smart caching — Version lookups cached in
~/.cache/zprompt/ - Native git — Reads
.git/indexdirectly instead ofgit status - Lazy loading — Only spawns threads for detected project types
curl -fsSL https://raw.githubusercontent.com/darwin808/zprompt/main/uninstall.sh | bashMIT License