asdf encompasses both the sharable
.tool-versions files as well as user specific customisations with
.asdfrc and Environment Variables.
.tool-versions file is present in a directory, the tool versions it declares will be used in that directory and any subdirectories.
Global defaults can be set in the file
This is what a
.tool-versions file looks like:
ruby 2.5.3 nodejs 10.15.0
The versions can be in the following format:
10.15.0- an actual version. Plugins that support downloading binaries, will download binaries.
ref:39cb398vb39- tag/commit/branch to download from github and compile
path:/src/elixir- a path to custom compiled version of a tool to use. For use by language developers and such.
system- this keyword causes asdf to passthrough to the version of the tool on the system that is not managed by asdf.
Multiple versions can be set by separating them with a space. For example, to use Python
3.7.2, fallback to Python
2.7.15 and finally to the
system Python, the following line can be added to
python 3.7.2 2.7.15 system
To install all the tools defined in a
.tool-versions file run
asdf install with no other arguments in the directory containing the
To install a single tool defined in a
.tool-versions file run
asdf install <name> in the directory containing the
.tool-versions file. The tool will be installed at the version specified in the
Edit the file directly or use
asdf local (or
asdf global) which updates it.
.asdfrc file to your home directory and asdf will use the settings specified in the file. The file below shows the required format with the default values to demonstrate:
legacy_version_file = no use_release_candidates = no always_keep_download = no plugin_repository_last_check_duration = 60
Plugins with support can read the versions files used by other version managers, for example,
.ruby-version in the case of Ruby's
|Use plugin fallback to legacy version files (|
asdf update command to upgrade to the latest Release Candidate instead of the latest Semantic Version.
|Semantic Version is used|
|Release Candidate is used|
asdf install command to keep or delete the source code or binary it downloads.
|Delete source code or binary after successful install|
|Keep source code or binary after install|
Configure the duration since the last asdf plugin repository sync to the next. Commands
asdf plugin add <name> or
asdf plugin list all will trigger a check of the duration, if the duration has passed then a sync occurs.
|integer in range ||Sync on trigger event if duration since last sync has passed|
|Sync on each trigger event|
ASDF_CONFIG_FILE- Defaults to
~/.asdfrcas described above. Can be set to any location.
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME- The filename of the file storing the tool names and versions. Defaults to
.tool-versions. Can be any valid filename. Typically you should not override the default value unless you know you want asdf to ignore
ASDF_DIR- Defaults to
~/.asdf- Location of the
asdfscripts. If you install
asdfto some other directory, set this to that directory. For example, if you are installing via the AUR, you should set this to
ASDF_DATA_DIR- Defaults to
~/.asdf- Location where
asdfinstall plugins, shims and installs. Can be set to any location before sourcing
asdf.fishmentioned in the section above.
Users should not worry about this section as it describes configuration internal to
asdf useful for Package Managers and integrators.
$ASDF_DIR/asdf_updates_disabled: Updates via the
asdf updatecommand are disabled when this file is present (content irrelevant). This is used by Package Managers like Pacman or Homebrew to ensure the correct update method is used for the particular installation.