[READ-ONLY] Mirror of https://github.com/bombshell-dev/tab. shell autocompletions for javascript CLIs
4

Configure Feed

Select the types of activity you want to include in your feed.

chore(docs): add dev workflow section

AmirSa12 (Jul 10, 2026, 11:58 PM +0400) b02adb5d e01ce053

+38
+38
README.md
··· 134 134 echo 'source ~/.my-cli-completion.zsh' >> ~/.zshrc 135 135 ``` 136 136 137 + ### Development Workflow 138 + 139 + Generated completion scripts invoke your CLI by its **program name** (e.g. `my-cli`), 140 + which the shell resolves via `PATH`, an alias, or a shell function. During local 141 + development your CLI usually isn't installed on `PATH`, so define a session-scoped 142 + shell function that runs it from source, then source the completions. No build, 143 + no install, and no `PATH` changes are needed — the function disappears when you 144 + close the terminal. 145 + 146 + Replace `my-cli` with your program name and adjust the source path if needed. 147 + 148 + ```zsh 149 + # zsh 150 + my-cli() { pnpm tsx src/index.ts "$@"; } 151 + source <(my-cli complete zsh) 152 + ``` 153 + 154 + ```bash 155 + # bash 156 + my-cli() { pnpm tsx src/index.ts "$@"; } 157 + source <(my-cli complete bash) 158 + ``` 159 + 160 + ```fish 161 + # fish 162 + function my-cli; pnpm tsx src/index.ts $argv; end 163 + source (my-cli complete fish | psub) 164 + ``` 165 + 166 + ```powershell 167 + # powershell 168 + function my-cli { pnpm tsx src/index.ts $args } 169 + my-cli complete powershell | Out-String | Invoke-Expression 170 + ``` 171 + 172 + The function name must match your CLI's program name so the shell resolves the 173 + completion callback back to it. 174 + 137 175 ## Package Manager Completions 138 176 139 177 As mentioned earlier, tab provides completions for package managers as well: