☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
| Files | Last commit | Last update |
|---|---|---|
| 8 days ago | ||
| 9 days ago | ||
| 5 months ago | ||
| 3 years ago | ||
| 9 days ago | ||
| 4 years ago | ||
| 17 days ago | ||
| 4 years ago | ||
| 2 years ago | ||
| 5 years ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 4 years ago | ||
| 1 month ago | ||
| 8 days ago | ||
| 8 days ago | ||
| 4 years ago | ||
| 1 month ago | ||
| 1 year ago | ||
| 15 days ago | ||
| 4 years ago | ||
| 5 years ago | ||
| 1 year ago | ||
| 2 years ago | ||
| 4 years ago | ||
| 1 year ago |
Warning
默认分支已从 master 重命名为 main。
如果你有本地克隆,请通过运行以下命令进行更新:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

一款适用于任何 shell 的极简、极速且可无限定制的命令行提示符!
- 极速: 它速度飞快——真的非常快!🚀
- 可定制: 配置提示符的方方面面。
- 通用: 在任何 shell、任何操作系统上都能运行。
- 智能: 一眼呈现关键信息。
- 功能丰富: 支持你喜爱的所有工具。
- 简单: 安装便捷——几分钟即可开始使用。
🚀 安装
前提条件
- 已安装 Nerd Font 并在终端中启用(例如,可尝试 FiraCode Nerd Font)。
步骤 1. 安装 Starship
从下方列表中选择您的操作系统,查看安装说明:
BSD
使用以下任意包管理器安装 Starship:
| 发行版 | 仓库 | 安装说明 |
|---|---|---|
| 任意 | crates.io | cargo install starship --locked |
| FreeBSD | FreshPorts | pkg install starship |
| NetBSD | pkgsrc | pkgin install starship |
Linux
为您的系统安装最新版本:
curl -sS https://starship.rs/install.sh | sh
或者,您可以使用以下任一软件包管理器安装 Starship:
| 发行版 | 软件仓库 | 安装说明 |
|---|---|---|
| 任何 | crates.io | cargo install starship --locked |
| 任何 | conda-forge | conda install -c conda-forge starship |
| 任何 | Linuxbrew | brew install starship |
| Alpine Linux 3.13+ | Alpine Linux Packages | apk add starship |
| Arch Linux | Arch Linux Extra | pacman -S starship |
| CentOS 7+ | Copr | dnf copr enable atim/starship dnf install starship |
| Debian 13+ | Debian Main | apt install starship |
| Fedora 40+ | Copr | dnf copr enable atim/starship dnf install starship |
| Gentoo | Gentoo Packages | emerge app-shells/starship |
| Manjaro | pacman -S starship |
|
| NixOS | nixpkgs | nix-env -iA nixpkgs.starship |
| openSUSE | OSS | zypper in starship |
| Ubuntu 25.04+ | Ubuntu Universe | apt install starship |
| Void Linux | Void Linux Packages | xbps-install -S starship |
macOS
为您的系统安装最新版本:
curl -sS https://starship.rs/install.sh | sh
或者,你可以使用以下任意一种包管理器安装 Starship:
| 仓库 | 安装说明 |
|---|---|
| crates.io | cargo install starship --locked |
| conda-forge | conda install -c conda-forge starship |
| Homebrew | brew install starship |
| MacPorts | port install starship |
Windows
你可以通过 发布页面 中的 MSI 安装程序,为你的系统安装最新版本。
你也可以使用以下任意一种包管理器安装 Starship:
| 仓库 | 安装说明 |
|---|---|
| crates.io | cargo install starship --locked |
| Chocolatey | choco install starship |
| conda-forge | conda install -c conda-forge starship |
| Scoop | scoop install starship |
| winget | winget install --id Starship.Starship |
步骤 2:设置你的 Shell 使用 Starship
配置你的 Shell 以初始化 starship。从下方列表中选择你的 Shell:
Bash
将以下内容添加到 ~/.bashrc 的末尾:
eval "$(starship init bash)"
命令提示符(Cmd)
在 Cmd 中使用时,你需要搭配 Clink(v1.2.30 或更高版本)。
在以下路径创建文件 %LocalAppData%\clink\starship.lua,并添加以下内容:
load(io.popen('starship init cmd'):read("*a"))()
Elvish
将以下内容添加到 ~/.config/elvish/rc.elv(Windows 系统为 %AppData%\elvish\rc.elv)的末尾:
eval (starship init elvish)
注意:仅支持 Elvish v0.18+。对于 v0.21.0 之前的 Elvish 版本,配置文件可能为 ~/.elvish/rc.elv
Fish
将以下内容添加到 ~/.config/fish/config.fish 的末尾:
starship init fish | source
Ion
将以下内容添加到 ~/.config/ion/initrc 的末尾:
eval $(starship init ion)
Nushell
将以下内容添加到 Nushell 配置文件的末尾(在 Nushell 中运行 $nu.config-path 可找到该文件):
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
注意:仅支持 Nushell v0.96+ 版本
PowerShell
将以下内容添加到 PowerShell 配置文件的末尾(可通过运行 $PROFILE 找到该文件):
Invoke-Expression (&starship init powershell)
Tcsh
在 ~/.tcshrc 的末尾添加以下内容:
eval `starship init tcsh`
Xonsh
将以下内容添加到 ~/.xonshrc 的末尾:
execx($(starship init xonsh))
Zsh
在 ~/.zshrc 的末尾添加以下内容:
eval "$(starship init zsh)"
步骤 3. 配置 Starship
启动一个新的 shell 实例,你应该就能看到美观的新 shell 提示符了。 如果你对默认设置满意,那就尽情使用吧!
如果你想进一步自定义 Starship:
🤝 贡献
我们一直期待着各种技能水平的贡献者!如果你希望轻松入门这个项目,可以尝试解决 good first issue。
如果你精通非英语语言,我们非常感谢你帮助我们保持文档的多语言翻译和更新。如果你愿意提供帮助,可以在 Starship Crowdin 上贡献翻译。
如果你有兴趣为 starship 贡献力量,请查看我们的 贡献指南。此外,也欢迎加入我们的 Discord 服务器 打个招呼。👋
💭 灵感来源
以下这些先前的作品为 starship 的创建提供了灵感,敬请了解。🙏
-
denysdovhan/spaceship-prompt – 面向宇航员的 ZSH 提示符。
-
denysdovhan/robbyrussell-node – 用 JavaScript 编写的跨 shell robbyrussell 主题。
-
reujab/silver – 一个可自定义的跨 shell 类 powerline 提示符,带有图标。
❤️ 赞助商
通过 成为赞助商 来支持这个项目。你的名字或 logo 将显示在这里,并链接到你的网站。
支持者级别
🔒 代码签名政策
由 SignPath.io 提供免费代码签名,证书由 SignPath Foundation 颁发。
代码签名角色:
- 审核者:Astronauts
- 批准者和作者:Mission Control
除非用户或安装/操作人员明确要求,否则本程序不会将任何信息传输到其他网络系统。
📝 许可证
版权所有 © 2019年至今,Starship 贡献者。
本项目采用 ISC 许可证。
Introduction
轻量级、迅捷无比且高度可定制的跨壳提示符!☄🌌️【此简介由AI生成】