This content originally appeared on DEV Community and was authored by Ivan Zakharchanka
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
This content originally appeared on DEV Community and was authored by Ivan Zakharchanka
Ivan Zakharchanka | Sciencx (2025-10-29T22:06:45+00:00) prmt: instant-feeling shell prompts (sub-millisecond, even over SSH). Retrieved from https://www.scien.cx/2025/10/29/prmt-instant-feeling-shell-prompts-sub-millisecond-even-over-ssh/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.
