Configuration
vfox allows you to change some configurations, all configuration is stored in the $HOME/.version-fox/config.yaml file.
TIP
If you use vfox for the first time, an empty config.yaml file will be created automatically.
Legacy Version File >= 0.4.0
Plugins with support can read the versions files used by other version managers, for example, .nvmrc in the case of Nodejs's nvm.
This capability is turned on by default. The related configuration options are as follows:
legacyVersionFile:
enable: true
strategy: "specified" # Parsing strategyenable: Whether to enable legacy version file parsing functionalitystrategy: Parsing strategy, see strategy options below for details
Strategy Options
vfox supports the following three parsing strategies:
latest_installed: Use the latest installed versionlatest_available: Use the latest available versionspecified: Use the version specified in the legacy file (default)
WARNING
- If both
.tool-versionsand other version manager's configuration files (.nvmrc,.sdkmanrc, etc.) exist in the directory,vfoxpriority read the.tool-versionsfile. - Enabling this feature may cause
vfoxto refresh environment variables slightly slower, please enable it according to your needs.
If you want to disable this feature, you can use the command: vfox config legacyVersionFile.enable false
Proxy Settings
TIP
Currently only support http(s) proxy protocol
Format: http[s]://[username:password@]host:port
proxy:
enable: false
url: http://localhost:7890Storage Settings
By default, vfox stores SDK cache files in the $HOME/.version-fox/cache directory.
!!!
Before configuring, please make sure that vfox has write permission to the folder.⚠⚠⚠
storage:
sdkPath: /tmpPlugin Registry Address
vfox will default to retrieve plugins from plugins registry.
If you want to use your own registry or third-party mirror registry, please configure it following:
registry:
address: "https://version-fox.github.io/vfox-plugins"Available Mirrors
Cache Settings >= 0.5.0
vfox will cache the results of the search command (available hook) by default to reduce the number of network requests. The default cache time is 12h.
Special Value
-1: Never expire0: Do not cache
cache:
availableHookDuration: 12h # s second, m minute, h hourCache File Path
$HOME/.version-fox/plugins/<plugin-name>/available.cache
Config Command >= 0.4.0
Setup, view config
Usage
vfox config [<key>] [<value>]
vfox config proxy.enable true
vfox config proxy.url http://localhost:7890
vfox config storage.sdkPath /tmpkey: Configuration item, separated by . . value: If not passed, look at the value of the configuration item.
Options
-l, --list: list all config.-un, --unset: remove a config.
