Configure Shell Completions
Enable tab completion for promptarena and packc commands in your shell. Shell completions provide intelligent suggestions for commands, flags, and even dynamic values like scenario names and providers.
Features
Section titled “Features”PromptKit’s shell completions include:
- Command and subcommand completion - Tab through available commands
- Flag completion - Complete flag names with
--prefix - Dynamic value completion - Context-aware suggestions for:
--scenario- Lists scenarios from yourconfig.arena.yaml--provider- Lists configured providers--role- Lists self-play role configurations--region- Suggests prompt regions--format- Output format options (json, junit, html, markdown)--section- Config sections forconfig-inspect--template- Available project templates forinit
Generate and Install
Section titled “Generate and Install”# Create completions directory if neededmkdir -p ~/.local/share/bash-completion/completions
# Generate completion scriptspromptarena completion bash > ~/.local/share/bash-completion/completions/promptarenapackc completion bash > ~/.local/share/bash-completion/completions/packc
# Reload your shell or source the filessource ~/.local/share/bash-completion/completions/promptarenasource ~/.local/share/bash-completion/completions/packcAlternative: System-wide Installation
Section titled “Alternative: System-wide Installation”# Requires sudosudo promptarena completion bash > /etc/bash_completion.d/promptarenasudo packc completion bash > /etc/bash_completion.d/packcAdd to .bashrc (Permanent)
Section titled “Add to .bashrc (Permanent)”Add to your ~/.bashrc:
# PromptKit completionsif command -v promptarena &> /dev/null; then source <(promptarena completion bash)fiif command -v packc &> /dev/null; then source <(packc completion bash)fiGenerate and Install
Section titled “Generate and Install”# Create completions directorymkdir -p ~/.zsh/completions
# Generate completion scriptspromptarena completion zsh > ~/.zsh/completions/_promptarenapackc completion zsh > ~/.zsh/completions/_packcAdd to .zshrc
Section titled “Add to .zshrc”Add to your ~/.zshrc (before compinit):
# Add custom completions directory to fpathfpath=(~/.zsh/completions $fpath)
# Initialize completionsautoload -Uz compinit && compinitAlternative: Oh My Zsh
Section titled “Alternative: Oh My Zsh”If using Oh My Zsh, place completions in the custom completions directory:
promptarena completion zsh > ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/promptarena/_promptarenapackc completion zsh > ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/packc/_packc# Generate completion scriptspromptarena completion fish > ~/.config/fish/completions/promptarena.fishpackc completion fish > ~/.config/fish/completions/packc.fishFish will automatically load completions from this directory.
PowerShell
Section titled “PowerShell”Generate and Load
Section titled “Generate and Load”# Generate completion scriptspromptarena completion powershell > promptarena.ps1packc completion powershell > packc.ps1
# Load completions (current session). ./promptarena.ps1. ./packc.ps1Add to Profile (Permanent)
Section titled “Add to Profile (Permanent)”Add to your PowerShell profile ($PROFILE):
# PromptKit completionspromptarena completion powershell | Out-String | Invoke-Expressionpackc completion powershell | Out-String | Invoke-ExpressionDocker
Section titled “Docker”If you’re using the demo Docker image, completions are pre-configured. For custom Docker images, add to your Dockerfile:
# Install bash-completionRUN apk add --no-cache bash-completion
# Generate and install completionsRUN mkdir -p /etc/bash_completion.d && \ promptarena completion bash > /etc/bash_completion.d/promptarena && \ packc completion bash > /etc/bash_completion.d/packc
# Source completions in bashrcRUN echo 'source /etc/profile.d/bash_completion.sh' >> /root/.bashrc && \ echo 'source /etc/bash_completion.d/promptarena' >> /root/.bashrc && \ echo 'source /etc/bash_completion.d/packc' >> /root/.bashrcUsing Completions
Section titled “Using Completions”Once configured, use Tab to complete:
# Complete commandspromptarena r<Tab> # → promptarena run
# Complete flagspromptarena run --sc<Tab> # → promptarena run --scenario
# Complete dynamic values (reads from config.arena.yaml)promptarena run --scenario <Tab># → basic-chat edge-cases multi-turn ...
promptarena run --provider <Tab># → openai anthropic google mock
promptarena config-inspect --section <Tab># → prompts providers scenarios tools selfplay judges defaults validation
promptarena init --template <Tab># → quick-start customer-support code-assistant multimodal mcp-integrationTroubleshooting
Section titled “Troubleshooting”Completions Not Working
Section titled “Completions Not Working”-
Verify the binary is in PATH:
Terminal window which promptarena -
Check completion script was generated:
Terminal window promptarena completion bash | head -20 -
Ensure bash-completion is installed:
Terminal window # macOSbrew install bash-completion@2# Ubuntu/Debianapt install bash-completion# Alpineapk add bash-completion -
Reload your shell:
Terminal window exec $SHELL
Dynamic Completions Not Showing Values
Section titled “Dynamic Completions Not Showing Values”Dynamic completions (scenarios, providers, roles) require a valid config.arena.yaml in the current directory or parent directories. If no config is found, completions will return empty results.
# Check if config is foundcd /path/to/your/projectls config.arena.yaml
# Test completionpromptarena __complete run --scenario ""See Also
Section titled “See Also”- Install PromptArena - Installation options
- CLI Commands Reference - Full command documentation