██████╗ ██████╗ ███╗ ███╗███████╗████████╗███████╗███╗ ██╗████████╗███████╗
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚══██╔══╝██╔════╝████╗ ██║╚══██╔══╝██╔════╝
██║ ██║ ██║██╔████╔██║█████╗ ██║ █████╗ ██╔██╗ ██║ ██║ █████╗
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██╔══╝ ██║╚██╗██║ ██║ ██╔══╝
╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║ ███████╗██║ ╚████║ ██║ ███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
One small function. Fifteen shells. Zero startup tax.
Tired of Googling "how to enable tab completion in yet another shell" every time you switch terminals? Same. So
completerbundles the native completion glue for every shell in one lazy, modular place — then gets out of your way.
This is not a CLI you install. Not a binary. Not a daemon that eats your RAM for breakfast. It's a shell function per shell, written in that shell's own native language, that generates completions from any program and wires them into your config — only when you ask it to.
Who is this for?
completeris built for command-line tools that expose a completion keyword in their subcommands — e.g.<program> completion,<program> completions, or a--generate-completion/--completionsflag (thinkopencode completion,gh completion,docker completion). It calls that keyword, captures the program's own completion script, and wires it into your shell using only native APIs. Programs without such a keyword still work through acarapace <program> <shell>fallback, with a small built-in native spec for known exceptions (e.g.opencodeon Nushell/Xonsh).
- 🧠 Native-only. Every shell uses its own documented API. No cross-shell hacks,
no
evalsoup, no wrapper executable. - ⚡ Zero startup cost. Sourcing the file only defines functions. No probing,
no
carapace/zoxidecalls, no file writes at load. Your shell opens exactly as fast as it did before. - 🧩 Modular by design. Your main config keeps one guarded source line.
Everything else lives in a sibling
completer/folder next to it. - 🛡️ Re-run safe. Existing files are backed up to
.bak.<timestamp>; generated blocks are marker-wrapped and replaced, never duplicated. Idempotent or bust. - 🔌 Plugs into carapace & zoxide.
completer update carapacerefreshes the index using carapace's own CLI;completer zoxideemits nativecdinit. Next shell launch, it just works. - 🤖 Self-aware.
completercompletes its own subcommands, shell names, and aliases. (A completion tool that can't complete itself? What's the point.)
| Shell | File | Shell | File |
|---|---|---|---|
PowerShell 7+ (pwsh) |
completer.ps1 |
Elvish | completer.elv |
| Windows PowerShell 5.1 | completer.ps1 |
Cmd (cmd.exe + clink) |
completer.cmd.l |
| Bash | completer.bash |
Tcsh / csh | completer.tcsh |
| Zsh | completer.zsh |
Ksh (ksh93 / mksh) | completer.ksh |
| Fish | completer.fish |
Ion | completer.ion |
| POSIX sh | completer.sh |
Oil (osh / ysh) |
completer.oil |
| Nushell | completer.nu |
Yash | completer.yash |
| Xonsh | completer.xsh |
Carapace | the engine, not a target |
Set the raw base once, then pipe the installer. It detects your OS + config file, asks permission, backs up, writes the new function file, and adds one guarded source line. (Yes, it's polite.)
PowerShell (7+ / 5.1):
$env:COMPLETER_RAW_BASE = 'https://raw.githubusercontent.com/HKDevLoops/completer/main'
iwr "$env:COMPLETER_RAW_BASE/install.ps1" | iex
# Windows PowerShell 5.1: irm "$env:COMPLETER_RAW_BASE/install.ps1" | iexbash / zsh / fish / sh:
export COMPLETER_RAW_BASE=https://raw.githubusercontent.com/HKDevLoops/completer/main
curl -fsSL "$COMPLETER_RAW_BASE/install.sh" | sh -s bash # or zsh | fish | shPrefer local? sh ./install.sh or . .\install.ps1 from the repo root works too.
completer bash opencode gh docker # ask any CLI for its completions
completer pwsh # target one shell (defaults to opencode)
completer update carapace # refresh carapace's completion index
completer zoxide # native zoxide `cd` init
completer alias add gs 'git status' # append an alias to alias.<ext>
completer alias remove gs # ...and take it back out
completer list # show what's been generatedCompletion sources, in order: the program's own flags
(completion --shell, --completions, …) → carapace <prog> <shell> → a built-in
native spec for shells a tool can't target directly (looking at you, opencode on
nu/xonsh).
Link modes: Source (default — one guarded source line) or -LinkMode Symlink
(for the symlink-inclined). -NoLink generates without touching your config.
<config-dir>/<shell config file> ──(one guarded block)──▶ completer/
│
├─ TAB fix (lazy carapace)
├─ sources completer.<ext>
└─ self-completion hook
│
▼
completions/<shell>-<prog>-completion.<ext>
▲
generated on demand, backed up, marker-wrapped
Nothing runs until you call completer. Promise. 🤞
completer.<ext> # 14 native function files (15 shell targets)
install.ps1 / install.sh # simple, curl/iwr-friendly linkers
alias.<ext> # per-shell alias stores (append/remove methods)
tests/run-tests.sh # structural + native-parser test harness
.github/workflows/ci.yml # GitHub Actions: ubuntu + windows
research/ # official-doc studies behind each native API
agents/ # role / skill / spec files used to build this
DIAGNOSIS.md # why TAB completion was "broken" and how it's fixed
PLAN.md # the build plan
LICENSE # MIT
bash tests/run-tests.shRuns structural checks (files, entrypoints, no compiled binaries) plus native
parsers for whichever shells are installed (bash -n, sh -n, PowerShell parser,
nu, xonsh). CI runs the same harness on both Ubuntu and Windows. All green. ✅
MIT — do whatever you want, just keep the notice. See LICENSE.
Copyright © 2026 harish2222 (HKDEVS). Built with native shell glue and a mild allergy to startup lag.