How to Use Carapace: A Beginner's Guide to Multi-Shell Tab Completion
CodexFuse Team · 2026-11-02T10:01:19.659Z · 10 min read min read
Carapace is one completion engine for every shell: install it, source one line into your rc file, and press Tab. This beginner guide covers install, shell integration, bridges, YAML specs, and styling.
What Is Carapace, Exactly?
If you are learning how to use Carapace, start with this one sentence: Carapace is one completion engine for every shell. This carapace tutorial will take you from a dead Tab key to rich, context-aware completions in about ten minutes.
Carapace (the carapace-sh/carapace-bin project, whose repository header reads "A multi-shell completion binary") gives you carapace shell completion across Bash, Zsh, Fish, PowerShell, Nushell, Elvish, Oil, Tcsh, Xonsh, and Cmd. The README describes it in its own words: "Carapace-bin provides argument completion for multiple CLI commands (full list), and works across multiple POSIX and non-POSIX shells."
Here is the mental model, stated once: every shell, when you press Tab, is really asking "what comes next?" Carapace answers that question on a single wire protocol — carapace <command> <shell> <partial-words> — so one completion definition works everywhere instead of being rewritten per shell.
A few facts, all verified on 2026-11-02: the latest release is v1.8.2, published 2026-11-01 per the GitHub Releases API; the project is MIT-licensed with 2,009 stars (a moving snapshot); and the author's own live test of the official binary measured 4,805 unique built-in completers in v1.8.2 — thousands, not the "over 500 packages" figure an older installer page still repeats. If git is the command you live in, our Git beginner guide pairs well with what follows, because git is the perfect first demo.
Three disambiguations, each said once. First, carapace-bin is the binary you install; carapace (carapace-sh/carapace) is the Go library that tool authors use to build completions into their own CLIs. Second, Carapace is not Starship: Starship draws your prompt (directory, git branch, icons), while Carapace fills in what Tab completes — a different job entirely. Third, the word "carapace" is also a turtle's shell, an AI-agent security server (Carapace MCP), and a Rust port of this very engine (carapace-rs) — name noise on the search results, nothing to do with your terminal.
How Do I Install Carapace?
Download the current release for your OS and put carapace on your PATH — or install it through your package manager. The install docs open with exactly that: "Download from releases and add carapace to PATH." These routes were verified current at write time (install methods move, so this page pins v1.8.2, released 2026-11-01).
| Platform | Command | Source |
|---|---|---|
| Linux (any) | Download carapace-bin_1.8.2_linux_amd64.tar.gz from GitHub releases, add carapace to PATH | install docs |
| Debian / Ubuntu | Add the rsteube apt repo, then apt-get install carapace-bin | install docs |
| Arch | pamac install carapace-bin (AUR) | install docs |
| macOS | brew install carapace | install docs |
| Windows | scoop bucket add extras then scoop install extras/carapace-bin (marked "recommended"), or winget install -e --id rsteube.Carapace | install docs |
| Any (mise) | mise use -g carapace@latest | install docs |
| Any (nix / pixi / pkgx) | nix-shell -p carapace, pixi global install carapace, or pkgx install carapace | install docs |
| Any (x-cmd) | x env use carapace-bin | x-cmd |
| Termux | pkg install carapace | install docs |
The author of this guide ran the official v1.8.2 Linux binary on a test machine: ./carapace --version printed carapace-bin 1.8.2, matching the Releases API exactly. Installing on a remote box? Our what is VPS hosting guide explains the kind of server you are logging into.
How Do I Wire Carapace Into My Shell?
Add one line to your shell's rc file and start a new shell — that registers all the available completers. The setup page says exactly that: "This registers all the available completers." Here are the current lines, verified against the live setup docs on 2026-11-02:
| Shell | Rc file | Line to add |
|---|---|---|
| Bash | ~/.bashrc | source <(carapace _carapace) |
| Zsh | ~/.zshrc | autoload -U compinit && compinit, then source <(carapace _carapace) |
| Fish | ~/.config/fish/config.fish | carapace _carapace | source |
| Nushell | env.nu + config.nu | carapace _carapace nushell | save --force the output to the cache dir, then source it |
| PowerShell | Microsoft.PowerShell_profile.ps1 | Set MenuComplete key handler, then carapace _carapace | Out-String | Invoke-Expression |
Notice what is missing: bash and zsh users do not pass a shell name. That is the integration lesson, said once — the current docs use the shell-less form carapace _carapace, and Carapace detects your shell from the parent process at runtime. The live test confirmed it: carapace _carapace bash emitted a snippet that rejects legacy bash 3 outright and wires a _carapace_completer() function through carapace <command> bash. Only Nushell, Elvish, Oil, Tcsh, and Xonsh still take the shell name explicitly. In short: the carapace bash and carapace zsh setups use the shell-less form, while carapace fish, nushell, and powershell each use their own explicit syntax.
Two cautions, each said once. First, this integration line moves over time — always check the current setup page rather than copying a two-year-old snippet. Second, PowerShell users must switch the Tab handler to MenuComplete; the docs call it "required" because the default Complete function displays raw ANSI escape codes in the prompt instead of styled completions. You will be editing rc files by hand, so our Neovim beginner guide is a handy companion.
What Happens When I Press Tab?
Your shell calls carapace <command> <shell> <what-you-typed> and Carapace returns the candidates — one invocation pattern for all 4,805 built-in commands. Try it with git, the classic first test: type git s and press Tab.
An interactive Tab press cannot be screenshotted here, but the exact wire output behind it was captured live on the test machine with carapace git bash "":
$ carapace git bash "" add am annotate apply archimport archive ... branch ... send-email ...
Trimmed for readability — the real output starts with a one-line wire-protocol header, then one candidate per line. This is precisely what your shell pipes through on every Tab.
You can also load a single completer instead of all of them: the setup docs note "It is also possible to load a single one by replacing _carapace with the completer name (e.g. carapace chmod)." The live test confirmed the mechanism — carapace git "" printed git's dedicated integration snippet rather than completions.
What Are Carapace Bridges?
Bridges let Carapace reuse completions written for other systems, with one optional line: export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense'. Carapace already ships 4,805 built-in completers; bridges fill the gaps with completions the fish, zsh, and bash communities — and Microsoft's inshellisense — have already written, so a command with no native Carapace completer still completes.
The bridge table on the setup page lists bash, fish, zsh, and inshellisense. The carapace inshellisense bridge is the newest of the four — it lets Carapace consume specs written for Microsoft's IDE-style completer. This is not just documentation: a real NixOS dotfiles configuration in the wild sets CARAPACE_BRIDGES="fish,zsh,bash,inshellisense" alongside the carapace binary, confirming the exact shape.
That last bridge name deserves its own line, said once: inshellisense is Microsoft's "IDE style autocomplete for shells" with "support for 600+ command line tools." It runs an interactive overlay session you enter with is and leave with exit, while Carapace integrates into your shell's native Tab path — complementary designs, and the bridge lets one consume the other's specs. One genuine difference: inshellisense does not ship specs for az, gcloud, or aws "due to their large size"; Carapace ships all three.
How Do I Write My Own Completions With Spec Files?
Drop a YAML spec into ~/.config/carapace/specs/ — "Carapace reads specifications from ~/.config/carapace/specs/." That is the whole mechanism: one YAML file per command, and your custom tool completes like a built-in one.
The ecosystem already works this way. The searxng-cli docs show the pattern: symlink the project's spec into the specs directory (ln -s /usr/share/searxng-cli/searxng.yaml ~/.config/carapace/specs/searxng.yaml), and completions appear. On the developer side, a Commander.js adapter generates a hello.yaml Carapace spec file from program.installCompletion(). And the spec subcommand executes completion logic from specification files directly, with --list showing every loaded completer and --clear-cache clearing cached completions.
Specs live in your dotfiles repository, right next to your CI configuration — our GitHub Actions beginner guide covers the other half of that repo.
Can I Change How Completions Look?
Yes. The --style flag configures completion styling using LS_COLORS-style syntax, so candidates can carry colors like your directory listings do. Zsh users get the native treatment too: zstyle ':completion:*' format controls the group headers, and per-command group ordering (for example zstyle ':completion:*:git:*' group-order) rearranges git's completion groups. PowerShell users style the selection highlight with Set-PSReadLineOption -Colors @{ "Selection" = "`e[7m" }. Styling is cosmetic — set it once you have completions working, not before.
Carapace vs Inshellisense: Which Should a Beginner Pick?
Pick Carapace if you want completions inside your normal shell with one rc line; pick inshellisense if you want an IDE-style popup session you step into and out of — or use both, since the bridge consumes inshellisense specs.
| Carapace | inshellisense | |
|---|---|---|
| Model | Native-shell integration, one rc line, always on | Interactive overlay session via is; exit to leave |
| Install | Package managers or the release binary | npm install -g @microsoft/inshellisense, then is init |
| Shells | Bash, Zsh, Fish, PowerShell, Nushell, Elvish, Oil, Tcsh, Xonsh, Cmd | bash, zsh, fish, pwsh, powershell, cmd, xonsh, nushell |
| Built-in completions | 4,805 unique (measured in v1.8.2) | 600+ command line tools |
| az / gcloud / aws | Ships all three | Not supported "due to their large size" |
| License | MIT | MIT |
| Stars (snapshot 2026-11-02) | 2,009 | 10,751 |
| Best for | Always-on Tab in the shell you already use | IDE-style completion sessions |
7 Beginner Mistakes With Carapace (And the Fix)
| Mistake | Why it hurts | Fix |
|---|---|---|
| Passing a shell name on bash/zsh | carapace _carapace bash in .bashrc is the stale form | Use the shell-less source <(carapace _carapace) |
| Running legacy bash 3 | The integration snippet explicitly rejects it | Upgrade bash before integrating |
| PowerShell with the default Complete handler | Raw ANSI escape codes in the prompt | Switch to MenuComplete (docs: "required") |
| Quoting the "over 500 packages" figure | Stale — an old installer page's claim | v1.8.2 measured 4,805 unique completers |
| Expecting completions without sourcing | The rc line IS the integration | Source the line and start a new shell |
| Specs in the wrong directory | Carapace only reads ~/.config/carapace/specs/ | Put or symlink your YAML there |
| Confusing Carapace with Starship | You will "fix" your prompt forever | Starship = prompt, Carapace = Tab completion |
Sources
- carapace-sh/carapace-bin GitHub README — "A multi-shell completion binary"; supported shells; MIT license. https://github.com/carapace-sh/carapace-bin
- Carapace-bin install docs — per-platform install commands. https://carapace-sh.github.io/carapace-bin/install.html
- Carapace-bin setup docs — shell integration lines, "This registers all the available completers.", bridges. https://carapace-sh.github.io/carapace-bin/setup.html
- GitHub Releases API for carapace-sh/carapace-bin — v1.8.2, published 2026-11-01. https://api.github.com/repos/carapace-sh/carapace-bin/releases/latest
- Microsoft inshellisense README — "IDE style autocomplete for shells", 600+ tools, az/gcloud/aws note. https://github.com/microsoft/inshellisense
- x-cmd carapace-bin page — one-click install; "over 500 packages" (stale figure). https://www.x-cmd.com/pkg/carapace-bin/
- deepwiki carapace-bin command reference — shell-integration syntax table, spec/--style/--list/--diff. https://deepwiki.com/carapace-sh/carapace-bin/7.1-command-reference
- deepwiki searxng-cli shell completions — specs directory, Carapace framework usage. https://deepwiki.com/3dyuval/searxng-cli/3.6-shell-completions
- deepwiki linuxmobile/shin dotfiles wiki — CARAPACE_BRIDGES in a real config. https://deepwiki.com/linuxmobile/shin/4.4.2-shell-prompt-and-completions
- crates.io carapace-rs listing — Rust port of the completion engine. https://crates.io
- glama.ai Carapace MCP Server listing — AI-agent security server, name noise. https://glama.ai
- Author's live verification — official carapace-bin 1.8.2 binary: --version, --list count (4,805 unique), _carapace bash snippet, carapace git bash "" wire output.
Frequently Asked Questions
Is Carapace the same as Starship?
No. Starship is a prompt customizer — it draws your prompt line with the directory, git branch, and icons. Carapace is a completion engine — it decides what pressing Tab suggests. They solve different problems and work fine together.
Which shells does Carapace support?
Bash, Zsh, Fish, PowerShell, Nushell, Elvish, Oil, Xonsh, plus experimental Cmd and Tcsh. Bash and zsh use the shell-less integration form; the rest take the shell name explicitly.
Is Carapace free?
Yes. Carapace-bin is MIT-licensed, free for personal and commercial use, with the source on GitHub under carapace-sh/carapace-bin.
Can Carapace complete my own scripts and commands?
Yes. Write a YAML spec and place it in ~/.config/carapace/specs/, or point the spec subcommand at it directly. The searxng-cli pattern — symlinking a project's YAML spec into that directory — is the simplest real-world example.
Should I use Carapace or inshellisense?
They are complementary, not pure rivals. Carapace integrates into your shell's native Tab path; inshellisense opens an IDE-style overlay session. The CARAPACE_BRIDGES line lets Carapace consume inshellisense specs, so many users run Carapace as the base and bridge the rest.
