asdf-local
Asdf is an all-in-one tool manager designed to replace individual language specific version managers such as pyenv, nvm, rbenv, etc.
The asdf-local resource loads installed tools into the path
specified by directory or directories so that they are available to use. In asdf, installed
tools must be added to a .tool-versions file for that tool to be available in that
directory or any subdirectories. Tools that are not loaded are not available.
See the main page for an overview of the various asdf resources.
Parameters:
-
plugin: (string, required) The name of the asdf plugin. The plugin must already be installed on the system using
asdf.pluginorasdf-plugin. -
version: (array[string], required) The version of the tool to load. The version must already be installed on the system. Install tool versions using the
asdf-pluginorasdf-installresources. -
directory: (string) The directory to load the tool. This parameter accepts both relative and absolute paths. One of
directoryordirectoriesmust be specified. -
directories: (array[string]) A list of directories to load the tool in. This parameter accepts both relative and absolute paths. One of
directoryordirectoriesmust be specified.
Example usage:
Install asdf and load golang in /my/golang/project:
[ { "type": "asdf" }, { "type": "asdf-plugin", "plugin": "golang", "versions": ["latest"] }, { "type": "asdf-local", "plugin": "golang", "version": "latest", "directory": "~/my/golang/project" }]Install asdf and load nodejs in multiple directories
[ { "type": "asdf" }, { "type": "asdf-plugin", "plugin": "nodejs", "versions": ["latest", "20.18.0"] }, { "type": "asdf-local", "plugin": "nodejs", "version": "20.18.0", "directories": ["~/projects", "~/Documents"] }]Dependencies:
asdf-local has a hard dependency on asdf being installed on the system already or
asdf being in the config.
asdf-local also requires that the plugin and tool version be already installed on the system.
Plugins and tools can be installed using
asdf-plugin or
asdf-install.