# 使用 Homebrew, apk, chocolatey, apt, MacPorts, Nix, pacman, zypper, scoop, winget 安装 starship

查看 starship 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:starship
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install starship
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install starship
```

  证据: MacPorts ports tree: sysutils/starship/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add starship
```

  证据: Alpine Linux edge package indexes: starship from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install starship
```

  证据: Debian stable package indexes: starship from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#starship
```

  证据: nixpkgs package indexes: pkgs/by-name/st/starship/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S starship
```

  证据: Arch Linux sync databases: starship from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install starship
```

  证据: openSUSE Tumbleweed package metadata: starship from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install starship
```

  证据: Chocolatey community package catalog: starship from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','sqlitebrowser.install'

- Scoop (92%):

```sh
scoop install main/starship
```

  证据: Scoop official bucket manifest trees: bucket/starship.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Starship.Starship -e
```

  证据: Windows Package Manager source index: Starship.Starship from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:starship
- **软件包管理器:** Homebrew
- **版本:** 1.26.0
- **来源摘要:** Cross-shell prompt for astronauts
- **主页:** <https://starship.rs/>
- **仓库:** <https://github.com/starship/starship>
- **最后更新:** 2026-06-28T18:44:05Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- starship (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.26.0
## 项目历史与用法

Starship is a Rust-powered, cross-shell prompt that packages a feature-rich terminal prompt as one binary and one TOML configuration file.

### 项目历史

The official README and website present Starship as a minimal, fast, customizable prompt for any shell. The repository copyright begins in 2019, and the README lists prior prompt projects such as spaceship-prompt, robbyrussell-node, and silver as inspirations.

The project grew around cross-shell portability: the guide documents setup for Bash, Fish, Zsh, PowerShell, Cmd through Clink, Elvish, Ion, Nushell, Tcsh, and Xonsh.

### 采用历史

Starship became a package-manager-friendly terminal customization tool because it ships as a standalone binary and documents installation through many package managers. The official guide lists Homebrew, crates.io, conda-forge, Linux distribution packages, MacPorts, Chocolatey, Scoop, and winget among supported installation routes.

The GitHub repository page shows large community adoption, with tens of thousands of stars and more than a hundred releases by 2026.

### 使用方式

Users install the binary, add `starship init` to their shell startup file, and optionally customize `~/.config/starship.toml`. Starship then renders context-aware modules for directories, VCS state, language runtimes, cloud tools, containers, command duration, jobs, battery state, and other terminal context.

The FAQ describes the binary as stateless and shell agnostic, which explains why one package can support many shells without each shell needing a separate prompt framework.

### 为什么软件包爱好者会关心

Starship is one of the clearest examples of modern terminal tooling becoming a package-manager object: a Rust binary, shell integrations, generated completions, and a documented TOML config instead of a shell-specific theme bundle.

It matters to package nerds because it competes with shell-native prompt frameworks while fitting cleanly into Homebrew, distro packages, Cargo, Scoop, winget, and similar distribution channels.

### 时间线

- 2019: Repository copyright begins and Starship emerges as a cross-shell prompt project.
- 2021: GitHub discussions show users sharing and refining prompt configurations.
- 2026: GitHub repository page lists v1.26.0 as the latest release on June 28, 2026.

### Related projects

- The README names spaceship-prompt, robbyrussell-node, and silver as inspirations.
- Starship is related to shell ecosystems including Bash, Zsh, Fish, PowerShell, Nushell, and Xonsh, and to Nerd Fonts because many prompt symbols depend on patched fonts.

### 来源

- <https://github.com/starship/starship#readme>
- <https://starship.rs/config/>
- <https://starship.rs/faq/>
- <https://starship.rs/guide/>
- source_facts.package-manager


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/starship.toml
## 其他软件包管理器记录

- Debian apt - starship - 1.22.1-5: normalized package name match | Debian stable package indexes: starship from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast and customizable shell prompt | https://starship.rs
- Nix - starship: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/starship/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - starship - 1.24.2-r0: normalized package name match | Alpine Linux edge package indexes: starship from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimal, blazing-fast and infinitely customizable prompt for any shell | https://starship.rs
- apk - starship-bash-completion - 1.24.2-r0: normalized package name match | Alpine Linux edge package indexes: starship-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for starship | https://starship.rs
- apk - starship-fish-completion - 1.24.2-r0: normalized package name match | Alpine Linux edge package indexes: starship-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for starship | https://starship.rs
- apk - starship-zsh-completion - 1.24.2-r0: normalized package name match | Alpine Linux edge package indexes: starship-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for starship | https://starship.rs
- apk - starship-zsh-plugin - 1.24.2-r0: normalized package name match | Alpine Linux edge package indexes: starship-zsh-plugin from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimal, blazing-fast and infinitely customizable prompt for any shell (Zsh plugin) | https://starship.rs
- pacman - starship - 1.26.0-1: normalized package name match | Arch Linux sync databases: starship from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The cross-shell prompt for astronauts | https://starship.rs/
- zypper - starship - 1.26.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: starship from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A customizable prompt for many shells | https://starship.rs/
- MacPorts - starship: normalized package name match | MacPorts ports tree: sysutils/starship/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - starship: normalized package name match | Chocolatey community package catalog: starship from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','sqlitebrowser.install'
- Scoop - main/starship: normalized package name match | Scoop official bucket manifest trees: bucket/starship.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Starship.Starship: normalized package name match | Windows Package Manager source index: Starship.Starship from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/starship.yml](https://github.com/mxcl/pkgdb/blob/main/combined/starship.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
