Skip to content

completion

The completion commands print a completion script that makes your shell complete kinstactl commands, flags, site names and environment names.

Terminal window
kinstactl completion zsh > "${fpath[1]}/_kinstactl"
eval "$(kinstactl completion bash)"
kinstactl completion fish > ~/.config/fish/completions/kinstactl.fish

Each command prints the script of one shell to stdout, so you install it by redirecting the output to the place your shell loads completions from, or by evaluating it. With --json the command prints an object with the shell and the script. Site and environment names come from the site cache; see Sites and environments.

Print the zsh completion script.

Terminal window
kinstactl completion zsh > "${fpath[1]}/_kinstactl"
kinstactl completion zsh [options]

Print the zsh completion script

This writes the script to the first directory in your fpath, under the name _kinstactl that zsh looks for. Start a new shell to load it.

Print the bash completion script.

Terminal window
eval "$(kinstactl completion bash)"
kinstactl completion bash [options]

Print the bash completion script

Put the eval line in your ~/.bashrc to load the script in every shell.

Print the fish completion script.

Terminal window
kinstactl completion fish > ~/.config/fish/completions/kinstactl.fish
kinstactl completion fish [options]

Print the fish completion script

Fish loads every file in ~/.config/fish/completions, so the script is active in the next shell you start.

Print the site names for shell completion.

Terminal window
kinstactl completion sites
kinstactl completion sites [options]

Print the site names for shell completion

Kinsta API: GET /sites

A helper that the completion scripts call to complete a <site> argument; you do not run it yourself. It prints one site name per line from the site cache, and fetches the list from Kinsta only when the cache has expired.

Print the environment names of a site for shell completion.

Terminal window
kinstactl completion envs my-site
kinstactl completion envs [site] [options]

Print the environment names of a site for shell completion

Arguments

ArgumentDescription
sitesite name or ID

Kinsta API: GET /sites

A helper that the completion scripts call to complete --env; you do not run it yourself. It prints one environment name of the site per line, from the site cache, and never opens the site picker.