TL;DR: Rust-powered shell prompt with sub-millisecond rendering that stays fast over SSH.
3axap4eHko
/
prmt
Ultra-fast, customizable shell prompt generator
prmt π
Ultra-fast, customizable shell prompt that won't slow you down
Rendered with
"{path:#89dceb}{rust:#f38ba8:f: π¦}{git:#f9e2af:f: }\n{ok:#a6e3a1}{fail:#f38ba8} "
Features
- β‘ Blazing Fast: Sub-millisecond rendering for typical prompts (~2ms end-to-end)
- π¨ Highly Customizable: Full control over colors, formats, and what information to show
- π Context Aware: Automatically detects git repos, project files, shows only what's relevant
- π¦ Zero Dependencies: Single binary, no runtime dependencies required
- π¦ Memory Efficient: Zero-copy parsing with SIMD optimizations
- β¨ Smart Rendering: Only shows information when relevant to your current directory
Why prmt?
Faster than alternatives β Typical prompts render in ~2ms. Starship averages 10-50ms, oh-my-posh 20-100ms.
Zero configuration needed β Works out of the box with sensible defaults. Customize only what you want.
Predictable performance β No async operations, no network calls, no surprises. Your prompt is always instant.
Single binary β Just install and go. No configuration files required unlessβ¦
The problem
Starship: Beautiful but slow (~10-50ms renders). Async I/O adds unpredictable latency over SSH.
oh-my-posh: Feature-rich but heavy. 20MB binary, 20-100ms renders.
Pure Bash/Zsh: Fast but unmaintainable config spaghetti.
Why prmt?
- Sub-millisecond renders β ~10-50 Β΅s for path + git
- Predictable β no async I/O, no surprises over SSH
- Zero config β works out of the box
- Drop-in replacement β migrate from Starship in 5 minutes
Setup
cargo install prmt
Bash / Zsh
# Bash: ~/.bashrc
PS1='$(prmt --code $? "{path:cyan:s} {git:purple:s:on :} {ok:green}{fail:red} ")'
# Zsh: ~/.zshrc (add this line first)
setopt PROMPT_SUBST
PROMPT='$(prmt --code $? "{path:cyan:s} {git:purple:s:on :} {ok:green}{fail:red} ")'
Fish
# ~/.config/fish/config.fish
function fish_prompt
prmt --code $status '{path:cyan:s} {git:purple:s:on :} {ok:green}{fail:red} '
end
PowerShell is also supported β see the README.
Performance breakdown
| Prompt | Modules | Time | What's slow? |
|---|---|---|---|
| Minimal | {path} |
~10 Β΅s | Nothing |
| Typical | {path} {git} {ok}{fail} |
~1-2 ms | Git status check |
| Full | {path} {git} {rust} {node} |
~25-30 ms | Running rustc --version etc |
| Fast mode | --no-version |
< 5 ms | Skips all version calls |
Key insight: The renderer is microseconds. Version detection (running rustc --version, node --version) dominates total time. Use --no-version if you don't need versions.
Reproduce locally
# Internal benchmark
prmt --bench '{path} {git} {ok}{fail}'
# End-to-end with hyperfine
hyperfine --warmup 5 'prmt --no-version "{path} {git} {ok}{fail}"'
Migrating from Starship
| Starship | prmt |
|---|---|
directory |
{path:r} (relative) or {path:s} (short) |
git_branch |
{git:s} (branch only) |
git_status |
{git} (branch + status) |
character |
{ok}{fail} with --code $?
|
nodejs |
{node:s} (short version) |
rust |
{rust:s} (short version) |
Plain prompt (path + git + indicator):
prmt --code $? "{path:cyan:s} {git:purple:s:on :} {ok:green}{fail:red} "
With versions (add Node/Rust):
prmt --code $? "{path:cyan:s} {node:green:s: β¬’}{rust:red:s: π¦}{git:purple} {ok}{fail} "
Output: projects β¬’20.5 π¦1.90 main β―
Why it's fast
- Zero-copy parsing β minimal allocations
- Cached module detection β only checks relevant directories
- No async runtime β no Tokio overhead, predictable latency
See the README for benchmarks and implementation details.
Format cheatsheet
Syntax: {module:style:type:prefix:postfix}
Modules: path, git, rust, node, python, go, time, ok, fail
Styles: red, cyan, #89dceb (hex), bold, dim, italic
Path types: r (relative), a (absolute), s (short β last dir only)
Git types: f (branch+status), s (branch only)
Version types: m (major), s (short), f (full)
Examples:
{path:cyan:s} # Short path in cyan
{git:purple::on :} # "on main" in purple
{rust:red:s: π¦} # "π¦1.90" in red
{ok:green:β}{fail:red:β} # Custom success/fail symbols
Full reference in the README.
Try it
cargo install prmt
Like it? β the repo and share your config!
Ivan Zakharchanka Β· GitHub @3axap4eHko

Top comments (0)