gb completion
Generate shell completions for the CLI.
Synopsis
gb completion <shell> [options]Description
Generates shell completion scripts for tab completion of Genbox commands, options, and arguments.
Arguments
| Argument | Description |
|---|---|
shell | Shell type: bash, zsh, or fish |
Options
| Option | Description |
|---|---|
--install | Automatically install completions |
Examples
Install Completions
# Bash
gb completion bash --install
# Zsh
gb completion zsh --install
# Fish
gb completion fish --installManual Installation
# Generate and save
gb completion bash > ~/.genbox-completion.bash
echo 'source ~/.genbox-completion.bash' >> ~/.bashrcShell-Specific Instructions
Bash
# One-time install
gb completion bash --install
# Manual
gb completion bash >> ~/.bashrc
source ~/.bashrcZsh
# One-time install
gb completion zsh --install
# Manual
gb completion zsh > ~/.zsh/completion/_genbox
echo 'fpath=(~/.zsh/completion $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
source ~/.zshrcFish
# One-time install
gb completion fish --install
# Manual
gb completion fish > ~/.config/fish/completions/genbox.fishWhat Gets Completed
- Command names (
gb cre<tab>→gb create) - Subcommands (
gb db <tab>→sync,restore) - Options (
gb create --<tab>→--profile,--size, etc.) - Environment names (
gb connect <tab>→ lists your environments) - Profile names (
gb create --profile <tab>→ lists profiles) - App names (
gb push --app <tab>→ lists apps)
Example Usage
$ gb cre<TAB>
$ gb create
$ gb create --pro<TAB>
$ gb create --profile
$ gb create --profile <TAB>
admin-quick api-only full-stack
$ gb connect <TAB>
feature-auth bugfix-login experiment
$ gb destroy feature<TAB>
$ gb destroy feature-authNotes
- Restart shell or source config after install
- Dynamic completions require API access
- Completions update with CLI updates
--installmodifies shell config files
See Also
Last updated on