Skip to content

alltuner/mise-completions-sync

Repository files navigation

mise-completions-sync

Sync shell completions for tools managed by mise.
One command keeps Bash, Zsh, and Fish completions current as mise installs and removes tools.

Docs · Sponsor

crates.io License Stars


Get Started

Install via Homebrew, Cargo, mise, or grab a prebuilt binary:

brew install alltuner/tap/mise-completions-sync
cargo install mise-completions-sync
mise use -g github:alltuner/mise-completions-sync

Then add the completions directory to your shell config:

Shell Where to add Snippet
Zsh ~/.zshrc (before compinit) fpath=(${XDG_DATA_HOME:-$HOME/.local/share}/mise-completions/zsh $fpath)
Bash ~/.bashrc for f in ${XDG_DATA_HOME:-$HOME/.local/share}/mise-completions/bash/*; do [[ -f "$f" ]] && source "$f"; done
Fish ~/.config/fish/config.fish set -gx fish_complete_path $fish_complete_path ~/.local/share/mise-completions/fish

What is mise-completions-sync?

mise installs language and tool versions per project, but it doesn't touch your shell completion files. As versions change, completions get stale or missing. mise-completions-sync walks your installed mise tools, generates the right completion file for each one (Bash, Zsh, Fish), and writes them under ${XDG_DATA_HOME:-$HOME/.local/share}/mise-completions/<shell>/. Run it once after installing tools, or wire it into a mise post-install hook.

Usage

# Sync completions for all installed tools
mise-completions-sync

# Sync only for a 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 clean

Automatic sync

Wire it into a mise post-install hook so new tool installs get completions automatically:

mkdir -p ~/.config/mise && cat >> ~/.config/mise/config.toml << 'EOF'

[hooks]
postinstall = "mise-completions-sync"
EOF

Updating

# Homebrew
brew upgrade mise-completions-sync

# Cargo
cargo install --force mise-completions-sync

# mise
mise upgrade github:alltuner/mise-completions-sync

# Pin a specific version with mise
mise use -g github:alltuner/mise-completions-sync@0.5.1

Documentation

Full docs at alltuner.github.io/mise-completions-sync — supported tools, completion details, and troubleshooting.

License

MIT

Support the project

mise-completions-sync is an open source project built by David Poblador i Garcia through All Tuner Labs.

If this project was useful to you, consider supporting its development.


Built by David Poblador i Garcia with the support of All Tuner Labs.
Made with ❤️ in Poblenou, Barcelona.

About

Automatically sync shell completions for tools managed by mise

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors