Weld provides tab completion for commands, options, and arguments. Completions are context-aware—they suggest relevant files, flag values, and subcommands based on what you've typed.
Completions are installed automatically on first run of any weld command. You'll see a one-time message:
Shell completions installed. Restart your shell or run: source ~/.bashrc
After restarting your shell (or sourcing the config file), completions will work immediately. No additional setup required for bash, zsh, or fish.
If automatic installation didn't work, you prefer manual control, or you're using PowerShell, use one of the methods below.
The simplest manual method:
weld --install-completionThis auto-detects your shell and installs the completion script to the appropriate location. Restart your shell or source your config file to activate.
Option 1: User-level installation
# Generate completion script
weld --show-completion > ~/.weld-complete.bash
# Add to ~/.bashrc
echo 'source ~/.weld-complete.bash' >> ~/.bashrc
# Reload
source ~/.bashrcOption 2: System-wide installation (Linux)
# Requires sudo
weld --show-completion | sudo tee /etc/bash_completion.d/weld > /dev/null
# Reload bash
source /etc/bash_completion.d/weldmacOS with Homebrew
# Ensure bash-completion is installed
brew install bash-completion@2
# Install weld completion
weld --show-completion > $(brew --prefix)/etc/bash_completion.d/weld
# Reload
source ~/.bashrcOption 1: User-level installation
# Generate completion script
weld --show-completion > ~/.weld-complete.zsh
# Add to ~/.zshrc
echo 'source ~/.weld-complete.zsh' >> ~/.zshrc
# Reload
source ~/.zshrcOption 2: Using fpath (recommended for zsh)
# Create completions directory if needed
mkdir -p ~/.zfunc
# Generate completion
weld --show-completion > ~/.zfunc/_weld
# Add to ~/.zshrc (before compinit)
echo 'fpath=(~/.zfunc $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
# Reload
source ~/.zshrcOh My Zsh
# Install to Oh My Zsh completions
weld --show-completion > ~/.oh-my-zsh/completions/_weld
# Reload
source ~/.zshrc# Create completions directory if needed
mkdir -p ~/.config/fish/completions
# Generate completion
weld --show-completion > ~/.config/fish/completions/weld.fish
# Fish auto-loads from completions directory - no reload needed
# Or manually reload:
source ~/.config/fish/completions/weld.fishWindows PowerShell
# Show your profile path
echo $PROFILE
# Generate and append completion to profile
weld --show-completion >> $PROFILE
# Reload profile
. $PROFILEPowerShell Core (Cross-platform)
# Create profile directory if needed
New-Item -Path (Split-Path $PROFILE) -ItemType Directory -Force
# Generate completion
weld --show-completion | Out-File -Append -FilePath $PROFILE
# Reload
. $PROFILEWeld completions include:
| Context | Completions |
|---|---|
| Commands | weld <TAB> → init, plan, implement, commit, etc. |
| Subcommands | weld prompt <TAB> → list, show, export |
| Flags | weld plan --<TAB> → --output, --focus, --provider, etc. |
| Flag values | weld plan --provider <TAB> → claude, codex |
| File arguments | weld plan <TAB> → *.md files |
| Task types | weld prompt show <TAB> → discover, research, plan_generation, etc. |
- Restart your terminal - Most shells don't reload config automatically
- Check the source line - Ensure your shell config actually sources the completion file
- Verify the file exists -
ls -la ~/.weld-complete.*or check the path used
The completion script calls weld to generate completions. Ensure weld is in your PATH:
which weld
# Should output: /path/to/weldIf weld was installed with uv tool or pipx, ensure the tool bin directory is in PATH:
# uv
export PATH="$HOME/.local/bin:$PATH"
# pipx
export PATH="$HOME/.local/bin:$PATH"Completions run weld each time to generate context-aware suggestions. If this is slow:
- Check if weld startup is slow:
time weld --help - Ensure you're not running weld from a network drive
- On Windows, antivirus can slow Python startup
The completion system isn't initialized. Add to ~/.zshrc before sourcing completions:
autoload -Uz compinit && compinitZsh may warn about insecure completion directories. Fix permissions:
chmod 755 ~/.zfunc
chmod 644 ~/.zfunc/_weld
compaudit | xargs chmod g-wOr disable the check (not recommended):
# Add to ~/.zshrc before compinit
ZSH_DISABLE_COMPFIX=trueFish should auto-load from ~/.config/fish/completions/. If not:
- Check file exists:
ls ~/.config/fish/completions/weld.fish - Check for syntax errors:
fish -c "source ~/.config/fish/completions/weld.fish" - Clear completion cache:
rm -rf ~/.cache/fish/completions
Enable script execution:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSignedAfter upgrading weld, regenerate completions to pick up new commands:
weld --install-completion
# Or regenerate manually using the steps aboveRemove the completion script and source line from your shell config:
Bash/Zsh:
rm ~/.weld-complete.*
# Edit ~/.bashrc or ~/.zshrc to remove the source lineFish:
rm ~/.config/fish/completions/weld.fishPowerShell:
# Edit $PROFILE to remove weld completion lines
notepad $PROFILE