Skip to content

全局配置

全局配置文件位于 ~/.config/vx/config.toml

配置文件位置

平台路径
Linux~/.config/vx/config.toml
macOS~/.config/vx/config.toml
Windows%APPDATA%\vx\config.toml

配置示例

toml
[defaults]
auto_install = true
parallel_install = true
cache_duration = "7d"

[tools]
node = "lts"
python = "3.11"

配置选项

[defaults]

选项类型默认值描述
auto_installbooltrue自动安装缺失的工具
parallel_installbooltrue并行安装工具
cache_durationstring"7d"缓存持续时间

[tools]

工具的默认版本。

toml
[tools]
node = "lts"
python = "3.11"
go = "1.21"

管理配置

bash
# 显示配置
vx config show

# 设置值
vx config set defaults.auto_install true

# 获取值
vx config get defaults.auto_install

# 重置
vx config reset

# 编辑
vx config edit

基于 MIT 许可证发布