jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.03k stars 210 forks source link

Feature: Ability to Install local binaries #2292

Open nickchomey opened 2 weeks ago

nickchomey commented 2 weeks ago

Background

In https://github.com/jdx/mise/issues/2289 I was trying to use mise link to add a binary that already exists in the filesystem to mise, which would allow me to use mise to manage different versions of tools that I am building locally via Makefiles.

This would allow for more efficient iteration and testing across versions while developing a tool. But it would also open further options to mise, such as being able to manage tool versions that are installed via apt, brew, or anything else.

I was notified that link doesn't really work that way - it is more built on top of asdf plugins, i think (its still not quite clear to me how it works).

It was suggested that I leverage the backends mechanism for this, so I made a kludgy proof of concept for it by copying the directory and .mise.backend.json structure for the go backend (probably could work with other backends as well).

image

contents of .mise.backend.json

{"id":"go:ddev","name":"ddev","backend_type":"go"}

It seems to work, but is far from ideal. I will try to make a mise task that will do all of this and share it in another comment, but even that would not be ideal.

image


Request/Proposal

I think it would be great to have a built-in mechanism for installing binaries that already exist in the filesystem (be it from make, apt, or any other source - it shouldn't be relevant to mise where they came from.

I'm not sure what the best implementation would be. Some ideas:

We could then use the tool like mise use local:tool@version. Or, if #2293 can be implemented, then just mise use tool@version

Any thoughts and collaboration would be appreciated!