Skip to main content
Shell completion enables tab-based autocompletion for cpln commands, subcommands, and flags in your terminal. Press Tab to autocomplete commands, discover available subcommands, and fill in flag names.

Supported shells

ShellSupported
BashYes
ZshYes
FishYes

What gets completed

Shell completion supports the following:
cpln workload <Tab> shows available subcommands like get, create, delete.
cpln workload <Tab>
# get  create  delete  update  patch  ...
cpln workload get --<Tab> shows available flags like --org, --gvc, --output.
cpln workload get --<Tab>
# --org  --gvc  --output  --max  --verbose  ...
cpln workload get --profile <Tab> lists your configured profiles.
cpln workload get --profile <Tab>
# default  staging  production  ...
cpln workload get --endpoint <Tab> suggests the API endpoint URL.
cpln workload get --endpoint <Tab>
# https://api.cpln.io
cpln apply --file <Tab> triggers native file path completion.
cpln apply --file <Tab>
# workload.yaml  gvc.yaml  secrets/  ...

Install completion

Run the following command to install shell completion:
cpln misc install-completion
By default, this runs in interactive mode and prompts you to select your shell. After installation, restart your terminal for the changes to take effect.

Options

FlagAliasDescription
--shellSpecify the shell to install completion for (bash, zsh, or fish)
--batch-bRun in non-interactive (batch) mode, skipping prompts

Non-interactive installation

Use --batch and --shell together to skip the interactive prompts:
cpln misc install-completion --batch --shell bash
After installing completion, restart your terminal or source your shell profile for the changes to take effect.
When installing completion for Zsh, compinit is automatically configured in ~/.zshrc if it is not already present. This is required for Zsh’s completion system to work and is left in place during uninstallation since other tools may depend on it.

Uninstall completion

To remove shell completion from your profile:
cpln misc uninstall-completion

Troubleshooting

Problem: Tab completion doesn’t work after running install-completion.Solutions:
  1. Restart your terminal or source your shell profile:
    source ~/.bashrc
    
  2. Verify the CLI is on your PATH:
    which cpln
    
  3. Reinstall completion:
    cpln misc uninstall-completion
    cpln misc install-completion
    
Problem: Completion installation fails on a Mac with Apple Silicon.Solution: Install Rosetta, then retry:
softwareupdate --install-rosetta
cpln misc install-completion
Problem: Tab completion doesn’t include recently added commands or flags.Solution: Reinstall completion after updating the CLI:
cpln misc uninstall-completion
cpln misc install-completion

Command reference