Provide a way to add or link up externally installed tool versions
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 941
- Avg merge
- 9h 24m
- Merged PRs (30d)
- 3
Description
### Is your feature request related to a problem? Please describe
I have many java versions installed on my machine by different ways: like **homebrew** or **IntellIJ IDEA**.
I want to be able to manager them from a singular place, and currently asdf does not have an extension point.
### Describe the proposed solution
#### Proposal no. 1:
Add a new command that plugins can implement: `asdf add `
For example:
`asdf add java azul-11.0.20-aarch64 ~Library/Java/JavaVirtualMachines/azul-11.0.20-aarch64/`
- This would make the given version name be available for chosing with `asdf shell|local|global `
- Could be also named `asdf link`, since it links up versions.
#### Proposal no. 2:
Make the existing install command work with local paths: `asdf install --name=`
This would be probably more elegant way to handle things for the CLI - however, it needs to be designed a bit more carefully, to make it's usage simple and easily discoverable.
Maybe:
- `asdf install `
- tries to install if it exists in the downloadable versions.
- `asdf install --from=`
- checks if the version name is downloadable, and warns the user?
- links up the version to point to the specified location
- considered other names: `--local` or `--location`
### Describe similar `asdf` features and why they are not sufficient
- asdf alias plugin:
- pro: creates linked versions
- con: made for another purpose - links to the same directory
- con: seems like something that should be a core functionality (as it refers to other plugin install versions)
- asdf install:
- con: tried if it supports it already, but it does not
### Describe other workarounds you've considered
Manually creating symlinks between the local install locations and the respective asdf plugin install directory.
This does not work for me: the java plugin has `java_macos_integration_enable` that makes it work nicely with MacOS's `/usr/libexec/java_home`.
Contributor guide
Research direction
Review the existing `asdf install`, `asdf shell`, `asdf local`, and `asdf global` command behavior, along with the alias plugin workaround. Compare the two proposed interfaces and define how an externally installed version is registered, selected, and validated; done means the chosen workflow is implemented with clear plugin behavior and documented command semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100