Skip to main content
With command completion, you type the first letters of a command and press the Tab key. The shell completes the command or shows a list of suggestions. If you installed the Algolia CLI with Homebrew and set up shell completion for Homebrew, command completion for the Algolia CLI already works. Otherwise, follow the instructions for your shell.

Set up completion in Bash

Command completion depends on the bash-completion package. If you don’t have this package, install it with your package manager. For example, with Homebrew, run:
To enable completion in the current session, run:
To enable completion for every new session, run:
To use completion, start a new Bash session.

Set up completion in Zsh

If you haven’t enabled completion in Zsh, run this command to add compinit to your .zshrc file:
To enable completion in the current session, run:
To enable completion for every new session, run:
To use completion, start a new Zsh session. To keep the completion script in your home directory instead, save it to a directory such as ~/.local/share/zsh/site-functions. Then add fpath=(~/.local/share/zsh/site-functions $fpath) to your .zshrc file, before the compinit line.

Set up completion in Fish

To enable completion in the current session, run:
To enable completion for every new session, run:
To use completion, start a new Fish session.

Set up completion in PowerShell

To enable completion in the current session, run:
To enable completion for every new session, add the previous command to your PowerShell profile.
Last modified on November 20, 2026