completion
The completion commands print a completion script that makes your shell complete kinstactl commands, flags, site names and environment names.
kinstactl completion zsh > "${fpath[1]}/_kinstactl"eval "$(kinstactl completion bash)"kinstactl completion fish > ~/.config/fish/completions/kinstactl.fishEach 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.
completion zsh
Section titled “completion zsh”Print the zsh completion script.
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.
completion bash
Section titled “completion bash”Print the bash completion script.
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.
completion fish
Section titled “completion fish”Print the fish completion script.
kinstactl completion fish > ~/.config/fish/completions/kinstactl.fishkinstactl 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.
completion sites
Section titled “completion sites”Print the site names for shell completion.
kinstactl completion siteskinstactl 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.
completion envs
Section titled “completion envs”Print the environment names of a site for shell completion.
kinstactl completion envs my-sitekinstactl completion envs [site] [options]Print the environment names of a site for shell completion
Arguments
| Argument | Description |
|---|---|
site | site 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.