Skip to main content
Version: Latest

Shell Completion

vllm-sr completion generates and installs tab completion for the CLI. Completion covers command names, subcommands, and options — including the recipe and benchmark command groups — so the CLI can be driven without memorizing flag names.

Completion is generated by the CLI itself and installed per shell. Set it up after the CLI is on your PATH; the installation guide in this section covers getting the CLI there.

Install​

vllm-sr completion install

With no argument the shell is detected from the SHELL environment variable. Pass a shell name to install for one explicitly:

vllm-sr completion install zsh

Supported shells are bash, zsh, and fish. What the install does depends on the shell:

ShellActionLocation
bashAppends an eval line~/.bashrc
zshAppends an eval line~/.zshrc
fishWrites the completion script~/.config/fish/completions/vllm-sr.fish

The bash and zsh entries evaluate vllm-sr completion show at shell start, so they track CLI upgrades automatically: every new shell builds completion from the installed CLI version, and no action is needed after an upgrade. The fish entry is a static file written once — re-run vllm-sr completion install fish after upgrading the CLI to refresh it.

Installing is safe to repeat. The bash and zsh installs write a # vllm-sr shell completion marker into the rc file and skip it when the marker is already present, so repeated runs do not append duplicate lines.

To wire completion yourself, or to inspect what an install would add, print the script and handle it with your own tooling:

vllm-sr completion show fish

The same shell detection applies: vllm-sr completion show without an argument resolves the shell from SHELL.

Troubleshooting​

Could not detect shell. Please specify one of: bash, zsh, fish — the SHELL value does not match a supported shell. Pass the shell explicitly: vllm-sr completion install bash.

Completion does not appear after installing — open a new shell, or re-source the rc file (source ~/.bashrc or source ~/.zshrc). For fish, completions load from the completions directory on the next shell start.