Skip to content

Plugins ​

Plugins are how vfox knows to handle different tools like Node.js, Java, Elixir etc.

See Creating Plugins for the plugin API used to support more tools.

Available ​

View all available plugins.

Usage

shell
vfox available

Add ​

Add a plugin from the official repository or a custom source.

Usage

shell
vfox add [options] <plugin-name> [<plugin-name2>...]

plugin-name: Plugin name, such as nodejs. You can install multiple plugins at once, separated by spaces.

Options

  • -a, --alias: Set the plugin alias.
  • -s, --source: Install the plugin from the specified path (can be a remote file or a local file).

WARNING

--alias and --source are not supported when adding multiple plugins. Passing multiple plugin names exits non-zero if any plugin fails to add.

Examples

Install plugin from the official repository

shell
$ vfox add --alias node nodejs

$ vfox add golang java nodejs

Install custom plugin

shell
$ vfox add --source https://github.com/version-fox/vfox-nodejs/releases/download/v0.0.5/vfox-nodejs_0.0.5.zip custom-node

Info ​

View the SDK information installed locally.

Usage

shell
vfox info <plugin-name>
vfox info <plugin-name>@<version>
vfox info [options] <plugin-name>

plugin-name: Plugin name, such as nodejs. version: Specific version of the plugin.

Options

  • -f, --format: Format the output using the given Go template. Available fields:
    • For plugin info: Name, Version, Homepage, InstallPath, Description
    • For version info: Name, Version, Path, Home, Origin, Target
  • --json: Output as JSON. For a version it adds the environment the plugin sets up and the receipt vfox keeps.

For a version, Home is the main runtime directory of the SDK, the one to point JAVA_HOME and the like at. Path is the directory that holds it (the version directory) and is kept as it always was. Origin is installed or linked (see vfox link), and Target is the directory a linked version points to.

Examples

View plugin information

shell
vfox info nodejs

View specific version path

shell
vfox info nodejs@20.0.0

Format output with template

shell
vfox info --format "{{.Homepage}}" nodejs
vfox info --format "{{.InstallPath}}" nodejs
vfox info --format "{{.Path}}" nodejs@20.0.0
vfox info --format "{{.Home}}" nodejs@20.0.0

Machine-readable output

shell
vfox info --json java@17.0.9

Remove ​

Remove the installed plugin.

Usage

shell
vfox remove <plugin-name>

DANGER

vfox will remove all versions of the runtime installed by the current plugin.

Update ​

Update a specified or all plugin(s)

Usage

shell
vfox update <plugin-name>
vfox update --all # update all installed plugins

Released under the Apache 2.0 License.