Enable Autocompletion

Set up shell completions for faster workflows

The Aperture CLI supports tab completion for Bash, Zsh, Fish, PowerShell, and Elvish. Setting up completions makes working with the CLI faster and helps you discover available commands and options.

Bash

Create the completions directory and generate the completion script:

$ mkdir -p ~/.local/share/bash-completion/completions
$ aperture completions bash > ~/.local/share/bash-completion/completions/aperture

Add to your ~/.bashrc:

~/.bashrc
source ~/.local/share/bash-completion/completions/aperture

Then reload your shell:

$ source ~/.bashrc

Zsh

Create the completions directory and generate the completion script:

$ mkdir -p ~/.zfunc
$ aperture completions zsh > ~/.zfunc/_aperture

Add to your ~/.zshrc:

~/.zshrc
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Then reload your shell:

$ source ~/.zshrc

Verifying Completions

After setting up completions, test them by typing aperture and pressing Tab. You should see available subcommands like auth, build, context, project, and spar.

$ aperture <TAB>
auth build completions context project spar

You can also complete subcommands and options:

$ aperture auth <TAB>
login logout refresh status token whoami
$ aperture build upload --<TAB>
--commit-sha --metadata --source-type --tag --verify-key --version --web-app-id