asdf

Table of Contents

1. Concept

  • asdf is not intended to be a system package manager. It is a tool version manager.
  • you basically download a plugin(eg. nodejs/python) and then download its corresponding versions/packages(eg. v16, v18)
  • it can be used to set global versions of the tool using the asdf global command.

2. Plugin

2.1. List

asdf plugin list all # plugins from https://github.com/asdf-vm/asdf-plugins, not super useful
asdf plugin list --urls # installed plugins

2.2. Install

asdf plugin add <plugin_name> # if plugin exists in https://github.com/asdf-vm/asdf-plugins
asdf plugin add <plugin_name> https://github.com/xxx.git # custom git repo

2.3. Update/Remove

asdf plugin remove <plugin_name>
asdf plugin update <plugin_name>

3. Package versions

3.1. List

asdf list <plugin_name> # list installed versions
asdf list all <plugin_name> # remote versions

3.2. Install

asdf install # if .tool-versions is available, it'll download the versions
asdf install <plugin_name> <version> # most basic usecase

3.3. Set

asdf global <plugin_name> <version> # sets the global version by creating .tool-versions in $HOME
asdf local <plugin_name> <version> # sets the local version by creating .tool-versions
asdf shell <plugin_name> <version> # sets the version for current shell session

4. Others

asdf direnv local # initiate direnv for asdf
  • Sometimes after python update/global change, building aur packages cry

    pip install --user requests build installer wheel
    

Created: 2024-07-16 Tue 16:44

Validate