diff --git a/.idea/mise.iml b/.idea/mise.iml
index 7290650cf..47c629d52 100644
--- a/.idea/mise.iml
+++ b/.idea/mise.iml
@@ -10,6 +10,7 @@
+
diff --git a/.mise.toml b/.mise.toml
index cbd8f1b00..535c87c05 100644
--- a/.mise.toml
+++ b/.mise.toml
@@ -3,6 +3,7 @@
min_version = "2024.1.1"
[env]
_.file = [".env"]
+_.path = ["./target/debug"]
FOO = "bar"
FOO_NUM = 1
THIS_PROJECT = "{{config_root}}-{{cwd}}"
@@ -30,8 +31,8 @@ run = "cargo clean"
[tasks.build]
alias = "b"
run = "cargo build --color always --all-features"
-sources = ["Cargo.*", "src/**/*.rs"]
-outputs = ["target/debug/mise"]
+#sources = ["Cargo.*", "src/**/*.rs"]
+#outputs = ["target/debug/mise"]
[tasks.ci]
depends = [
@@ -40,30 +41,35 @@ depends = [
"test"
]
-[tasks."render:completions"]
+[tasks."render:usage"]
depends = ["build"]
+env = { CLICOLOR_FORCE = "0" }
+run = "mise usage > mise.usage.kdl"
+
+[tasks."render:completions"]
+depends = ["build", "render:usage"]
env = { NO_COLOR = "1" }
run = '''
#!/usr/bin/env bash
set -xeuo pipefail
-target/debug/mise render-completion bash > completions/mise.bash
-target/debug/mise render-completion zsh > completions/_mise
-target/debug/mise render-completion fish > completions/mise.fish
+mise render-completion bash > completions/mise.bash
+mise render-completion zsh > completions/_mise
+mise render-completion fish > completions/mise.fish
'''
[tasks."render:mangen"]
depends = ["build"]
env = { NO_COLOR = "1" }
-run = "target/debug/mise render-mangen"
+run = "mise render-mangen"
[tasks."render:help"]
depends = ["build"]
env = { NO_COLOR = "1" }
run = [
- "target/debug/mise render-help",
+ "mise render-help",
"mise x node@latest -- npx markdown-magic",
]
-sources = ["target/debug/mise"]
+sources = ["mise"]
outputs = ["README.md"]
[tasks.render]
diff --git a/Cargo.lock b/Cargo.lock
index 5bfcb5901..009a73257 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1221,6 +1221,17 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "kdl"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "062c875482ccb676fd40c804a40e3824d4464c18c364547456d1c8e8e951ae47"
+dependencies = [
+ "miette",
+ "nom",
+ "thiserror",
+]
+
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -1281,6 +1292,29 @@ version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+[[package]]
+name = "miette"
+version = "5.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e"
+dependencies = [
+ "miette-derive",
+ "once_cell",
+ "thiserror",
+ "unicode-width",
+]
+
+[[package]]
+name = "miette-derive"
+version = "5.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.48",
+]
+
[[package]]
name = "mime"
version = "0.3.17"
@@ -1381,6 +1415,7 @@ dependencies = [
"toml",
"toml_edit",
"url",
+ "usage-lib",
"versions",
"walkdir",
"which",
@@ -2777,6 +2812,25 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+[[package]]
+name = "usage-lib"
+version = "0.1.0"
+dependencies = [
+ "clap",
+ "heck 0.4.1",
+ "indexmap",
+ "itertools",
+ "kdl",
+ "log",
+ "miette",
+ "once_cell",
+ "serde",
+ "shell-escape",
+ "strum",
+ "thiserror",
+ "xx",
+]
+
[[package]]
name = "utf8parse"
version = "0.2.1"
@@ -3155,6 +3209,16 @@ dependencies = [
"rustix",
]
+[[package]]
+name = "xx"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "846a62538e6f30c0b450a936b9c711a11579803d41e6b4f959318693a7041bdc"
+dependencies = [
+ "miette",
+ "thiserror",
+]
+
[[package]]
name = "yaml-rust"
version = "0.4.5"
diff --git a/Cargo.toml b/Cargo.toml
index b6e1f10a1..2f462eee1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,6 +14,7 @@ categories = ["command-line-utilities"]
include = [
"src/**/*.rs",
"src/plugins/core/assets/**",
+ "src/assets/**",
"/completions/*",
"/Cargo.lock",
"/LICENSE",
@@ -106,6 +107,8 @@ walkdir = "2.4.0"
which = "6.0.0"
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }
+usage-lib = { path = './usage', features = ["clap"] }
+
[target.'cfg(unix)'.dependencies]
exec = "0.3.1"
diff --git a/completions/_mise b/completions/_mise
index ddc0b4dc6..546f9b79f 100644
--- a/completions/_mise
+++ b/completions/_mise
@@ -54,6 +54,7 @@ _mise() {
(remove|rm|uninstall) __mise_uninstall_cmd && ret=0 ;;
(unset) __mise_unset_cmd && ret=0 ;;
(up|upgrade) __mise_upgrade_cmd && ret=0 ;;
+ (usage) __mise_usage_cmd && ret=0 ;;
(u|use) __mise_use_cmd && ret=0 ;;
(v|version) __mise_version_cmd && ret=0 ;;
(w|watch) __mise_watch_cmd && ret=0 ;;
@@ -614,6 +615,7 @@ __mise_set_cmd() {
(( $+functions[__mise_settings_cmd] )) ||
__mise_settings_cmd() {
_arguments -s -S \
+ '--keys[Only display key names for each setting]' \
'(-C --cd)'{-C,--cd}'=[Change directory before running command]:cd:_directories' \
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
@@ -647,6 +649,7 @@ __mise_settings_get_cmd() {
(( $+functions[__mise_settings_ls_cmd] )) ||
__mise_settings_ls_cmd() {
_arguments -s -S \
+ '--keys[Only display key names for each setting]' \
'(-C --cd)'{-C,--cd}'=[Change directory before running command]:cd:_directories' \
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
@@ -845,6 +848,14 @@ __mise_upgrade_cmd() {
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
}
+(( $+functions[__mise_usage_cmd] )) ||
+__mise_usage_cmd() {
+ _arguments -s -S \
+ '(-C --cd)'{-C,--cd}'=[Change directory before running command]:cd:_directories' \
+ '(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
+ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
+ '(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
+}
(( $+functions[__mise_use_cmd] )) ||
__mise_use_cmd() {
_arguments -s -S \
@@ -939,6 +950,7 @@ __mise_cmds() {
{remove,rm,uninstall}':Removes runtime versions'
'unset:Remove environment variable(s) from the config file'
{up,upgrade}':Upgrades outdated tool versions'
+ 'usage:Generate usage spec'
{u,use}':Install tool version and add it to config'
'version:Show mise version'
{w,watch}':\[experimental\] Run a tasks watching for changes'
diff --git a/completions/mise.bash b/completions/mise.bash
index 3e86b6483..f0fc65bc2 100644
--- a/completions/mise.bash
+++ b/completions/mise.bash
@@ -183,6 +183,9 @@ _mise() {
mise,upgrade)
cmd="mise__upgrade"
;;
+ mise,usage)
+ cmd="mise__usage"
+ ;;
mise,use)
cmd="mise__use"
;;
@@ -441,6 +444,9 @@ _mise() {
mise__help,upgrade)
cmd="mise__help__upgrade"
;;
+ mise__help,usage)
+ cmd="mise__help__usage"
+ ;;
mise__help,use)
cmd="mise__help__use"
;;
@@ -718,7 +724,7 @@ _mise() {
case "${cmd}" in
mise)
- opts="-C -q -v -y -h -V --cd --debug --log-level --quiet --trace --verbose --yes --help --version activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
+ opts="-C -q -v -y -h -V --cd --debug --log-level --quiet --trace --verbose --yes --help --version activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall unset upgrade usage use version watch where which render-completion render-help render-mangen help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -1852,7 +1858,7 @@ _mise() {
return 0
;;
mise__help)
- opts="activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
+ opts="activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall unset upgrade usage use version watch where which render-completion render-help render-mangen help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -2817,6 +2823,20 @@ _mise() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
+ mise__help__usage)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
mise__help__use)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
@@ -3624,7 +3644,7 @@ _mise() {
return 0
;;
mise__render__completion)
- opts="-s -C -q -v -y -h --shell --cd --debug --log-level --quiet --trace --verbose --yes --help bash elvish fish powershell zsh"
+ opts="-s -C -q -v -y -h --shell --usage --cd --debug --log-level --quiet --trace --verbose --yes --help bash elvish fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -3891,7 +3911,7 @@ _mise() {
return 0
;;
mise__settings)
- opts="-C -q -v -y -h --cd --debug --log-level --quiet --trace --verbose --yes --help get ls set unset help"
+ opts="-C -q -v -y -h --keys --cd --debug --log-level --quiet --trace --verbose --yes --help get ls set unset help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -4039,7 +4059,7 @@ _mise() {
return 0
;;
mise__settings__ls)
- opts="-C -q -v -y -h --cd --debug --log-level --quiet --trace --verbose --yes --help"
+ opts="-C -q -v -y -h --keys --cd --debug --log-level --quiet --trace --verbose --yes --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -4752,6 +4772,38 @@ _mise() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
+ mise__usage)
+ opts="-C -q -v -y -h --cd --debug --log-level --quiet --trace --verbose --yes --help"
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ --cd)
+ COMPREPLY=()
+ if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
+ compopt -o plusdirs
+ fi
+ return 0
+ ;;
+ -C)
+ COMPREPLY=()
+ if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
+ compopt -o plusdirs
+ fi
+ return 0
+ ;;
+ --log-level)
+ COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}"))
+ return 0
+ ;;
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
mise__use)
opts="-f -g -e -j -p -C -q -v -y -h --force --fuzzy --global --env --jobs --raw --remove --path --pin --cd --debug --log-level --quiet --trace --verbose --yes --help [TOOL@VERSION]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
diff --git a/completions/mise.fish b/completions/mise.fish
index aeb19d966..ef1fb5e79 100644
--- a/completions/mise.fish
+++ b/completions/mise.fish
@@ -5,7 +5,7 @@ complete -kxc mise -s C -l cd -a "(__fish_complete_directories)" -d 'Change dire
complete -kxc mise -s q -l quiet -d 'Suppress non-error messages'
complete -kxc mise -s v -l verbose -d 'Show extra output (use -vv for even more)'
complete -kxc mise -s y -l yes -d 'Answer yes to all confirmation prompts'
-set -l others activate alias bin-paths cache completion config current deactivate direnv doctor env exec implode install latest link ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall unset upgrade use version watch where which
+set -l others activate alias bin-paths cache completion config current deactivate direnv doctor env exec implode install latest link ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall unset upgrade usage use version watch where which
complete -xc mise -n "not $fssf $others" -a activate -d 'Initializes mise in the current shell session'
complete -xc mise -n "not $fssf $others" -a alias -d 'Manage aliases'
complete -xc mise -n "not $fssf $others" -a bin-paths -d 'List all the active runtime bin paths'
@@ -39,6 +39,7 @@ complete -xc mise -n "not $fssf $others" -a trust -d 'Marks a config file as tru
complete -xc mise -n "not $fssf $others" -a uninstall -d 'Removes runtime versions'
complete -xc mise -n "not $fssf $others" -a unset -d 'Remove environment variable(s) from the config file'
complete -xc mise -n "not $fssf $others" -a upgrade -d 'Upgrades outdated tool versions'
+complete -xc mise -n "not $fssf $others" -a usage -d 'Generate usage spec'
complete -xc mise -n "not $fssf $others" -a use -d 'Install tool version and add it to config'
complete -xc mise -n "not $fssf $others" -a version -d 'Show mise version'
complete -xc mise -n "not $fssf $others" -a watch -d '[experimental] Run a tasks watching for changes'
@@ -241,6 +242,7 @@ complete -kxc mise -n "$fssf set" -l file -a "(__fish_complete_path)" -d 'The TO
complete -kxc mise -n "$fssf set" -s g -l global -d 'Set the environment variable in the global config file'
# settings
+complete -kxc mise -n "$fssf settings" -l keys -d 'Only display key names for each setting'
set -l others get ls set unset
complete -xc mise -n "$fssf settings; and not $fssf $others" -a get -d 'Show a current setting'
complete -xc mise -n "$fssf settings; and not $fssf $others" -a ls -d 'Show current settings'
@@ -251,6 +253,7 @@ complete -xc mise -n "$fssf settings; and not $fssf $others" -a unset -d 'Clears
complete -kxc mise -n "$fssf settings; and $fssf get" -a "(__mise_settings)" -d 'The setting to show'
# settings ls
+complete -kxc mise -n "$fssf settings; and $fssf ls" -l keys -d 'Only display key names for each setting'
# settings set
complete -kxc mise -n "$fssf settings; and $fssf set" -a "(__mise_settings)" -d 'The setting to set'
@@ -337,6 +340,8 @@ complete -kxc mise -n "$fssf upgrade" -s j -l jobs -d 'Number of jobs to run in
complete -kxc mise -n "$fssf upgrade" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1'
complete -kxc mise -n "$fssf upgrade" -a "(__mise_tool_versions)" -d 'Tool(s) to upgrade'
+# usage
+
# use
complete -kxc mise -n "$fssf use" -s e -l env -d 'Modify an environment-specific config file like .mise..toml'
complete -kxc mise -n "$fssf use" -s f -l force -d 'Force reinstall even if already installed'
diff --git a/docs/cli-reference.md b/docs/cli-reference.md
index 4bf5c384a..222e68615 100644
--- a/docs/cli-reference.md
+++ b/docs/cli-reference.md
@@ -44,10 +44,11 @@ Options:
Suppress non-error messages
Examples:
- $ eval "$(mise activate bash)"
- $ eval "$(mise activate zsh)"
- $ mise activate fish | source
- $ execx($(mise activate xonsh))
+
+ $ eval "$(mise activate bash)"
+ $ eval "$(mise activate zsh)"
+ $ mise activate fish | source
+ $ execx($(mise activate xonsh))
```
## `mise alias get `
@@ -67,8 +68,8 @@ Arguments:
The alias to show
Examples:
- $ mise alias get node lts-hydrogen
- 20.0.0
+ $ mise alias get node lts-hydrogen
+ 20.0.0
```
## `mise alias ls [OPTIONS] [PLUGIN]`
@@ -96,8 +97,9 @@ Options:
Don't show table header
Examples:
- $ mise aliases
- node lts-hydrogen 20.0.0
+
+ $ mise aliases
+ node lts-hydrogen 20.0.0
```
## `mise alias set `
@@ -122,7 +124,8 @@ Arguments:
The value to set the alias to
Examples:
- $ mise alias set node lts-hydrogen 18.0.0
+
+ $ mise alias set node lts-hydrogen 18.0.0
```
## `mise alias unset `
@@ -144,7 +147,8 @@ Arguments:
The alias to remove
Examples:
- $ mise alias unset node lts-hydrogen
+
+ $ mise alias unset node lts-hydrogen
```
## `mise bin-paths`
@@ -183,9 +187,10 @@ Arguments:
[possible values: bash, fish, zsh]
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
+
+ $ 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
```
## `mise config ls [OPTIONS]`
@@ -200,7 +205,8 @@ Options:
Do not print table header
Examples:
- $ mise config ls
+
+ $ mise config ls
```
## `mise config generate [OPTIONS]`
@@ -217,8 +223,9 @@ Options:
Output to file instead of stdout
Examples:
- $ mise cf generate > .mise.toml
- $ mise cf generate --output=.mise.toml
+
+ $ mise cf generate > .mise.toml
+ $ mise cf generate --output=.mise.toml
```
## `mise current [PLUGIN]`
@@ -236,19 +243,19 @@ Arguments:
Plugin to show versions of e.g.: ruby, node, cargo:eza, npm:prettier, etc
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
+ # 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
```
## `mise deactivate`
@@ -261,10 +268,11 @@ This can be used to temporarily disable mise in a shell session.
Usage: deactivate
Examples:
- $ mise deactivate bash
- $ mise deactivate zsh
- $ mise deactivate fish
- $ execx($(mise deactivate xonsh))
+
+ $ mise deactivate bash
+ $ mise deactivate zsh
+ $ mise deactivate fish
+ $ execx($(mise deactivate xonsh))
```
## `mise direnv activate`
@@ -281,9 +289,10 @@ direnv may not know to update environment variables when legacy file versions ch
Usage: direnv activate
Examples:
- $ mise direnv activate > ~/.config/direnv/lib/use_mise.sh
- $ echo 'use mise' > .envrc
- $ direnv allow
+
+ $ mise direnv activate > ~/.config/direnv/lib/use_mise.sh
+ $ echo 'use mise' > .envrc
+ $ direnv allow
```
## `mise doctor`
@@ -296,8 +305,9 @@ Check mise installation for possible problems
Usage: doctor
Examples:
- $ mise doctor
- [WARN] plugin node is not installed
+
+ $ mise doctor
+ [WARN] plugin node is not installed
```
## `mise env [OPTIONS] [TOOL@VERSION]...`
@@ -326,10 +336,11 @@ Options:
[possible values: bash, fish, nu, xonsh, zsh]
Examples:
- $ eval "$(mise env -s bash)"
- $ eval "$(mise env -s zsh)"
- $ mise env -s fish | source
- $ execx($(mise env -s xonsh))
+
+ $ eval "$(mise env -s bash)"
+ $ eval "$(mise env -s zsh)"
+ $ mise env -s fish | source
+ $ execx($(mise env -s xonsh))
```
## `mise exec [OPTIONS] [TOOL@VERSION]... [-- ...]`
@@ -370,14 +381,15 @@ Options:
Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1
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"
+ $ 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
+ # Run a command in a different directory:
+ $ mise x -C /path/to/project node@20 -- node ./app.js
```
## `mise implode [OPTIONS]`
@@ -434,10 +446,11 @@ Options:
Show installation output
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
+
+ $ 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
```
## `mise latest [OPTIONS] `
@@ -456,11 +469,12 @@ Options:
Show latest installed instead of available version
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
+ $ 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
```
## `mise link [OPTIONS] `
@@ -488,14 +502,14 @@ Options:
Overwrite an existing tool version if it exists
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
+ # 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
```
## `mise ls [OPTIONS] [PLUGIN]...`
@@ -540,29 +554,30 @@ Options:
Don't display headers
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"
+
+ $ 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": [...]
- }
+ ],
+ "python": [...]
+ }
```
## `mise ls-remote [OPTIONS] [TOOL@VERSION] [PREFIX]`
@@ -588,17 +603,18 @@ Options:
Show all installed plugins and versions
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
+ 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
+
+ $ mise ls-remote node 20
+ 20.0.0
+ 20.1.0
```
## `mise outdated [TOOL@VERSION]...`
@@ -615,14 +631,15 @@ Arguments:
If not specified, all tools in global and local configs will be shown
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
+ 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 plugins install [OPTIONS] [NEW_PLUGIN] [GIT_URL]`
@@ -661,18 +678,18 @@ Options:
Show installation output
Examples:
- # install the node via shorthand
- $ mise plugins install node
+ # 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 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 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
+ # install the node plugin using a specific ref
+ $ mise plugins install node https://github.com/mise-plugins/rtx-nodejs.git#v1.0.0
```
## `mise plugins link [OPTIONS] [PATH]`
@@ -700,11 +717,11 @@ Options:
Overwrite existing plugin
Examples:
- # essentially just `ln -s ./mise-node ~/.local/share/mise/plugins/node`
- $ mise plugins link node ./mise-node
+ # 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
+ # infer plugin name as "node"
+ $ mise plugins link ./mise-node
```
## `mise plugins ls [OPTIONS]`
@@ -734,13 +751,14 @@ Options:
e.g.: https://github.com/asdf-vm/asdf-nodejs.git
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
+ $ 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
```
## `mise plugins ls-remote [OPTIONS]`
@@ -787,7 +805,8 @@ Options:
Remove all plugins
Examples:
- $ mise uninstall node
+
+ $ mise uninstall node
```
## `mise plugins update [OPTIONS] [PLUGIN]...`
@@ -811,9 +830,10 @@ Options:
Default: 4
Examples:
- $ mise plugins update # update all plugins
- $ mise plugins update node # update only node
- $ mise plugins update node#beta # specify a ref
+
+ $ mise plugins update # update all plugins
+ $ mise plugins update node # update only node
+ $ mise plugins update node#beta # specify a ref
```
## `mise prune [OPTIONS] [PLUGIN]...`
@@ -837,9 +857,10 @@ Options:
Do not actually delete anything
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
+
+ $ mise prune --dry-run
+ rm -rf ~/.local/share/mise/versions/node/20.0.0
+ rm -rf ~/.local/share/mise/versions/node/20.0.1
```
## `mise reshim`
@@ -864,9 +885,10 @@ npm() {
Usage: reshim
Examples:
- $ mise reshim
- $ ~/.local/share/mise/shims/node -v
- v20.0.0
+
+ $ mise reshim
+ $ ~/.local/share/mise/shims/node -v
+ v20.0.0
```
## `mise run [OPTIONS] [TASK] [ARGS]...`
@@ -950,22 +972,23 @@ Options:
Shows elapsed time after each tasks
Examples:
- $ mise run lint
- 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 build --force
- Forces the "build" tasks to run even if its sources are up-to-date.
+ # 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
- $ mise run test --raw
- Runs "test" with stdin/stdout/stderr all connected to the current terminal.
- This forces `--jobs=1` to prevent interleaving of output.
+ # Forces the "build" tasks to run even if its sources are up-to-date.
+ $ mise run build --force
- $ mise run lint ::: test ::: check
- Runs the "lint", "test", and "check" tasks in parallel.
+ # 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
- $ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
- Execute multiple tasks each with their own arguments.
+ # 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
```
## `mise self-update [OPTIONS] [VERSION]`
@@ -1017,14 +1040,15 @@ Options:
Set the environment variable in the global config file
Examples:
- $ mise set NODE_ENV=production
- $ mise set NODE_ENV
- production
+ $ mise set NODE_ENV=production
+
+ $ mise set NODE_ENV
+ production
- $ mise set
- key value source
- NODE_ENV production ~/.config/mise/config.toml
+ $ mise set
+ key value source
+ NODE_ENV production ~/.config/mise/config.toml
```
## `mise settings get `
@@ -1044,11 +1068,12 @@ Arguments:
The setting to show
Examples:
- $ mise settings get legacy_version_file
- true
+
+ $ mise settings get legacy_version_file
+ true
```
-## `mise settings ls`
+## `mise settings ls [OPTIONS]`
**Aliases:** `list`
@@ -1060,11 +1085,16 @@ This is the contents of ~/.config/mise/config.toml
Note that aliases are also stored in this file
but managed separately with `mise aliases`
-Usage: settings ls
+Usage: settings ls [OPTIONS]
+
+Options:
+ --keys
+ Only display key names for each setting
Examples:
- $ mise settings
- legacy_version_file = false
+
+ $ mise settings
+ legacy_version_file = false
```
## `mise settings set `
@@ -1086,7 +1116,8 @@ Arguments:
The value to set
Examples:
- $ mise settings set legacy_version_file true
+
+ $ mise settings set legacy_version_file true
```
## `mise settings unset `
@@ -1105,7 +1136,8 @@ Arguments:
The setting to remove
Examples:
- $ mise settings unset legacy_version_file
+
+ $ mise settings unset legacy_version_file
```
## `mise shell [OPTIONS] [TOOL@VERSION]...`
@@ -1141,9 +1173,10 @@ Options:
Removes a previously set version
Examples:
- $ mise shell node@20
- $ node -v
- v20.0.0
+
+ $ mise shell node@20
+ $ node -v
+ v20.0.0
```
## `mise sync node <--brew|--nvm|--nodenv>`
@@ -1166,9 +1199,10 @@ Options:
Get tool versions from nodenv
Examples:
- $ brew install node@18 node@20
- $ mise sync node --brew
- $ mise use -g node@18 - uses Homebrew-provided node
+
+ $ brew install node@18 node@20
+ $ mise sync node --brew
+ $ mise use -g node@18 - uses Homebrew-provided node
```
## `mise sync python --pyenv`
@@ -1185,9 +1219,10 @@ Options:
Get tool versions from pyenv
Examples:
- $ pyenv install 3.11.0
- $ mise sync python --pyenv
- $ mise use -g python@3.11.0 - uses pyenv-provided python
+
+ $ pyenv install 3.11.0
+ $ mise sync python --pyenv
+ $ mise use -g python@3.11.0 - uses pyenv-provided python
```
## `mise tasks deps [OPTIONS] [TASKS]...`
@@ -1208,14 +1243,15 @@ Options:
Display dependencies in DOT format
Examples:
- $ mise tasks deps
- Shows dependencies for all tasks
- $ mise tasks deps lint test check
- Shows dependencies for the "lint", "test" and "check" tasks
+ # Show dependencies for all tasks
+ $ mise tasks deps
+
+ # Show dependencies for the "lint", "test" and "check" tasks
+ $ mise tasks deps lint test check
- $ mise tasks deps --dot
- Shows dependencies in DOT format
+ # Show dependencies in DOT format
+ $ mise tasks deps --dot
```
## `mise tasks edit [OPTIONS] `
@@ -1236,8 +1272,9 @@ Options:
Display the path to the tasks instead of editing it
Examples:
- $ mise tasks edit build
- $ mise tasks edit test
+
+ $ mise tasks edit build
+ $ mise tasks edit test
```
## `mise tasks ls [OPTIONS]`
@@ -1261,7 +1298,8 @@ Options:
Show hidden tasks
Examples:
- $ mise tasks ls
+
+ $ mise tasks ls
```
## `mise tasks run [OPTIONS] [TASK] [ARGS]...`
@@ -1345,22 +1383,23 @@ Options:
Shows elapsed time after each tasks
Examples:
- $ mise run lint
- 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 build --force
- Forces the "build" tasks to run even if its sources are up-to-date.
+ # 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
- $ mise run test --raw
- Runs "test" with stdin/stdout/stderr all connected to the current terminal.
- This forces `--jobs=1` to prevent interleaving of output.
+ # 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
- $ mise run lint ::: test ::: check
- Runs the "lint", "test", and "check" tasks in parallel.
+ # Runs the "lint", "test", and "check" tasks in parallel.
+ $ mise run lint ::: test ::: check
- $ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
- Execute multiple tasks each with their own arguments.
+ # Execute multiple tasks each with their own arguments.
+ $ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
```
## `mise trust [OPTIONS] [CONFIG_FILE]`
@@ -1390,11 +1429,11 @@ Options:
No longer trust this config
Examples:
- # trusts ~/some_dir/.mise.toml
- $ mise trust ~/some_dir/.mise.toml
+ # trusts ~/some_dir/.mise.toml
+ $ mise trust ~/some_dir/.mise.toml
- # trusts .mise.toml in the current or parent directory
- $ mise trust
+ # trusts .mise.toml in the current or parent directory
+ $ mise trust
```
## `mise uninstall [OPTIONS] [TOOL@VERSION]...`
@@ -1418,9 +1457,10 @@ Options:
Do not actually delete anything
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
+
+ $ 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
```
## `mise unset [OPTIONS] [KEYS]...`
@@ -1477,6 +1517,14 @@ Options:
Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1
```
+## `mise usage`
+
+```text
+Generate usage spec
+
+Usage: usage
+```
+
## `mise use [OPTIONS] [TOOL@VERSION]...`
**Aliases:** `u`
@@ -1533,19 +1581,20 @@ Options:
Set MISE_ASDF_COMPAT=1 to make this the default behavior
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
+ # 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
- # sets .mise.local.toml (which is intended not to be committed to a project)
- $ mise use --env local 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.staging.toml (which is used if MISE_ENV=staging)
- $ mise use --env staging 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
```
## `mise version`
@@ -1580,16 +1629,16 @@ Options:
Defaults to sources from the tasks(s)
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
+ 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 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.
+ $ mise run -t build --clear
+ Extra arguments are passed to watchexec. See `watchexec --help` for details.
```
## `mise where `
@@ -1610,15 +1659,15 @@ Arguments:
otherwise, it will show the current, active installed version
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
+ # 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
```
## `mise which [OPTIONS] `
@@ -1644,12 +1693,13 @@ Options:
e.g.: `mise which npm --tool=node@20`
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
+
+ $ 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
```
diff --git a/man/man1/mise.1 b/man/man1/mise.1
index 5173df04c..0df3cb033 100644
--- a/man/man1/mise.1
+++ b/man/man1/mise.1
@@ -128,11 +128,14 @@ Marks a config file as trusted
mise\-uninstall(1)
Removes runtime versions
.TP
+mise\-unset(1)
+Remove environment variable(s) from the config file
+.TP
mise\-upgrade(1)
Upgrades outdated tool versions
.TP
-mise\-unset(1)
-Remove environment variable(s) from the config file
+mise\-usage(1)
+Generate usage spec
.TP
mise\-use(1)
Install tool version and add it to config
@@ -153,31 +156,32 @@ mise\-help(1)
Print this message or the help of the given subcommand(s)
.SH EXTRA
Examples:
- $ mise install node@20.0.0 Install a specific node version
- $ mise install node@20 Install a version matching a prefix
- $ mise install node Install the node version defined in config
- $ mise install Install all plugins/tools defined in config
+
+ $ mise install node@20.0.0 Install a specific node version
+ $ mise install node@20 Install a version matching a prefix
+ $ mise install node Install the node version defined in config
+ $ mise install Install all plugins/tools defined in config
- $ mise install cargo:ripgrep Install something via cargo
- $ mise install npm:prettier Install something via npm
+ $ mise install cargo:ripgrep Install something via cargo
+ $ mise install npm:prettier Install something via npm
- $ mise use node@20 Use node\-20.x in current project
- $ mise use \-g node@20 Use node\-20.x as default
- $ mise use node@latest Use latest node in current directory
- $ mise use \-g node@system Use system node everywhere unless overridden
+ $ mise use node@20 Use node\-20.x in current project
+ $ mise use \-g node@20 Use node\-20.x as default
+ $ mise use node@latest Use latest node in current directory
+ $ mise use \-g node@system Use system node everywhere unless overridden
- $ mise up \-\-interactive Show a menu to upgrade tools
+ $ mise up \-\-interactive Show a menu to upgrade tools
- $ mise x \-\- npm install `npm install` w/ config loaded into PATH
- $ mise x node@20 \-\- node app.js `node app.js` w/ config + node\-20.x on PATH
+ $ mise x \-\- npm install `npm install` w/ config loaded into PATH
+ $ mise x node@20 \-\- node app.js `node app.js` w/ config + node\-20.x on PATH
- $ mise set NODE_ENV=production Set NODE_ENV=production in config
+ $ mise set NODE_ENV=production Set NODE_ENV=production in config
- $ mise run build Run `build` tasks
- $ mise watch build Run `build` tasks repeatedly when files change
+ $ mise run build Run `build` tasks
+ $ mise watch build Run `build` tasks repeatedly when files change
- $ mise settings Show settings in use
- $ mise settings set color 0 Disable color by modifying global config file
+ $ mise settings Show settings in use
+ $ mise settings set color 0 Disable color by modifying global config file
.SH VERSION
v2024.2.9
.SH AUTHORS
diff --git a/mise.usage.kdl b/mise.usage.kdl
new file mode 100644
index 000000000..650d6b94d
--- /dev/null
+++ b/mise.usage.kdl
@@ -0,0 +1,1203 @@
+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] "
+flag "-C --cd" help="Change directory before running command" global=true {
+ arg ""
+}
+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 ""
+}
+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 ""
+ }
+ flag "--status" help="Show \"mise: @\" 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 ""
+ }
+ 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. entry in ~/.config/mise/config.toml"
+ after_long_help r"Examples:
+ $ mise alias get node lts-hydrogen
+ 20.0.0
+"
+ arg "" help="The plugin to show the alias for"
+ arg "" 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]
+ 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 "
+ }
+ 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 "" help="The plugin to set the alias for"
+ arg "" help="The alias to set"
+ arg "" 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 "" help="The plugin to remove the alias from"
+ arg "" 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 "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 ""
+ }
+ 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 an .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 "