Get Started
Install via Homebrew, Cargo, mise, or grab a prebuilt binary:
The installed binary is named misecompsync (mise reserves mise-* names for itself, so the shim can't forward to a binary that starts with mise-).
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
# Sync only for a specific shell
# Sync specific tools
# List supported tools
# Clean up completions for uninstalled tools
# Print misecompsync's own completions to stdout
Additional Flags
By default, completions are synced for every installed tool. You can narrow the set with
the following scope flags that mise ls accepts — they're passed straight through:
# Only tools in global mise config files
# Only tools in local (project) mise config files
# Only tools currently in mise config files (not just with `mise install`)
--globaland--localare mutually exclusive (same asmise ls)- Scope flags also apply to
clean— caution:misecompsync --global cleanwould remove completions for tools not in the global config, which may include locally-installed tools if they both use the sameMISE_COMPLETIONS_SYNC_HOME. - Scope flags conflict with explicit tool args and
--new-only
Automatic sync
Wire it into a mise post-install hook so new tool installs get completions automatically:
&&
Custom Output Dirs
By default, completions are synced to $XDG_DATA_HOME/mise-completions/<shell>. However, you can override the output directories using environment variables:
# Override default base output directory
export MISE_COMPLETIONS_SYNC_HOME="$XDG_DATA_HOME/custom-vendor-completions"
Or you can override output targets on a per-shell basis (these take precedence over the base override above):
# Bash completions to standard bash location
export MISE_COMPLETIONS_SYNC_BASH_DIR="$XDG_DATA_HOME/bash-completion/completions"
# ZSH completions to standard zsh location
export MISE_COMPLETIONS_SYNC_ZSH_DIR="$XDG_DATA_HOME/zsh/site-functions"
# Fish completions to standard fish locations.
# (pick one or the other, both are autoloaded by fish)
# export MISE_COMPLETIONS_SYNC_FISH_DIR="$XDG_CONFIG_HOME/fish/completions"
export MISE_COMPLETIONS_SYNC_FISH_DIR="$XDG_DATA_HOME/fish/vendor_completions.d"
Note: Target directories will be created if they don't already exist. Don't forget to update your shell setup above.
If you want to only generate completions for newly installed or updated tools, you can add the flag --new-only:
[]
= "misecompsync --new-only"
Custom Registry
The list of supported tools is built into the binary, but you don't have to wait
for a release (or send a PR) to add your own. Drop a registry.toml at
$XDG_DATA_HOME/mise-completions-sync/registry.toml, or next to the
misecompsync executable, and it is laid on top of the built-in registry:
= 1
[]
# a tool the built-in registry doesn't cover
= { = "gt completion zsh", = "gt completion bash" }
# built-in patterns are available to your own entries
= "standard"
# override a built-in entry
= { = "yq shell-completion zsh" }
Your entries are merged with the built-in ones rather than replacing them, so a
short file like the above adds graphite-cli and mytool and changes yq,
while every other tool keeps working. schema_version is required.
If an entry turns out to be generally useful, open a PR so everyone gets it.
Updating
# Homebrew
# Cargo
# mise
# Pin a specific version with mise
Documentation
Full docs at mise-completions.alltuner.com — supported tools, completion details, and troubleshooting.
License
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.