mise/docs/mise.usage.kdl

1322 lines
53 KiB
Plaintext

name "mise"
bin "mise"
about "The front-end to your dev env"
long_about r"mise is a tool for managing runtime versions. https://github.com/jdx/mise
It's a replacement for tools like nvm, nodenv, rbenv, rvm, chruby, pyenv, etc.
that works for any language. It's also great for managing linters/tools like
jq and shellcheck.
It is inspired by asdf and uses asdf's plugin ecosystem under the hood:
https://asdf-vm.com/"
usage "Usage: mise [OPTIONS] <COMMAND>"
flag "-C --cd" help="Change directory before running command" global=true {
arg "<DIR>"
}
flag "--debug" help="Sets log level to debug" hide=true global=true
flag "--log-level" help="Set the log output verbosity" hide=true global=true {
arg "<LEVEL>"
}
flag "-q --quiet" help="Suppress non-error messages" global=true
flag "--trace" help="Sets log level to trace" hide=true global=true
flag "-v --verbose" help="Show extra output (use -vv for even more)" var=true global=true count=true
flag "-y --yes" help="Answer yes to all confirmation prompts" global=true
cmd "activate" help="Initializes mise in the current shell session" {
long_help r#"Initializes mise in the current shell session
This should go into your shell's rc file.
Otherwise, it will only take effect in the current session.
(e.g. ~/.zshrc, ~/.bashrc)
This is only intended to be used in interactive sessions, not scripts.
mise is only capable of updating PATH when the prompt is displayed to the user.
For non-interactive use-cases, use shims instead.
Typically this can be added with something like the following:
echo 'eval "$(mise activate)"' >> ~/.zshrc
However, this requires that "mise" is in your PATH. If it is not, you need to
specify the full path like this:
echo 'eval "$(/path/to/mise activate)"' >> ~/.zshrc
Customize status output with `status` settings."#
after_long_help r#"Examples:
$ eval "$(mise activate bash)"
$ eval "$(mise activate zsh)"
$ mise activate fish | source
$ execx($(mise activate xonsh))
"#
flag "-s --shell" help="Shell type to generate the script for" hide=true {
arg "<SHELL>"
}
flag "--status" help="Show \"mise: <PLUGIN>@<VERSION>\" message when changing directories" hide=true
flag "--shims" help="Use shims instead of modifying PATH\nEffectively the same as:\n PATH=\"$HOME/.local/share/mise/shims:$PATH\""
flag "-q --quiet" help="Suppress non-error messages"
arg "[SHELL_TYPE]" help="Shell type to generate the script for"
}
cmd "alias" help="Manage aliases" {
alias "a"
alias "aliases" hide=true
flag "-p --plugin" help="filter aliases by plugin" {
arg "<PLUGIN>"
}
flag "--no-header" help="Don't show table header"
cmd "get" help="Show an alias for a plugin" {
long_help r"Show an alias for a plugin
This is the contents of an alias.<PLUGIN> entry in ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias get node lts-hydrogen
20.0.0
"
arg "<PLUGIN>" help="The plugin to show the alias for"
arg "<ALIAS>" help="The alias to show"
}
cmd "ls" help="List aliases\nShows the aliases that can be specified.\nThese can come from user config or from plugins in `bin/list-aliases`." {
alias "list"
long_help r#"List aliases
Shows the aliases that can be specified.
These can come from user config or from plugins in `bin/list-aliases`.
For user config, aliases are defined like the following in `~/.config/mise/config.toml`:
[alias.node.versions]
lts = "20.0.0""#
after_long_help r"Examples:
$ mise aliases
node lts-hydrogen 20.0.0
"
flag "--no-header" help="Don't show table header"
arg "[PLUGIN]" help="Show aliases for <PLUGIN>"
}
cmd "set" help="Add/update an alias for a plugin" {
alias "add" "create"
long_help r"Add/update an alias for a plugin
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias set node lts-hydrogen 18.0.0
"
arg "<PLUGIN>" help="The plugin to set the alias for"
arg "<ALIAS>" help="The alias to set"
arg "<VALUE>" help="The value to set the alias to"
}
cmd "unset" help="Clears an alias for a plugin" {
alias "rm" "remove" "delete" "del"
long_help r"Clears an alias for a plugin
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise alias unset node lts-hydrogen
"
arg "<PLUGIN>" help="The plugin to remove the alias from"
arg "<ALIAS>" help="The alias to remove"
}
}
cmd "asdf" hide=true help="[internal] simulates asdf for plugins that call \"asdf\" internally" {
arg "[ARGS]..." help="all arguments" var=true
}
cmd "backends" help="Manage backends" {
alias "b"
alias "backend" "backend-list" hide=true
cmd "ls" help="List built-in backends" {
alias "list"
after_long_help r"Examples:
$ mise backends ls
cargo
go
npm
pipx
spm
ubi
"
}
}
cmd "bin-paths" help="List all the active runtime bin paths"
cmd "cache" help="Manage the mise cache" {
long_help r"Manage the mise cache
Run `mise cache` with no args to view the current cache directory."
cmd "clear" help="Deletes all cache files in mise" {
alias "c"
alias "clean" hide=true
arg "[PLUGIN]..." help="Plugin(s) to clear cache for e.g.: node, python" var=true
}
}
cmd "completion" help="Generate shell completions" {
alias "complete" "completions" hide=true
after_long_help r"Examples:
$ mise completion bash > /etc/bash_completion.d/mise
$ mise completion zsh > /usr/local/share/zsh/site-functions/_mise
$ mise completion fish > ~/.config/fish/completions/mise.fish
"
flag "-s --shell" help="Shell type to generate completions for" hide=true {
arg "<SHELL_TYPE>"
}
flag "--usage" help="Always use usage for completions.\nCurrently, usage is the default for fish and bash but not zsh since it has a few quirks\nto work out first." hide=true {
long_help "Always use usage for completions.\nCurrently, usage is the default for fish and bash but not zsh since it has a few quirks\nto work out first.\n\nThis requires the `usage` CLI to be installed.\nhttps://usage.jdx.dev"
}
arg "[SHELL]" help="Shell type to generate completions for"
}
cmd "config" help="[experimental] Manage config files" {
alias "cfg"
flag "--no-header" help="Do not print table header"
cmd "ls" help="[experimental] List config files currently in use" {
after_long_help r"Examples:
$ mise config ls
"
flag "--no-header" help="Do not print table header"
}
cmd "generate" help="[experimental] Generate a .mise.toml file" {
alias "g"
after_long_help r"Examples:
$ mise cf generate > .mise.toml
$ mise cf generate --output=.mise.toml
"
flag "-o --output" help="Output to file instead of stdout" {
arg "<OUTPUT>"
}
}
}
cmd "current" help="Shows current active and installed runtime versions" {
long_help r"Shows current active and installed runtime versions
This is similar to `mise ls --current`, but this only shows the runtime
and/or version. It's designed to fit into scripts more easily."
after_long_help r"Examples:
# outputs `.tool-versions` compatible format
$ mise current
python 3.11.0 3.10.0
shfmt 3.6.0
shellcheck 0.9.0
node 20.0.0
$ mise current node
20.0.0
# can output multiple versions
$ mise current python
3.11.0 3.10.0
"
arg "[PLUGIN]" help="Plugin to show versions of e.g.: ruby, node, cargo:eza, npm:prettier, etc"
}
cmd "deactivate" help="Disable mise for current shell session" {
long_help r"Disable mise for current shell session
This can be used to temporarily disable mise in a shell session."
after_long_help r"Examples:
$ mise deactivate bash
$ mise deactivate zsh
$ mise deactivate fish
$ execx($(mise deactivate xonsh))
"
}
cmd "direnv" help="Output direnv function to use mise inside direnv" {
long_help r"Output direnv function to use mise inside direnv
See https://mise.jdx.dev/direnv.html for more information
Because this generates the idiomatic files based on currently installed plugins,
you should run this command after installing new plugins. Otherwise
direnv may not know to update environment variables when legacy file versions change."
cmd "envrc" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume."
cmd "exec" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume."
cmd "activate" help="Output direnv function to use mise inside direnv" {
long_help r"Output direnv function to use mise inside direnv
See https://mise.jdx.dev/direnv.html for more information
Because this generates the legacy files based on currently installed plugins,
you should run this command after installing new plugins. Otherwise
direnv may not know to update environment variables when legacy file versions change."
after_long_help r"Examples:
$ mise direnv activate > ~/.config/direnv/lib/use_mise.sh
$ echo 'use mise' > .envrc
$ direnv allow
"
}
}
cmd "doctor" help="Check mise installation for possible problems" {
alias "dr"
after_long_help r"Examples:
$ mise doctor
[WARN] plugin node is not installed
"
}
cmd "env" help="Exports env vars to activate mise a single time" {
alias "e"
long_help r"Exports env vars to activate mise a single time
Use this if you don't want to permanently install mise. It's not necessary to
use this if you have `mise activate` in your shell rc file."
after_long_help r#"Examples:
$ eval "$(mise env -s bash)"
$ eval "$(mise env -s zsh)"
$ mise env -s fish | source
$ execx($(mise env -s xonsh))
"#
flag "-J --json" help="Output in JSON format"
flag "-s --shell" help="Shell type to generate environment variables for" {
arg "<SHELL>"
}
arg "[TOOL@VERSION]..." help="Tool(s) to use" var=true
}
cmd "exec" help="Execute a command with tool(s) set" {
alias "x"
long_help r#"Execute a command with tool(s) set
use this to avoid modifying the shell session or running ad-hoc commands with mise tools set.
Tools will be loaded from .mise.toml/.tool-versions, though they can be overridden with <RUNTIME> args
Note that only the plugin specified will be overridden, so if a `.tool-versions` file
includes "node 20" but you run `mise exec python@3.11`; it will still load node@20.
The "--" separates runtimes from the commands to pass along to the subprocess."#
after_long_help r#"Examples:
$ mise exec node@20 -- node ./app.js # launch app.js using node-20.x
$ mise x node@20 -- node ./app.js # shorter alias
# Specify command as a string:
$ mise exec node@20 python@3.11 --command "node -v && python -V"
# Run a command in a different directory:
$ mise x -C /path/to/project node@20 -- node ./app.js
"#
flag "-c --command" help="Command string to execute" {
arg "<C>"
}
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
arg "[TOOL@VERSION]..." help="Tool(s) to start e.g.: node@20 python@3.10" var=true
arg "[COMMAND]..." help="Command string to execute (same as --command)" var=true
}
cmd "generate" subcommand_required=true help="[experimental] Generate files for various tools/services" {
alias "gen"
cmd "git-pre-commit" help="[experimental] Generate a git pre-commit hook" {
alias "pre-commit"
long_help r"[experimental] Generate a git pre-commit hook
This command generates a git pre-commit hook that runs a mise task like `mise run pre-commit`
when you commit changes to your repository."
after_long_help r#"Examples:
$ mise generate git-pre-commit --write --task=pre-commit
$ git commit -m "feat: add new feature" # runs `mise run pre-commit`
"#
flag "--hook" help="Which hook to generate (saves to .git/hooks/$hook)" {
arg "<HOOK>"
}
flag "-t --task" help="The task to run when the pre-commit hook is triggered" {
arg "<TASK>"
}
flag "-w --write" help="write to .git/hooks/pre-commit and make it executable"
}
cmd "github-action" help="[experimental] Generate a GitHub Action workflow file" {
long_help r"[experimental] Generate a GitHub Action workflow file
This command generates a GitHub Action workflow file that runs a mise task like `mise run ci`
when you push changes to your repository."
after_long_help r#"Examples:
$ mise generate github-action --write --task=ci
$ git commit -m "feat: add new feature"
$ git push # runs `mise run ci` on GitHub
"#
flag "-n --name" help="the name of the workflow to generate" {
arg "<NAME>"
}
flag "-t --task" help="The task to run when the workflow is triggered" {
arg "<TASK>"
}
flag "-w --write" help="write to .github/workflows/$name.yml"
}
}
cmd "global" hide=true help="Sets/gets the global tool version(s)" {
alias "g" hide=true
long_help r"Sets/gets the global tool version(s)
Displays the contents of global config after writing.
The file is `$HOME/.config/mise/config.toml` by default. It can be changed with `$MISE_GLOBAL_CONFIG_FILE`.
If `$MISE_GLOBAL_CONFIG_FILE` is set to anything that ends in `.toml`, it will be parsed as `.mise.toml`.
Otherwise, it will be parsed as a `.tool-versions` file.
Use MISE_ASDF_COMPAT=1 to default the global config to ~/.tool-versions
Use `mise local` to set a tool version locally in the current directory."
after_long_help r"Examples:
# set the current version of node to 20.x
# will use a fuzzy version (e.g.: 20) in .tool-versions file
$ mise global --fuzzy node@20
# set the current version of node to 20.x
# will use a precise version (e.g.: 20.0.0) in .tool-versions file
$ mise global --pin node@20
# show the current version of node in ~/.tool-versions
$ mise global node
20.0.0
"
flag "--pin" help="Save exact version to `~/.tool-versions`\ne.g.: `mise global --pin node@20` will save `node 20.0.0` to ~/.tool-versions"
flag "--fuzzy" help="Save fuzzy version to `~/.tool-versions`\ne.g.: `mise global --fuzzy node@20` will save `node 20` to ~/.tool-versions\nthis is the default behavior unless MISE_ASDF_COMPAT=1"
flag "--remove" help="Remove the plugin(s) from ~/.tool-versions" var=true {
arg "<PLUGIN>"
}
flag "--path" help="Get the path of the global config file"
arg "[TOOL@VERSION]..." help="Tool(s) to add to .tool-versions\ne.g.: node@20\nIf this is a single tool with no version, the current value of the global\n.tool-versions will be displayed" var=true
}
cmd "hook-env" hide=true help="[internal] called by activate hook to update env vars directory change" {
flag "-s --shell" help="Shell type to generate script for" {
arg "<SHELL>"
}
flag "--status" help="Show \"mise: <PLUGIN>@<VERSION>\" message when changing directories" hide=true
flag "-q --quiet" help="Hide warnings such as when a tool is not installed"
}
cmd "hook-not-found" hide=true help="[internal] called by shell when a command is not found" {
flag "-s --shell" help="Shell type to generate script for" {
arg "<SHELL>"
}
arg "<BIN>" help="Attempted bin to run"
}
cmd "implode" help="Removes mise CLI and all related data" {
long_help r"Removes mise CLI and all related data
Skips config directory by default."
flag "--config" help="Also remove config directory"
flag "-n --dry-run" help="List directories that would be removed without actually removing them"
}
cmd "install" help="Install a tool version" {
alias "i"
long_help r"Install a tool version
Installs a tool version to `~/.local/share/mise/installs/<PLUGIN>/<VERSION>`
Installing alone will not activate the tools so they won't be in PATH.
To install and/or activate in one command, use `mise use` which will create a `.mise.toml` file
in the current directory to activate this tool when inside the directory.
Alternatively, run `mise exec <TOOL>@<VERSION> -- <COMMAND>` to execute a tool without creating config files.
Tools will be installed in parallel. To disable, set `--jobs=1` or `MISE_JOBS=1`"
after_long_help r"Examples:
$ mise install node@20.0.0 # install specific node version
$ mise install node@20 # install fuzzy node version
$ mise install node # install version specified in .tool-versions or .mise.toml
$ mise install # installs everything specified in .tool-versions or .mise.toml
"
flag "-f --force" help="Force reinstall even if already installed"
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
flag "-v --verbose" help="Show installation output" var=true count=true {
long_help "Show installation output\n\nThis argument will print plugin output such as download, configuration, and compilation output."
}
arg "[TOOL@VERSION]..." help="Tool(s) to install e.g.: node@20" var=true
}
cmd "latest" help="Gets the latest available version for a plugin" {
after_long_help r"Examples:
$ mise latest node@20 # get the latest version of node 20
20.0.0
$ mise latest node # get the latest stable version of node
20.0.0
"
flag "-i --installed" help="Show latest installed instead of available version"
arg "<TOOL@VERSION>" help="Tool to get the latest version of"
arg "[ASDF_VERSION]" help="The version prefix to use when querying the latest version same as the first argument after the \"@\" used for asdf compatibility" hide=true
}
cmd "link" help="Symlinks a tool version into mise" {
alias "ln"
long_help r"Symlinks a tool version into mise
Use this for adding installs either custom compiled outside
mise or built with a different tool."
after_long_help r"Examples:
# build node-20.0.0 with node-build and link it into mise
$ node-build 20.0.0 ~/.nodes/20.0.0
$ mise link node@20.0.0 ~/.nodes/20.0.0
# have mise use the python version provided by Homebrew
$ brew install node
$ mise link node@brew $(brew --prefix node)
$ mise use node@brew
"
flag "-f --force" help="Overwrite an existing tool version if it exists"
arg "<TOOL@VERSION>" help="Tool name and version to create a symlink for"
arg "<PATH>" help="The local path to the tool version\ne.g.: ~/.nvm/versions/node/v20.0.0"
}
cmd "local" hide=true help="Sets/gets tool version in local .tool-versions or .mise.toml" {
alias "l" hide=true
long_help r"Sets/gets tool version in local .tool-versions or .mise.toml
Use this to set a tool's version when within a directory
Use `mise global` to set a tool version globally
This uses `.tool-version` by default unless there is a `.mise.toml` file or if `MISE_USE_TOML`
is set. A future v2 release of mise will default to using `.mise.toml`."
after_long_help r"Examples:
# set the current version of node to 20.x for the current directory
# will use a precise version (e.g.: 20.0.0) in .tool-versions file
$ mise local node@20
# set node to 20.x for the current project (recurses up to find .tool-versions)
$ mise local -p node@20
# set the current version of node to 20.x for the current directory
# will use a fuzzy version (e.g.: 20) in .tool-versions file
$ mise local --fuzzy node@20
# removes node from .tool-versions
$ mise local --remove=node
# show the current version of node in .tool-versions
$ mise local node
20.0.0
"
flag "-p --parent" help="Recurse up to find a .tool-versions file rather than using the current directory only\nby default this command will only set the tool in the current directory (\"$PWD/.tool-versions\")"
flag "--pin" help="Save exact version to `.tool-versions`\ne.g.: `mise local --pin node@20` will save `node 20.0.0` to .tool-versions"
flag "--fuzzy" help="Save fuzzy version to `.tool-versions` e.g.: `mise local --fuzzy node@20` will save `node 20` to .tool-versions This is the default behavior unless MISE_ASDF_COMPAT=1"
flag "--remove" help="Remove the plugin(s) from .tool-versions" var=true {
arg "<PLUGIN>"
}
flag "--path" help="Get the path of the config file"
arg "[TOOL@VERSION]..." help="Tool(s) to add to .tool-versions/.mise.toml\ne.g.: node@20\nif this is a single tool with no version,\nthe current value of .tool-versions/.mise.toml will be displayed" var=true
}
cmd "ls" help="List installed and active tool versions" {
alias "list"
long_help r#"List installed and active tool versions
This command lists tools that mise "knows about".
These may be tools that are currently installed, or those
that are in a config file (active) but may or may not be installed.
It's a useful command to get the current state of your tools."#
after_long_help r#"Examples:
$ mise ls
node 20.0.0 ~/src/myapp/.tool-versions latest
python 3.11.0 ~/.tool-versions 3.10
python 3.10.0
$ mise ls --current
node 20.0.0 ~/src/myapp/.tool-versions 20
python 3.11.0 ~/.tool-versions 3.11.0
$ mise ls --json
{
"node": [
{
"version": "20.0.0",
"install_path": "/Users/jdx/.mise/installs/node/20.0.0",
"source": {
"type": ".mise.toml",
"path": "/Users/jdx/.mise.toml"
}
}
],
"python": [...]
}
"#
flag "-p --plugin" hide=true {
arg "<PLUGIN_FLAG>"
}
flag "-c --current" help="Only show tool versions currently specified in a .tool-versions/.mise.toml"
flag "-g --global" help="Only show tool versions currently specified in a the global .tool-versions/.mise.toml"
flag "-i --installed" help="Only show tool versions that are installed (Hides tools defined in .tool-versions/.mise.toml but not installed)"
flag "--parseable" help="Output in an easily parseable format" hide=true
flag "-J --json" help="Output in JSON format"
flag "-m --missing" help="Display missing tool versions"
flag "--prefix" help="Display versions matching this prefix" {
arg "<PREFIX>"
}
flag "--no-header" help="Don't display headers"
arg "[PLUGIN]..." help="Only show tool versions from [PLUGIN]" var=true
}
cmd "ls-remote" help="List runtime versions available for install" {
alias "list-all" "list-remote" hide=true
long_help r"List runtime versions available for install
note that the results are cached for 24 hours
run `mise cache clean` to clear the cache and get fresh results"
after_long_help r"Examples:
$ mise ls-remote node
18.0.0
20.0.0
$ mise ls-remote node@20
20.0.0
20.1.0
$ mise ls-remote node 20
20.0.0
20.1.0
"
flag "--all" help="Show all installed plugins and versions"
arg "[TOOL@VERSION]" help="Plugin to get versions for"
arg "[PREFIX]" help="The version prefix to use when querying the latest version\nsame as the first argument after the \"@\""
}
cmd "outdated" help="Shows outdated tool versions" {
after_long_help r#"Examples:
$ mise outdated
Plugin Requested Current Latest
python 3.11 3.11.0 3.11.1
node 20 20.0.0 20.1.0
$ mise outdated node
Plugin Requested Current Latest
node 20 20.0.0 20.1.0
$ mise outdated --json
{"python": {"requested": "3.11", "current": "3.11.0", "latest": "3.11.1"}, ...}
"#
flag "-J --json" help="Output in JSON format"
arg "[TOOL@VERSION]..." help="Tool(s) to show outdated versions for\ne.g.: node@20 python@3.10\nIf not specified, all tools in global and local configs will be shown" var=true
}
cmd "plugins" help="Manage plugins" {
alias "p"
alias "plugin" "plugin-list" hide=true
flag "-a --all" help="list all available remote plugins" hide=true {
long_help "list all available remote plugins\n\nsame as `mise plugins ls-remote`"
}
flag "-c --core" help="The built-in plugins only\nNormally these are not shown"
flag "--user" help="List installed plugins" {
long_help "List installed plugins\n\nThis is the default behavior but can be used with --core\nto show core and user plugins"
}
flag "-u --urls" help="Show the git url for each plugin\ne.g.: https://github.com/asdf-vm/asdf-nodejs.git"
flag "--refs" help="Show the git refs for each plugin\ne.g.: main 1234abc" hide=true
cmd "install" help="Install a plugin" {
alias "i" "a" "add"
long_help r"Install a plugin
note that mise automatically can install plugins when you install a tool
e.g.: `mise install node@20` will autoinstall the node plugin
This behavior can be modified in ~/.config/mise/config.toml"
after_long_help r"Examples:
# install the node via shorthand
$ mise plugins install node
# install the node plugin using a specific git url
$ mise plugins install node https://github.com/mise-plugins/rtx-nodejs.git
# install the node plugin using the git url only
# (node is inferred from the url)
$ mise plugins install https://github.com/mise-plugins/rtx-nodejs.git
# install the node plugin using a specific ref
$ mise plugins install node https://github.com/mise-plugins/rtx-nodejs.git#v1.0.0
"
flag "-f --force" help="Reinstall even if plugin exists"
flag "-a --all" help="Install all missing plugins\nThis will only install plugins that have matching shorthands.\ni.e.: they don't need the full git repo url"
flag "-v --verbose" help="Show installation output" var=true count=true
arg "[NEW_PLUGIN]" help="The name of the plugin to install\ne.g.: node, ruby\nCan specify multiple plugins: `mise plugins install node ruby python`"
arg "[GIT_URL]" help="The git url of the plugin"
arg "[REST]..." var=true hide=true
}
cmd "link" help="Symlinks a plugin into mise" {
alias "ln"
long_help r"Symlinks a plugin into mise
This is used for developing a plugin."
after_long_help r#"Examples:
# essentially just `ln -s ./mise-node ~/.local/share/mise/plugins/node`
$ mise plugins link node ./mise-node
# infer plugin name as "node"
$ mise plugins link ./mise-node
"#
flag "-f --force" help="Overwrite existing plugin"
arg "<NAME>" help="The name of the plugin\ne.g.: node, ruby"
arg "[PATH]" help="The local path to the plugin\ne.g.: ./mise-node"
}
cmd "ls" help="List installed plugins" {
alias "list"
long_help r"List installed plugins
Can also show remotely available plugins to install."
after_long_help r"Examples:
$ mise plugins ls
node
ruby
$ mise plugins ls --urls
node https://github.com/asdf-vm/asdf-nodejs.git
ruby https://github.com/asdf-vm/asdf-ruby.git
"
flag "-a --all" help="List all available remote plugins\nSame as `mise plugins ls-remote`" hide=true
flag "-c --core" help="The built-in plugins only\nNormally these are not shown"
flag "--user" help="List installed plugins" {
long_help "List installed plugins\n\nThis is the default behavior but can be used with --core\nto show core and user plugins"
}
flag "-u --urls" help="Show the git url for each plugin\ne.g.: https://github.com/asdf-vm/asdf-nodejs.git"
flag "--refs" help="Show the git refs for each plugin\ne.g.: main 1234abc" hide=true
}
cmd "ls-remote" help="List all available remote plugins" {
alias "list-remote" "list-all"
long_help r"
List all available remote plugins
The full list is here: https://github.com/jdx/mise/blob/main/registry.toml
Examples:
$ mise plugins ls-remote
"
flag "-u --urls" help="Show the git url for each plugin e.g.: https://github.com/mise-plugins/rtx-nodejs.git"
flag "--only-names" help="Only show the name of each plugin by default it will show a \"*\" next to installed plugins"
}
cmd "uninstall" help="Removes a plugin" {
alias "remove" "rm"
after_long_help r"Examples:
$ mise uninstall node
"
flag "-p --purge" help="Also remove the plugin's installs, downloads, and cache"
flag "-a --all" help="Remove all plugins"
arg "[PLUGIN]..." help="Plugin(s) to remove" var=true
}
cmd "update" help="Updates a plugin to the latest version" {
alias "up" "upgrade"
long_help r"Updates a plugin to the latest version
note: this updates the plugin itself, not the runtime versions"
after_long_help r"Examples:
$ mise plugins update # update all plugins
$ mise plugins update node # update only node
$ mise plugins update node#beta # specify a ref
"
flag "-j --jobs" help="Number of jobs to run in parallel\nDefault: 4" {
arg "<JOBS>"
}
arg "[PLUGIN]..." help="Plugin(s) to update" var=true
}
}
cmd "prune" help="Delete unused versions of tools" {
long_help r"Delete unused versions of tools
mise tracks which config files have been used in ~/.local/state/mise/tracked-configs
Versions which are no longer the latest specified in any of those configs are deleted.
Versions installed only with environment variables (`MISE_<PLUGIN>_VERSION`) will be deleted,
as will versions only referenced on the command line (`mise exec <PLUGIN>@<VERSION>`)."
after_long_help r"Examples:
$ mise prune --dry-run
rm -rf ~/.local/share/mise/versions/node/20.0.0
rm -rf ~/.local/share/mise/versions/node/20.0.1
"
flag "-n --dry-run" help="Do not actually delete anything"
flag "--configs" help="Prune only tracked and trusted configuration links that point to non-existent configurations"
flag "--tools" help="Prune only unused versions of tools"
arg "[PLUGIN]..." help="Prune only versions from this plugin(s)" var=true
}
cmd "registry" help="[experimental] List available tools" {
after_long_help r"Examples:
$ mise registry
node core:node
poetry asdf:mise-plugins/mise-poetry
ubi cargo:ubi
"
}
cmd "reshim" help="rebuilds the shim farm" {
long_help r#"rebuilds the shim farm
This creates new shims in ~/.local/share/mise/shims for CLIs that have been added.
mise will try to do this automatically for commands like `npm i -g` but there are
other ways to install things (like using yarn or pnpm for node) that mise does
not know about and so it will be necessary to call this explicitly.
If you think mise should automatically call this for a particular command, please
open an issue on the mise repo. You can also setup a shell function to reshim
automatically (it's really fast so you don't need to worry about overhead):
npm() {
command npm "$@"
mise reshim
}"#
after_long_help r"Examples:
$ mise reshim
$ ~/.local/share/mise/shims/node -v
v20.0.0
"
arg "[PLUGIN]" hide=true
arg "[VERSION]" hide=true
}
cmd "run" help="[experimental] Run a tasks" {
alias "r"
long_help r#"[experimental] Run a tasks
This command will run a tasks, or multiple tasks in parallel.
Tasks may have dependencies on other tasks or on source files.
If source is configured on a tasks, it will only run if the source
files have changed.
Tasks can be defined in .mise.toml or as standalone scripts.
In .mise.toml, tasks take this form:
[tasks.build]
run = "npm run build"
sources = ["src/**/*.ts"]
outputs = ["dist/**/*.js"]
Alternatively, tasks can be defined as standalone scripts.
These must be located in the `.mise/tasks`, `mise/tasks` or `.config/mise/tasks` directory.
The name of the script will be the name of the tasks.
$ cat .mise/tasks/build<<EOF
#!/usr/bin/env bash
npm run build
EOF
$ mise run build"#
after_long_help r#"Examples:
# Runs the "lint" tasks. This needs to either be defined in .mise.toml
# or as a standalone script. See the project README for more information.
$ mise run lint
# Forces the "build" tasks to run even if its sources are up-to-date.
$ mise run build --force
# Run "test" with stdin/stdout/stderr all connected to the current terminal.
# This forces `--jobs=1` to prevent interleaving of output.
$ mise run test --raw
# Runs the "lint", "test", and "check" tasks in parallel.
$ mise run lint ::: test ::: check
# Execute multiple tasks each with their own arguments.
$ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
"#
flag "-C --cd" help="Change to this directory before executing the command" {
arg "<CD>"
}
flag "-n --dry-run" help="Don't actually run the tasks(s), just print them in order of execution"
flag "-f --force" help="Force the tasks to run even if outputs are up to date"
flag "-p --prefix" help="Print stdout/stderr by line, prefixed with the tasks's label\nDefaults to true if --jobs > 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-i --interleave" help="Print directly to stdout/stderr instead of by line\nDefaults to true if --jobs == 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-t --tool" help="Tool(s) to also add e.g.: node@20 python@3.10" var=true {
arg "<TOOL@VERSION>"
}
flag "-j --jobs" help="Number of tasks to run in parallel\n[default: 4]\nConfigure with `jobs` config or `MISE_JOBS` env var" {
arg "<JOBS>"
}
flag "-r --raw" help="Read/write directly to stdin/stdout/stderr instead of by line\nConfigure with `raw` config or `MISE_RAW` env var"
flag "--timings" help="Shows elapsed time after each tasks"
arg "[TASK]" help="Tasks to run\nCan specify multiple tasks by separating with `:::`\ne.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2" default="default"
arg "[ARGS]..." help="Arguments to pass to the tasks. Use \":::\" to separate tasks" var=true
}
cmd "self-update" help="Updates mise itself" {
long_help r"Updates mise itself
Uses the GitHub Releases API to find the latest release and binary.
By default, this will also update any installed plugins.
Uses the `GITHUB_API_TOKEN` environment variable if set for higher rate limits."
flag "-f --force" help="Update even if already up to date"
flag "--no-plugins" help="Disable auto-updating plugins"
flag "-y --yes" help="Skip confirmation prompt"
arg "[VERSION]" help="Update to a specific version"
}
cmd "set" help="Manage environment variables" {
alias "ev" "env-vars" hide=true
long_help r#"Manage environment variables
By default this command modifies ".mise.toml" in the current directory."#
after_long_help r"Examples:
$ mise set NODE_ENV=production
$ mise set NODE_ENV
production
$ mise set
key value source
NODE_ENV production ~/.config/mise/config.toml
"
flag "--file" help="The TOML file to update" {
long_help "The TOML file to update\n\nDefaults to MISE_DEFAULT_CONFIG_FILENAME environment variable, or \".mise.toml\"."
arg "<FILE>"
}
flag "-g --global" help="Set the environment variable in the global config file"
flag "--remove" help="Remove the environment variable from config file" var=true hide=true {
long_help "Remove the environment variable from config file\n\nCan be used multiple times."
arg "<ENV_VAR>"
}
arg "[ENV_VARS]..." help="Environment variable(s) to set\ne.g.: NODE_ENV=production" var=true
}
cmd "settings" help="Manage settings" {
flag "--keys" help="Only display key names for each setting"
cmd "get" help="Show a current setting" {
long_help r"Show a current setting
This is the contents of a single entry in ~/.config/mise/config.toml
Note that aliases are also stored in this file
but managed separately with `mise aliases get`"
after_long_help r"Examples:
$ mise settings get legacy_version_file
true
"
arg "<SETTING>" help="The setting to show"
}
cmd "ls" help="Show current settings" {
alias "list"
long_help r"Show current settings
This is the contents of ~/.config/mise/config.toml
Note that aliases are also stored in this file
but managed separately with `mise aliases`"
after_long_help r"Examples:
$ mise settings
legacy_version_file = false
"
flag "--keys" help="Only display key names for each setting"
}
cmd "set" help="Add/update a setting" {
alias "add" "create"
long_help r"Add/update a setting
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise settings legacy_version_file=true
"
arg "<SETTING>" help="The setting to set"
arg "<VALUE>" help="The value to set"
}
cmd "unset" help="Clears a setting" {
alias "rm" "remove" "delete" "del"
long_help r"Clears a setting
This modifies the contents of ~/.config/mise/config.toml"
after_long_help r"Examples:
$ mise settings unset legacy_version_file
"
arg "<SETTING>" help="The setting to remove"
}
}
cmd "shell" help="Sets a tool version for the current session" {
alias "sh"
long_help r#"Sets a tool version for the current session
Only works in a session where mise is already activated.
This works by setting environment variables for the current shell session
such as `MISE_NODE_VERSION=20` which is "eval"ed as a shell function created
by `mise activate`."#
after_long_help r"Examples:
$ mise shell node@20
$ node -v
v20.0.0
"
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
flag "-u --unset" help="Removes a previously set version"
arg "[TOOL@VERSION]..." help="Tool(s) to use" var=true
}
cmd "sync" subcommand_required=true help="Add tool versions from external tools to mise" {
cmd "node" help="Symlinks all tool versions from an external tool into mise" {
long_help r"Symlinks all tool versions from an external tool into mise
For example, use this to import all Homebrew node installs into mise"
after_long_help r"Examples:
$ brew install node@18 node@20
$ mise sync node --brew
$ mise use -g node@18 - uses Homebrew-provided node
"
flag "--brew" help="Get tool versions from Homebrew"
flag "--nvm" help="Get tool versions from nvm"
flag "--nodenv" help="Get tool versions from nodenv"
}
cmd "python" help="Symlinks all tool versions from an external tool into mise" {
long_help r"Symlinks all tool versions from an external tool into mise
For example, use this to import all pyenv installs into mise"
after_long_help r"Examples:
$ pyenv install 3.11.0
$ mise sync python --pyenv
$ mise use -g python@3.11.0 - uses pyenv-provided python
"
flag "--pyenv" help="Get tool versions from pyenv" required=true
}
}
cmd "tasks" help="[experimental] Manage tasks" {
alias "t"
alias "task" hide=true
after_long_help r"Examples:
$ mise tasks ls
"
flag "--no-header" help="Do not print table header"
flag "-x --extended" help="Show all columns"
flag "--hidden" help="Show hidden tasks"
flag "--sort" help="Sort by column. Default is name." {
arg "<COLUMN>"
}
flag "--sort-order" help="Sort order. Default is asc." {
arg "<SORT_ORDER>"
}
flag "-J --json" help="Output in JSON format"
cmd "deps" help="[experimental] Display a tree visualization of a dependency graph" {
after_long_help r#"Examples:
# Show dependencies for all tasks
$ mise tasks deps
# Show dependencies for the "lint", "test" and "check" tasks
$ mise tasks deps lint test check
# Show dependencies in DOT format
$ mise tasks deps --dot
"#
flag "--hidden" help="Show hidden tasks"
flag "--dot" help="Display dependencies in DOT format"
arg "[TASKS]..." help="Tasks to show dependencies for\nCan specify multiple tasks by separating with spaces\ne.g.: mise tasks deps lint test check" var=true
}
cmd "edit" help="[experimental] Edit a tasks with $EDITOR" {
long_help r"[experimental] Edit a tasks with $EDITOR
The tasks will be created as a standalone script if it does not already exist."
after_long_help r"Examples:
$ mise tasks edit build
$ mise tasks edit test
"
flag "-p --path" help="Display the path to the tasks instead of editing it"
arg "<TASK>" help="Tasks to edit"
}
cmd "ls" help="[experimental] List available tasks to execute\nThese may be included from the config file or from the project's .mise/tasks directory\nmise will merge all tasks from all parent directories into this list." {
long_help r"[experimental] List available tasks to execute
These may be included from the config file or from the project's .mise/tasks directory
mise will merge all tasks from all parent directories into this list.
So if you have global tasks in ~/.config/mise/tasks/* and project-specific tasks in
~/myproject/.mise/tasks/*, then they'll both be available but the project-specific
tasks will override the global ones if they have the same name."
after_long_help r"Examples:
$ mise tasks ls
"
flag "--no-header" help="Do not print table header"
flag "-x --extended" help="Show all columns"
flag "--hidden" help="Show hidden tasks"
flag "--sort" help="Sort by column. Default is name." {
arg "<COLUMN>"
}
flag "--sort-order" help="Sort order. Default is asc." {
arg "<SORT_ORDER>"
}
flag "-J --json" help="Output in JSON format"
}
cmd "run" help="[experimental] Run a tasks" {
alias "r"
long_help r#"[experimental] Run a tasks
This command will run a tasks, or multiple tasks in parallel.
Tasks may have dependencies on other tasks or on source files.
If source is configured on a tasks, it will only run if the source
files have changed.
Tasks can be defined in .mise.toml or as standalone scripts.
In .mise.toml, tasks take this form:
[tasks.build]
run = "npm run build"
sources = ["src/**/*.ts"]
outputs = ["dist/**/*.js"]
Alternatively, tasks can be defined as standalone scripts.
These must be located in the `.mise/tasks`, `mise/tasks` or `.config/mise/tasks` directory.
The name of the script will be the name of the tasks.
$ cat .mise/tasks/build<<EOF
#!/usr/bin/env bash
npm run build
EOF
$ mise run build"#
after_long_help r#"Examples:
# Runs the "lint" tasks. This needs to either be defined in .mise.toml
# or as a standalone script. See the project README for more information.
$ mise run lint
# Forces the "build" tasks to run even if its sources are up-to-date.
$ mise run build --force
# Run "test" with stdin/stdout/stderr all connected to the current terminal.
# This forces `--jobs=1` to prevent interleaving of output.
$ mise run test --raw
# Runs the "lint", "test", and "check" tasks in parallel.
$ mise run lint ::: test ::: check
# Execute multiple tasks each with their own arguments.
$ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
"#
flag "-C --cd" help="Change to this directory before executing the command" {
arg "<CD>"
}
flag "-n --dry-run" help="Don't actually run the tasks(s), just print them in order of execution"
flag "-f --force" help="Force the tasks to run even if outputs are up to date"
flag "-p --prefix" help="Print stdout/stderr by line, prefixed with the tasks's label\nDefaults to true if --jobs > 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-i --interleave" help="Print directly to stdout/stderr instead of by line\nDefaults to true if --jobs == 1\nConfigure with `task_output` config or `MISE_TASK_OUTPUT` env var"
flag "-t --tool" help="Tool(s) to also add e.g.: node@20 python@3.10" var=true {
arg "<TOOL@VERSION>"
}
flag "-j --jobs" help="Number of tasks to run in parallel\n[default: 4]\nConfigure with `jobs` config or `MISE_JOBS` env var" {
arg "<JOBS>"
}
flag "-r --raw" help="Read/write directly to stdin/stdout/stderr instead of by line\nConfigure with `raw` config or `MISE_RAW` env var"
flag "--timings" help="Shows elapsed time after each tasks"
arg "[TASK]" help="Tasks to run\nCan specify multiple tasks by separating with `:::`\ne.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2" default="default"
arg "[ARGS]..." help="Arguments to pass to the tasks. Use \":::\" to separate tasks" var=true
}
}
cmd "trust" help="Marks a config file as trusted" {
long_help r"Marks a config file as trusted
This means mise will parse the file with potentially dangerous
features enabled.
This includes:
- environment variables
- templates
- `path:` plugin versions"
after_long_help r"Examples:
# trusts ~/some_dir/.mise.toml
$ mise trust ~/some_dir/.mise.toml
# trusts .mise.toml in the current or parent directory
$ mise trust
"
flag "-a --all" help="Trust all config files in the current directory and its parents"
flag "--untrust" help="No longer trust this config"
flag "--show" help="Show the trusted status of config files from the current directory and its parents.\nDoes not trust or untrust any files."
arg "[CONFIG_FILE]" help="The config file to trust"
}
cmd "uninstall" help="Removes runtime versions" {
alias "remove" "rm"
after_long_help r"Examples:
$ mise uninstall node@18.0.0 # will uninstall specific version
$ mise uninstall node # will uninstall current node version
$ mise uninstall --all node@18.0.0 # will uninstall all node versions
"
flag "-a --all" help="Delete all installed versions"
flag "-n --dry-run" help="Do not actually delete anything"
arg "[INSTALLED_TOOL@VERSION]..." help="Tool(s) to remove" var=true
}
cmd "unset" help="Remove environment variable(s) from the config file" {
long_help r#"Remove environment variable(s) from the config file
By default this command modifies ".mise.toml" in the current directory."#
flag "-f --file" help="Specify a file to use instead of \".mise.toml\"" {
arg "<FILE>"
}
flag "-g --global" help="Use the global config file"
arg "[KEYS]..." help="Environment variable(s) to remove\ne.g.: NODE_ENV" var=true
}
cmd "upgrade" help="Upgrades outdated tool versions" {
alias "up"
flag "-n --dry-run" help="Just print what would be done, don't actually do it"
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "-i --interactive" help="Display multiselect menu to choose which tools to upgrade"
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
arg "[TOOL@VERSION]..." help="Tool(s) to upgrade\ne.g.: node@20 python@3.10\nIf not specified, all current tools will be upgraded" var=true
}
cmd "usage" help="Generate a usage CLI spec" {
long_help r"Generate a usage CLI spec
See https://usage.jdx.dev for more information"
}
cmd "use" help="Install tool version and add it to config" {
alias "u"
long_help r"Install tool version and add it to config
This will install the tool if it is not already installed.
By default, this will use a `.mise.toml` file in the current directory.
Use the --global flag to use the global config file instead.
This replaces asdf's `local` and `global` commands, however those are still available in mise."
after_long_help r"Examples:
# set the current version of node to 20.x in .mise.toml of current directory
# will write the fuzzy version (e.g.: 20)
$ mise use node@20
# set the current version of node to 20.x in ~/.config/mise/config.toml
# will write the precise version (e.g.: 20.0.0)
$ mise use -g --pin node@20
# sets .mise.local.toml (which is intended not to be committed to a project)
$ mise use --env local node@20
# sets .mise.staging.toml (which is used if MISE_ENV=staging)
$ mise use --env staging node@20
"
flag "-f --force" help="Force reinstall even if already installed"
flag "--fuzzy" help="Save fuzzy version to config file\ne.g.: `mise use --fuzzy node@20` will save 20 as the version\nthis is the default behavior unless MISE_ASDF_COMPAT=1"
flag "-g --global" help="Use the global config file (~/.config/mise/config.toml) instead of the local one"
flag "-e --env" help="Modify an environment-specific config file like .mise.<env>.toml" {
arg "<ENV>"
}
flag "-j --jobs" help="Number of jobs to run in parallel\n[default: 4]" {
arg "<JOBS>"
}
flag "--raw" help="Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1"
flag "--remove" help="Remove the plugin(s) from config file" var=true {
arg "<PLUGIN>"
}
flag "-p --path" help="Specify a path to a config file or directory If a directory is specified, it will look for .mise.toml (default) or .tool-versions" {
arg "<PATH>"
}
flag "--pin" help="Save exact version to config file\ne.g.: `mise use --pin node@20` will save 20.0.0 as the version\nSet MISE_ASDF_COMPAT=1 to make this the default behavior"
arg "[TOOL@VERSION]..." help="Tool(s) to add to config file\ne.g.: node@20, cargo:ripgrep@latest npm:prettier@3\nIf no version is specified, it will default to @latest" var=true
}
cmd "version" help="Show mise version" {
alias "v" hide=true
}
cmd "watch" help="[experimental] Run a tasks watching for changes" {
alias "w"
after_long_help r#"Examples:
$ mise watch -t build
Runs the "build" tasks. Will re-run the tasks when any of its sources change.
Uses "sources" from the tasks definition to determine which files to watch.
$ mise watch -t build --glob src/**/*.rs
Runs the "build" tasks but specify the files to watch with a glob pattern.
This overrides the "sources" from the tasks definition.
$ mise run -t build --clear
Extra arguments are passed to watchexec. See `watchexec --help` for details.
"#
flag "-t --task" help="Tasks to run" var=true {
arg "<TASK>"
}
flag "-g --glob" help="Files to watch\nDefaults to sources from the tasks(s)" var=true {
arg "<GLOB>"
}
arg "[ARGS]..." help="Extra arguments" var=true
}
cmd "where" help="Display the installation path for a runtime" {
long_help r"Display the installation path for a runtime
Must be installed."
after_long_help r"Examples:
# Show the latest installed version of node
# If it is is not installed, errors
$ mise where node@20
/home/jdx/.local/share/mise/installs/node/20.0.0
# Show the current, active install directory of node
# Errors if node is not referenced in any .tool-version file
$ mise where node
/home/jdx/.local/share/mise/installs/node/20.0.0
"
arg "<TOOL@VERSION>" help="Tool(s) to look up\ne.g.: ruby@3\nif \"@<PREFIX>\" is specified, it will show the latest installed version\nthat matches the prefix\notherwise, it will show the current, active installed version"
arg "[ASDF_VERSION]" help="the version prefix to use when querying the latest version\nsame as the first argument after the \"@\"\nused for asdf compatibility" hide=true
}
cmd "which" help="Shows the path that a bin name points to" {
after_long_help r"Examples:
$ mise which node
/home/username/.local/share/mise/installs/node/20.0.0/bin/node
$ mise which node --plugin
node
$ mise which node --version
20.0.0
"
flag "--plugin" help="Show the plugin name instead of the path"
flag "--version" help="Show the version instead of the path"
flag "-t --tool" help="Use a specific tool@version\ne.g.: `mise which npm --tool=node@20`" {
arg "<TOOL@VERSION>"
}
arg "<BIN_NAME>" help="The bin name to look up"
}
cmd "render-help" hide=true help="internal command to generate markdown from help"
cmd "render-mangen" hide=true help="internal command to generate markdown from help"
complete "alias" run="mise alias ls {{words[PREV]}} | awk '{print $2}'"
complete "config_file" type="file"
complete "new_plugin" run="mise plugins --all"
complete "plugin" run="mise plugins --core --user"
complete "prefix" run="mise ls-remote {{words[PREV]}}"
complete "setting" run="mise settings --keys"
complete "task" run="mise tasks | awk '{print $1}'"
complete "tool@version" run=r#"
cur="{{words[CURRENT]}}"
case $cur in
*@*)
tool="$(echo "$cur" | cut -d'@' -f1)"
prefix="$(echo "$cur" | cut -d'@' -f2)"
versions=$(mise ls-remote $tool $prefix | sed '1!G;h;$!d')
for version in $versions; do
echo "$tool@$version"
done
;;
*)
plugins=$(mise plugins --all)
for plugin in $plugins; do
echo "$plugin@"
done
;;
esac
"#
complete "installed_tool@version" run=r#"
cur="{{words[CURRENT]}}"
case $cur in
*@*)
tool="$(echo "$cur" | cut -d'@' -f1)"
prefix="$(echo "$cur" | cut -d'@' -f2)"
if [ ! -z "$prefix" ]; then
prefix="--prefix $prefix"
fi
versions=$(mise ls --installed $tool $prefix | awk '{print $2}' | sed '1!G;h;$!d')
for version in $versions; do
echo "$tool@$version"
done
;;
*)
plugins=$(mise plugins --core --user)
for plugin in $plugins; do
echo "$plugin@"
done
;;
esac
"#