# 使用 Homebrew, apk, MacPorts, Nix, winget 安装 carapace

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

## 安装

```sh
sudo av install brew:carapace
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install carapace
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install carapace
```

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

### Linux

- apk (92%):

```sh
sudo apk add carapace
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#carapace
```

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

### Windows

- winget (92%):

```sh
winget install --id rsteube.Carapace -e
```

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

## 软件包事实

- **软件包键:** brew:carapace
- **软件包管理器:** Homebrew
- **版本:** 1.7.3
- **来源摘要:** Multi-shell multi-command argument completer
- **主页:** <https://carapace.sh>
- **仓库:** <https://github.com/carapace-sh/carapace-bin>
- **最后更新:** 2026-07-27T19:20:56+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- carapace (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

carapace is a Go-based multi-shell argument completer distributed as the carapace-bin package. It exists in the long tradition of shell completion frameworks, but its package-nerd hook is that one completion engine can target many shells instead of requiring a separate completion script style for Bash, Zsh, Fish, PowerShell, Nushell, Xonsh, Elvish, and others.

### 项目历史

The public carapace-bin repository was created on GitHub in April 2020. Its README describes the project as a multi-shell completion binary, and the repository topics show the project deliberately spans many shell ecosystems rather than being tied to a single command-line environment.

The project grew around two related surfaces: a collection of completers for existing CLI tools and a specification system for adding custom completions. Its documentation is published as an mdBook site, and the README points users to install and setup pages rather than treating the GitHub README as the only manual.

### 采用历史

The project is packaged across multiple operating-system package channels. The supplied Homebrew source facts list Homebrew, Alpine, MacPorts, Nix, and winget package mappings, while the upstream README includes a Repology packaging badge, signaling that distribution packaging is part of the project's public identity.

Adoption has been strongest among users who move between shells or who want richer completion behavior without writing shell-specific scripts. The upstream README's supported-shell list includes both traditional shells and newer interactive shells, which is the core adoption story for carapace.

### 使用方式

Users install the carapace binary, enable it for their shell, and then use it to provide argument completions for supported commands. The upstream README links to the official install and setup documentation, and the official completers page documents the list of commands covered by the project.

For package maintainers and power users, carapace is also interesting because completions can be specified outside a single shell's scripting language, making it useful when a command-line tool needs completions across several shell communities.

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

carapace matters to package nerds because shell completion is often the forgotten layer between a package and its users. A package that ships a good binary but poor completions feels worse in day-to-day terminal use, and carapace offers a shared completion layer that package managers can distribute like any other CLI tool.

Its significance also comes from cross-shell normalization. Package repositories normally have to care about Bash, Zsh, Fish, PowerShell, and newer shells separately; carapace turns that messy edge of packaging into a dedicated, versioned tool.

### 时间线

- 2020: carapace-bin repository created on GitHub.
- 2022: GitHub releases page shows published carapace-bin release tags by at least v0.11.0.
- 2026: GitHub repository metadata shows the project still active, with shell-completion topics and ongoing updates.

### Related projects

- carapace is related to shell-native completion systems for Bash, Zsh, Fish, PowerShell, Nushell, Elvish, Xonsh, Oil, Tcsh, Ion, and Cmd, all of which are listed in the upstream README as supported or experimental shells.
- It is also related to package-manager completion distribution: Homebrew, Alpine, MacPorts, Nix, and winget mappings in the supplied source facts show how the same completion binary reaches users through several ecosystems.

### 来源

- <https://api.github.com/repos/carapace-sh/carapace-bin>
- <https://carapace-sh.github.io/carapace-bin/completers.html>
- <https://github.com/carapace-sh/carapace-bin>
- <https://raw.githubusercontent.com/carapace-sh/carapace-bin/master/README.md>
- 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: ${UserConfigDir}/carapace, ${UserConfigDir}/carapace/specs, ${UserConfigDir}/carapace/variables/{group}.yaml, ${UserConfigDir}/carapace/bridge
## 其他软件包管理器记录

- Nix - carapace: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/carapace/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - carapace - 1.7.3-r0: normalized package name match | Alpine Linux edge package indexes: carapace from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Multi-shell multi-command argument completer | https://carapace.sh/
- MacPorts - carapace: normalized package name match | MacPorts ports tree: sysutils/carapace/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - rsteube.Carapace: normalized package name match | Windows Package Manager source index: rsteube.Carapace from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/carapace.yml](https://github.com/mxcl/pkgdb/blob/main/combined/carapace.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
