Starship: The minimal, fast, and customizable prompt for any shell
160 comments
·June 24, 2025hiAndrewQuinn
MyOutfitIsVague
nushell does that out of the box:
> history | get 82076
╭─────────────────┬──────────────────╮
│ start_timestamp │ 2025-06-24 16:46 │
│ command │ mpc play │
│ cwd │ /home/work │
│ duration │ 1ms │
│ exit_status │ 0 │
╰─────────────────┴──────────────────╯
It's really nice, because it doesn't just tell you time between command executions (or rather time between commands finishing), but the actual runtime duration of the command.ljm
I never bothered configuring my prompt at all because, inside emacs, I could already see most of what I needed in the editor itself.
In fact, I only set up Starship when I started to do more pairing. It wasn’t for my benefit as much as it was for those watching my screen and checking the work, especially when operating on prod and confirming what we wanted to run. I just load up a separate terminal app for that so I don’t have to walk people through my setup.
nine_k
Current time in a more human-readable format is very helpful sometimes. Also, the exit status of the previous command, if nonzero, is also very helpful when anything fails.
andrewflnr
The exit code of the last command is useful for similar reasons.
layer8
You could probably (I haven’t tested it) append the run time as a comment to the history using something like PROMPT_COMMAND and `history -r <(…)`, instead of cluttering the prompt with it. And the start time is already in the history, using HISTTIMEFORMAT.
hiAndrewQuinn
Per the Bash `history` manpage:
int history_write_timestamps
If non-zero, timestamps are written to the history file, so they can be preserved between sessions. The default value is 0, [...]
So this isn't true by default on many machines unless it is explicitly turned on. Once you do have it on, of course, then I agree.layer8
That’s why I wrote “using HISTTIMEFORMAT”, which turns it on. It’s reasonably common to do that.
skydhash
For personal workstation, the current directory is enough. Maybe I change the color based the status of the last command. That’s pretty much the only information I need before entering any command. Everything else can be accessed when I really need it.
acedTrex
You don't need to know what branch you're on before running commands? I cant tell you the number of times ive been on the wrong branch executing stuff.
kccqzy
I'm highly aware of which branch I'm on. Because it's because I don't use any scripts or automation that switches branches; I only ever switch branches manually so I have that awareness.
msgodel
I just run git status manually, I always explicitly specify the branch when I do anything that touches a remote, everything else you can undo if you have to.
zikduruqe
For me the AWS integration is nice. That way I know what account I'm on, and what region among my dozens of windows.
For example:
…/.config master on AWS_Prod (use2)
starship.toml: [aws]
format = 'on [($profile )(\($region\) )]($style)'
style = 'bold #B23D2F'
symbol = " " <- cloud symbol
[aws.region_aliases]
us-east-1 = 'use1'
us-east-2 = 'use2'
skydhash
Manual git status is enough for me.
freeopinion
As a complete aside, and not to argue with you at all: I think it might change your life to take a good look at jj. I just mention this to try to be helpful to you.
jt_b
oh-my-zsh default prompt mode for git branches is for me! super clean. need to familiarize myself with some more of their shorthand commands.
alganet
I literally use just PS1='$ '.
`git status` to know git stuff. `pwd` for the current working directory, etc
I also don't use aliases like `gs` or `..`
One good thing about having a very minimal setup is that you feel at home anywhere.
It wasn't always like this. I used many, many prompts and shell tools over the decades. The only tool that stood the test of time is tmux.
hiAndrewQuinn
I like stuffing everything which might be important to the context window in there, personally. Saving 50ms on the prompt load sure beats a false negative when something goes wrong because I don't even think to ask whether I have the wrong Node version installed or something.
bayindirh
When starting to work on something, I generally do a sanity check to see that the fundamentals are there and correct versions, then throw that part of the context out of mind, knowing that I stand on firm ground.
I found out that with this verify-and-forget step, I work much more efficiently.
As a result, my workflow becomes independent of the machine I work on, because I become the tool, not my setup. After that point, only having a "$" at the beginning of the line is enough.
Of course everyone have their own choices, and YMMV.
bredren
Yes. I show the python or node version of currently active venv and venv name.
Also, I somehow worked in special characters for Python and other things that get screwed up if I don’t have the right nerd font installed on the system.
meesles
Problem is you can't get timestamps and run times of your commands 'when you really need it', unlike almost everything else
mechanicum
As an alternative, perennial HN recommendation atuin (https://atuin.sh) logs time, duration and exit code (among other data) for every command.
That way you only have to look at it when you need it, and you can also figure out what you were doing last week/month/year if necessary.
horsawlarway
For a personal workstation - you should never "really need it".
It's a personal machine and should be treated as disposable. Doing anything less is fairly irresponsible.
So sure - turn on timestamps for your ssh bastion (although it should be in the logs already...), or turn them on for the ci/cd pipeline (not that you should need them there anyways, since it should be dumping tons of timing info already).
But a personal machine? Plain ol' ">" is plenty.
Not that there's anything wrong with a maximal prompt either... I've definitely done the "configure all the powerline settings!" thing. But I also don't mind a simple ">" or "#".
bayindirh
Why the timestamps are that important? Honestly asking.
You can always time your commands with "time".
hiAndrewQuinn
Well, that's why you build it into the prompt. So you don't give yourself the opportunity to forget.
m000
I would be very curious to see an age demographic chart of people using e.g. Starship.
Personally, over time, I have stopped caring too much about prompt customization. I concluded that, no matter how carefully you curate your prompt, 90% of the information shown will be irrelevant 90% of the time*. After a while, your brain will start perceiving this as visual clutter and filter it out, to the point you may even forget the information is there, right in front of your eyes.
And for the things that matter, you probably need more details than any prompt can show you. E.g. are there changes in your git branch? Ok there are, good to know, but which files have changed? Just knowing that there are changes is not really actionable information. You need to run additional commands to get actionable details.
* the numbers are completely arbitrary, but you get the picture
inejge
> Personally, over time, I have stopped caring too much about prompt customization.
For a while, I tried a couple of Christmas tree prompts which included all kinds of condensed Git status and other bells and whistles, but eventually tired of them and settled on:
- Exit status of the previous command, if nonzero.
- Current time, HH:MM, 24 hour format.
- user@host, red if euid 0, green otherwise.
- Current directory, shortened if the path has three or more elements, with home directory recognition.
- Current directory, full path, echoed as hardstatus and hence appearing in the terminal window title.
- The name of the current branch if within a Git repo.
- Prompt character, dollar/hash sign.
All those elements are meaningful to me, inasmuch as I can quickly orient myself using that information and explore further if I notice anything out of the ordinary.
I'm pretty sure that megaprompt programs like Starship could produce the above, but I like obtaining a familiar prompt with a minimum of external dependencies, and so have written it all in Bash, then ported to Zsh and various Korn shells, which was quite tricky. It probably wouldn't work on Xenix 286, but anything newer has a fighting chance.
Twirrim
I'm senior, been working in the industry for closing on 25 years now. I usually avoid anything "ohh shiny".
For most of my career I used a very simple PS1:
export PS1="\[\033[1;32m\][\t \u@\h \w]\\$\[\033[0m\] "
timestamp, who I am, what box I'm on, where I am.I've tried prompts in the past, and they mostly annoyed me, or never showed me useful information. I've been a happy starship user for several years now. I've got the config tweaked so that it only shows me things I specifically care about. It's lightning fast.
deathanatos
As a counterpoint, one of the most useful customizations I've made to my prompt is to emit the exit status of the prior command. Knowing that something failed is a useful signal, esp. when sometimes the thing failing just fails to emit any output that indicates that it failed.
I only emit it if the prior command fails, too, so it doesn't clutter things the 90% of the time things are working.
» true
» false
(last command returned 1.)
»
I also translate signals, so I get "last command exited on SIGSEGV", or so.It's also useful the other way: when a program emits and error and exits with "success".
tclancy
Oh, how do you automate that? I usually add a "& say done | say failed" to long-running tasks if I remember to do it.
teo_zero
In bash, it's enough to remember that $? expands to the exit code of the previous command, and $((x)) evaluate x as an integer expression, including the ternary operator x?y:z.
For example the following prints the exit code in green if zero, in red otherwise:
PS1='\[\e[$(($??31:32))m\]$? \[\e[39m\]'
__float
I like the exit code feature a lot; Starship does that with my config in a subtle color change.
My shell customization is largely throwing Starship in (so it looks the same on all the machines I use -- Ubuntu servers at work, macOS at home, nixOS/Fedora/etc. servers for personal use.) and a starship.toml I wrote once and now leave alone.
m000
That's useful indeed. Did you custom-code it, or is it e.g. an ohmyzsh plugin or something?
bityard
I think we can generalize this into the overall computing environment. When I was younger, I was that kid building my whole OS from source via Gentoo, with all the CPU-specific flags and optimizations. I had a very detailed window manager configuration (fwvm2 maybe?), a .bashrc full of aliases and functions for every occasion. And yes, a custom prompt.
I think these kinds of over-optimization rabbit holes are a good learning experience, but I compare it to woodworking. A woodworker just starting out will spend most of his/her time building or refining the tools they need, learning techniques, coming up with ideas/designs and testing them, etc. But eventually the point comes where you have to get Real Work done and the tools and jigs have to wait until the weekend.
Linux is still my favorite desktop OS, but these days I just run Debian and KDE because "free time" is not a thing I have anymore and I care more about getting things done than having the most optimal computing experience.
skydhash
I still have free time, my shift to default config and stable software was caused by how many workfkow changes for no reason I could stomach. I rarely need the latest features. Getting things to work and expecting to stay working for a while is the basic premise of computing.
rcarmo
I’m “very senior” (as in decades of _Unix_ use senior) and I like it in minimal mode because it’s just so much less hassle than all the other zsh stuff I had been using for a couple of decades. Not sure if you expected replies to be full of all the JavaScript kids that use emojis in logging messages, but apologies if so :)
m000
It's always nice to have an impromptu HN poll. We may have been missing and didn't know :)
And now that you mention it, next year will be my 30th Unix-versary. Time flies... Still not a greybeard though.
Twirrim
I'm senior, been working in the industry for closing on 25 years now, majority of that dealing with *nix systems of various descriptions. I usually avoid anything "ohh shiny".
I've tried prompts in the past, and they mostly annoyed me, or never showed me useful information. I've been a happy starship user for several years now. I've got the config tweaked so that it only shows me things I specifically care about. It's lightning fast.
yankcrime
Ignore the haters - I too am a fan of minimalism in my terminal since I don't appreciate unnecessary clutter or decoration, but context is king and Starship can be configured as such.
By default my prompt is a shows me the current directory, the time, and a single character '%'. If I set something in my environment for which I need to be contextually aware - i.e if I have KUBECONFIG or OS_CLOUD - then the prompt is updated with the detail. Similar for languages - it'll automatically show me the version of Go or Python or whatever based on a few factors, all of which I can control.
The reason I love Starship is that it's made all this very, very easy to configure - instead of having to wade through arcane Zsh configuration or additional plugins, Starship makes it easy. It also adds negligible overhead to initialisation, especially when done so via evalcache [0]
microflash
I'm surprised by people conflating customizability with maximalism. Yes, the default configuration is a bit too much but you can turn the knobs to reign it in. I work on multiple AWS environments, different application runtimes, and so on. Having some context in the prompt has been very helpful for me. I maybe biased though since I've used Starship for years paired with Nushell.
bullman
Fan of starship here. wanted to drop a few comments based on what I seen so far
Love the performance. Written in Rust and compiled to binary, it's _much_ faster than either python-based powerline, the bash-shell-based ohmybash and zshell-based ohmyzsh and spaceship.
You can use it for zsh, bash, sh, fish. but you can also use it for both MS Windows CMD and Powershell. I don't believe any other prompt tools can do all at the same time. And a single config file can control all of them on your system.
The default config is just that - a default. Too much information? you can change it. dont like icons? you can remove them.
At almost 100 modules to choose from, it's customization options are nearly limitless
JimDabell
I don’t understand why they market this as “minimal”. It’s got loads of features, and every time I see somebody use it they have a huge prompt with loads of bells and whistles.
My shell prompt is:
: ▶
You don’t need an entire shell prompt customisation framework to be minimal.Twirrim
You can make it as small as you want. Every single feature can be disabled. At the moment mine is relatively minimal
format = """
$username\
$hostname\
$shlvl\
$directory\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$package\
$python\
$rust\
$env_var\
$custom\
$cmd_duration\
$jobs\
$time\
$status\
$shell\
$character"""
slightwinder
Compared to other shells and prompts, the configuration is really straightforward and minimal if you want something mildly complex.
Cthulhu_
Yeah this isn't minimal, this is maximalism - more information, more characters. They should just embrace being a maximalist prompt.
Brajeshwar
Mine is an even thinner arrow.
# clean, simple, minimal
PROMPT='%{%F{red}%}%~ %{%F{yellow}%}% › %{%F{reset_color}%}%'
PeterWhittaker
What am I missing? I went to the site, but I can find nothing to suggest why I might want to use this. Are there examples that I've missed, likely owing to having been heads down chasing a pernicious heisenbug all day?
Given that I do like my shiny prompt, which shows me:
The result of the last command (in green, red, or purple)
user@host:currentDirectory
current branch, if in a repo
with the last line showing summary git status, if in a repo, and background jobs, I suspect I might be their market, but I cannot see a why anywhere.(Green: Last command good, e.g., exit 0) (Red: Last command non-zero exit, with a special indicator if it was interrupted) (Purple: Last command suspended, and few other things)
null
Aeolun
I really like this one for just being a single install and then no more fiddling. I don’t have time for any of that shit, but I do want to know whether my current shell is on node 20 or 22, rust stable or nightly. Getting all of that without extra effort is great.
b0a04gl
every time your shell takes 100ms to render git status that you didn’t even need, you're paying invisible tax on flow. terminals should be reactive memory tools, not passive decoration. we optimize for code runtime but not for our own typing latency
Twirrim
Starship is very fast, taking only a couple of milliseconds to gather the data (and you can easily configure it to minimise what it'll spend time gathering). It's night and day compared to other ones I've tried, where the hundred millisecond-ish delays annoyed me.
Night_Thastus
Depends a lot on the system. I tried using it on Windows via MSYS2, and it seems like some Windows overhead (maybe process startup?) was causing Starship to slow it all down to a crawl. Disabling a few of the addons helped but didn't fix it. In the end I stopped using it.
lukeschlather
I don't know if Windows can be helped. It may be antivirus but I feel like 50th percentile load time is at least a second and there's nothing to be done about it. git just hangs sometimes on git show/git diff. I have to kill the terminal.
OptionX
we optimize for code runtime but not for our own typing latency
100ms optimization is a lot different for a CPU or a human brain. I'm not defending having the entire system log dumped out on every prompt but a few amenities are worth a few milliseconds computation time for a human.
Besides, I don't see how, for example , having your prompt take those 100ms to print a git branch or status breaks your "flow" yet having to type out the commands yourself and taking longer doing it doesn't.
Its a balance between bloat and and usability like so many other things, but, to me at least, being on either extreme of bloat or extreme-minimalism seems counterproductive.
naniwaduni
100 ms is an incredibly long time even for humans.
gobblegobble2
The delay is certainly frustrating. I use a patched version of kitty terminal that moves starship prompt to the bottom of the window, similar to vim and emacs. Since modeline updates are asynchronous, the shell prompt is very snappy even in big git repos. The downside is that you have to patch kitty and I never bothered to test my personal pet project on anything else than Linux.
infogulch
Could prompt tools like this use TUI-style features to edit the displayed prompt after releasing it back to the user? So if kubectl, git, or aws cli takes 200ms to finish it doesn't matter, the data from the output of these commands will appear a few moments after the prompt has been released to the user, so the user doesn't feel like they're waiting for the prompt to be ready.
account42
> we optimize for code runtime but not for our own typing latency
Don't the layers of frameworks mean that the opposite is true.
perrygeo
counter-point: having to constantly track git status in your head, and needing to type commands to remind yourself, is a far bigger distraction. Optimize to avoid context switching, not for a few ms latency.
FWIW, I switched from zsh default to starship and didn't notice any perceptible difference. But I certainly notice when I mess up my git commits!
bregma
If you're used to, say, VS Code or the GitHub online editor where the lag between pressing a key on the keyboard and a corresponding character appearing on the screen can be on the order of tens of thousands of milliseconds, then 100 ms will seem like lightning.
dminik
There's a thousand milliseconds in a second. If your VSCode is taking +10 seconds to display a single character, it might be time to upgrade from your Commodore 64.
gapan
Well, actually, the Commodore 64 is a lot faster with respect to input latency than any modern machine.
falcor84
Or to switch from VSCode to SpeedScript
Tmpod
I tried starship a few years ago and found it too "extra" and sluggish. I'm sure it may have improved in this time, but I ended up sticking with the excellent Hydro[0], only for fish though.
It's very minimal while having useful features: - exit codes, even for pipelines - git branch, status (displayed as a dot if your tree is dirty) and ahead/behind counts - command execution time (if above some configurable threshold) - truncated/minified $CWD, always maintaining the git root's name (I sometimes like it, sometimes don't; fortunately, it's very easy to change) - current vi-like mode (I don't use that)
It's very fast and async (prompt repaints don't block your input or running commands), and totals 132 lines of fish (according to cloc[1]). It's also very customisable through variables, which can be declared as universal to instantly change on all sessions you have open.
If you're on fish and like this feature set, definitely give it a shot, or at least look at the code as a base for a bespoke prompt :P
[0]: https://github.com/jorgebucaran/hydro [1]: https://github.com/AlDanial/cloc
iloveitaly
I've been using it for awhile and love it:
https://github.com/iloveitaly/dotfiles/blob/master/.config/s...
pixl97
Warning: Improper use of Starship may cause it to explode in your test harness.
I like maximalist prompts, and indeed Starship is what Shell Bling Ubuntu [1] installs on a new dev machine. But they're not everyone's cup of tea.
If I wanted to recommend to someone the min-maxed, highest density thing they could add to their prompt, it would simply be the time your current prompt appeared + the amount of time the last command you ran took.
These two pieces of information together make it very easy for you (or your local sysadmin (or an LLM looking over your digital shoulder)) to piece together a log of exactly what happened when. This kind of psuedo-non-repudiation can be invaluable for debugging sessions when you least expect it.
This was a tip I distilled from Michael W. Lucas's Networking for System Administrators a few years ago, which remains my preferred recommendation for any developers looking to learn just enough about networking to not feel totally lost when talking to an actual network engineer.
Bonus nerd points if you measure time in seconds since the UNIX epoch. Very easy and fast to run time delta calculations if you do that:
[1]: https://github.com/hiAndrewQuinn/shell-bling-ubuntu