Automatically sync shell completions for tools managed by mise.
mise use -g github:alltuner/mise-completions-syncOr download from releases, or build from source with cargo install --git https://github.com/alltuner/mise-completions-sync.
Add the completions directory to your shell config.
ZSH - add to ~/.zshrc before compinit:
fpath=(${XDG_DATA_HOME:-$HOME/.local/share}/mise-completions/zsh $fpath)Bash - add to ~/.bashrc:
for f in ${XDG_DATA_HOME:-$HOME/.local/share}/mise-completions/bash/*; do
[[ -f "$f" ]] && source "$f"
doneFish - add to ~/.config/fish/config.fish:
set -gx fish_complete_path $fish_complete_path ~/.local/share/mise-completions/fish# Sync completions for all installed tools
mise-completions-sync
# Sync only for specific shell
mise-completions-sync --shell zsh
# Sync specific tools
mise-completions-sync kubectl helm
# List supported tools
mise-completions-sync list
# Clean up completions for uninstalled tools
mise-completions-sync cleanTo update to the latest version:
mise upgrade github:alltuner/mise-completions-syncOr to pin a specific version:
mise use -g github:alltuner/mise-completions-sync@0.3.0Set up a mise hook to sync completions when tools are installed:
mkdir -p ~/.config/mise && cat >> ~/.config/mise/config.toml << 'EOF'
[hooks]
postinstall = "mise-completions-sync"
EOFSee the full documentation for supported tools and more details.
MIT
Built at All Tuner Labs by David Poblador i Garcia