--- title: starship β€” Cross-Shell Prompt date: 2026-01-19 time: 12:00 model: admin category: programs author_type: human summary: Ultra-fast prompt working in every shell, showing git status, language versions, and execution time tags: program, Modern CLI Tools, starship --- **πŸ’¬ "starship command"** starship is a **blazing-fast, cross-shell prompt**. It replaces your default prompt to show the current folder, git branch and status, language versions, command runtime, and moreβ€”only what matters, clearly. Written in Rust it updates with almost no lag even on slow shells, and a single config file customizes everything. It supports Bash, Zsh, Fish, and most other shells. - **Concept**: Replaces the shell prompt (the part before your command) with a fast, informative one. - **Features**: Shows git state, language versions, command duration, exit codes, and battery. - **Strength**: Simple install and config, with the same look across shells and machines. - **Use when**: You move between servers and shells and want a consistent, informative prompt. ## Basic Usage After installing the binary, add one init line to your shell rc file and you are done. ### 1. Shell integration (one rc line) The installer adds it, or you add it yourself. ``` # Bash β€” at the end of ~/.bashrc eval "$(starship init bash)" # Zsh β€” in ~/.zshrc eval "$(starship init zsh)" ``` ### 2. See it in action Folder and git state now appear in the prompt automatically. ``` cd ~/myrepo # branch and changes appear git status # the git module summarizes state ``` ### 3. Customize Apply a preset or edit the config file. ``` starship preset presets/tomorrow-night -o ~/.config/starship.toml $EDITOR ~/.config/starship.toml ``` ## Installation & Download starship installs via the official script or a package manager. | Environment | Command | | --- | --- | | Official installer (Linux/macOS) | curl -sS https://starship.rs/install.sh | sh | | cargo | cargo install starship --locked | | Ubuntu/Debian (if packaged) | sudo apt install starship | | macOS (Homebrew) | brew install starship | Verify with `starship --version`. You must add the `eval "$(starship init shell)"` line to your shell rc file for it to apply. ## Common Commands | Command / Key | Description | | --- | --- | | starship preset | Apply a ready-made prompt style | | starship print-config | Show the current config | | starship explain | Explain each part of the prompt | | Config file ~/.config/starship.toml | Freely set modules, colors, and layout | ## 3 Essential Command Combinations - `curl -sS https://starship.rs/install.sh | sh` β€” Install starship - `eval "$(starship init bash)"` β€” Integrate the prompt into your shell - `starship explain` β€” Describe the current prompt components **πŸ’¬ "Using starship on a real server"** A step-by-step look at setting up one prompt across many servers. ### Step 1 Β· Install Install with the official script. ``` curl -sS https://starship.rs/install.sh | sh ``` ### Step 2 Β· Shell integration Add the init line to your rc file. ``` echo 'eval "$(starship init bash)"' >> ~/.bashrc ``` ### Step 3 Β· Apply Open a new shell to see the prompt. ``` exec bash git status ``` ## How it is used in practice ### 1. See git state at a glance **Situation** β€” Watch branch and changes in the prompt. ``` cd /var/www/workspace ``` **Result** β€” The prompt shows the branch name and changed-file count. **Point** β€” Avoid committing work on the wrong branch by mistake. ### 2. Consistent prompt everywhere **Situation** β€” Use one style across servers. ``` starship preset presets/pure -o ~/.config/starship.toml ``` **Result** β€” Every server uses the same prompt style. **Point** β€” Work with less confusion when hopping between environments. ## Caveats - It will not apply until the init line is added to your shell rc file. - On very old shells/terminals some symbols may break; a Nerd Font displays them best. - Config lives in `~/.config/starship.toml`, which is easy to keep under version control. --- Source (HTML): https://games.aidebatehub.com/programs/linux/modern/starship.html This file is an auto-generated Markdown twin of the DevHub document.