Spaceship Prompt

A Zsh prompt for Astronauts

16.8k stars
907 forks

spaceship โ†’~ prompt
๐Ÿš€โญ Spaceship ZSH

Zsh prompt for Astronauts.

Built with โค๏ธŽ by Denys Dovhan and contributors


SWUbanner

Spaceship is a minimalistic, powerful and extremely customizable Zsh prompt. It combines everything you may need for convenient work, without unnecessary complications, like a real spaceship.

Spaceship with Hyper and One Dark

Visit Troubleshooting for similar setup and find more examples with different color schemes in Screenshots wiki-page.

Features

  • Clever hostname and username displaying.
  • Prompt character turns red if the last command exits with non-zero code.
  • Current Git branch and rich repo status:
  • ? โ€” untracked changes;
  • + โ€” uncommitted changes in the index;
  • ! โ€” unstaged changes;
  • ยป โ€” renamed files;
  • โœ˜ โ€” deleted files;
  • $ โ€” stashed changes;
  • = โ€” unmerged changes;
  • โ‡ก โ€” ahead of remote branch;
  • โ‡ฃ โ€” behind of remote branch;
  • โ‡• โ€” diverged changes.
  • Current Mercurial bookmark/branch and rich repo status:
  • ? โ€” untracked changes;
  • + โ€” uncommitted changes in the index;
  • ! โ€” unstaged changes;
  • โœ˜ โ€” deleted files;
  • Indicator for jobs in the background (โœฆ).
  • Current Node.js version, through fnm/nvm/nodenv/n (โฌข).
  • Current Ruby version, through rvm/rbenv/chruby/asdf (๐Ÿ’Ž).
  • Current Elm version (๐ŸŒณ)
  • Current Elixir version, through kiex/exenv/elixir (๐Ÿ’ง).
  • Current Swift version, through swiftenv (๐Ÿฆ).
  • Current Xcode version, through xenv (๐Ÿ› ).
  • Current Go version (๐Ÿน).
  • Current PHP version (๐Ÿ˜).
  • Current Rust version (๐Ÿฆ€).
  • Current version of Haskell GHC Compiler, defined in stack.yaml file (ฮป).
  • Current Julia version (เฎƒ).
  • Current Docker version and connected machine (๐Ÿณ).
  • Current Amazon Web Services (AWS) profile (โ˜๏ธ) (Using named profiles).
  • Current Google Cloud Platform gcloud active configuration (โ˜๏ธ).
  • Current Python virtualenv.
  • Current Conda virtualenv (๐Ÿ…’).
  • Current Python pyenv (๐Ÿ).
  • Current .NET SDK version, through dotnet-cli (.NET).
  • Current Ember.js version, through ember-cli (๐Ÿน).
  • Current Kubectl context (โ˜ธ๏ธ).
  • Current Terraform workspace (๐Ÿ› ).
  • Current IBM Cloud account (๐Ÿ‘”).
  • Package version, if there's is a package in current directory (๐Ÿ“ฆ).
  • Current battery level and status:
  • โ‡ก - charging;
  • โ‡ฃ - discharging;
  • โ€ข - fully charged.
  • Current Vi-mode mode (with handy aliases for temporarily enabling).
  • Optional exit-code of last command (how to enable).
  • Optional time stamps 12/24hr in format (how to enable).
  • Execution time of the last command if it exceeds the set threshold.
  • Optional AWS now supports aws-vault (aws-vault)

Want more features? Please, open an issue or send pull request.

๐Ÿ’ก Tip: Follow our Twitter to keep yourself updated about new features, improvements, and bugfixes.

Requirements

To work correctly, you will first need:

  • zsh (v5.2 or recent) must be installed.
  • Powerline Font must be installed and used in your terminal (for example, switch font to Fira Code).

Customization

Spaceship works well out of the box, but you can customize almost everything if you want.

  • Options โ€” Tweak section's behavior with tons of options.
  • API โ€” Define a custom section that will do exactly what you want.

Troubleshooting

Having trouble? Take a look at out Troubleshooting page.

Still struggling? Please, file an issue, describe your problem and we will gladly help you.

Related Projects

Here's a list of related projects that have been inspired by Spaceship ZSH.

  • matchai/spacefish - A port of Spaceship ZSH for fish shell intending to achieve complete feature parity.
  • starship/starship - A blazing-fast, cross-shell prompt written in Rust, heavily inspired by Spaceship ZSH.

Team

Denys Dovhan Salmanul Farzy Maxim Baz Runrioter Wung
Denys Dovhan Salmanul Farzy Maxim Baz Runrioter Wung

Hi! I work on this project in my spare time, in addition to my primary job. I hope you enjoy using Spaceship ZSH. If you do, please, become my patron ๐Ÿค.

Patreon Bitcoin Ethereum
Become a patron 1FrPrQb6ACTkbSBAz9PduJWrDFfq41Ggb4 0x6aF39C917359897ae6969Ad682C14110afe1a0a1

This is your way make a clear statement: My work is valued.

I would appreciate your support! Thank you!

License

MIT ยฉ Denys Dovhan