mise

多版本管理工具,支持多种后端,自动选择,更好用

安装命令

1
curl https://mise.run | sh

~/.profile

1
2
3
4
5
6
7
8
9
10
11
12
# 普通配置
eval "$(mise activate zsh)"

# cursor 下
if [[ "$TERM_PROGRAM" == "vscode" && "$CHROME_DESKTOP" == "cursor.desktop" && -z "$CURSOR_INITED" ]]; then
# echo "cursor shell"
export CURSOR_INITED=1
sh -c $SHELL
else
# 系统 shell
eval "$(mise activate zsh)"
fi

所在路径

1
2
3
4
$HOME/.local/bin/mise
$HOME/.config/mise/
$HOME/.local/share/mise/
$HOME/.local/state/mise/

搜索

1
2
3
4
5
mise search xxx
mise ls

# 可以看 tag
mise ls-remote node

安装并且写入 toml

1
2
3
4
5
mise use node@22
mise use -g node@lts

# 从 toml 里面删除
mise unuse node@22

安装卸载

1
2
mise install node@22
mise uninstall node@22

更新

1
mise self-update