Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guess sensible defaults for interactive installs #109

Open
iainelder opened this issue Apr 18, 2023 · 2 comments
Open

Guess sensible defaults for interactive installs #109

iainelder opened this issue Apr 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@iainelder
Copy link

Is your feature request related to a problem? Please describe.

The problem is that invoking this tool is not memorable. Its clearly better than writing a custom shell script for each installation, but it's still not quite there for interactive use.

If you tell me gh-release-install (ghr) is on PyPI, I already know how to install it interactively:

pipx install gh-release-install

Then I can use it to install qsv like this:

gh-release-install \
--extract "qsv" \
"jqnatividad/qsv" \
"qsv-{tag}-x86_64-unknown-linux-musl.zip" \
"${HOME}/.local/bin/qsv"

Or to install aws-sso-cli like this:

gh-release-install \
"synfinatic/aws-sso-cli" \
"aws-sso-{version}-linux-amd64" \
"${HOME}/.local/bin/aws-sso"

But it still takes a while to figure it out. Even if I memorize the order and the names of the parameters, I probably need to look up the asset format each time and maybe even unzip it once to know what I'm looking for.

Describe the solution you'd like

(Assume ghr is an alias of gh-install-release.)

For aws-sso-cli I expect the following to work:

ghr synfinatic/aws-sso-cli

I'd like ghr to figure out the asset format by itself and to pick the right one when I don't tell it anything.

I'd like ghr to install automatically to some folder without me having to set it each time. It doesn't have to be $HOME/.local/bin, but something that I would reasonably add to PATH.

For qsv I would accept something like this following:

gh-release-install "jqnatividad/qsv" --extract qsv --platform-hint musl

The qsv release has more than one binary, so I need to tell it which one. (On the other hand, I would be okay with it extracting all of them by default.)

In this case I need to give the musl hint, but if I hadn't, I'd expect it to install the glibc version. (I need to use the musl version on Ubuntu 20 because its glibc version is too old.)

Describe alternatives you've considered

Rishang's install-release does the right thing most of the time. For simple releases, it's what I use. But it's currently not flexibile enough to handle a case like qsv.

Finally...

Thanks for the effort put into this tool! It really helps to fill in the gap between a "released" program and an "installable" one.

@iainelder iainelder added the enhancement New feature or request label Apr 18, 2023
@jooola
Copy link
Owner

jooola commented May 19, 2023

Hi,
The tool is indeed difficult to use interactively, but that is not its goal, at least when I created it.

The idea you are proposing is interesting, but I don't know if I want to provide that much magic.
The amount of magic here is something I would hate to debug if some bug occurs because I downloaded the wrong file because the guessing is off, or the maintainers decided to change the naming of their files/binaries.

Let's leave this ticket open for now.

@iainelder
Copy link
Author

This is the only install-from-Github tool I know that allows explicit control over all the edge cases, and that is still really valuable to me. In fact, so far it's the only tool I would consider to drive a scripted installation of all my Github-sourced tools.

I don't know if I want to provide that much magic.

Refusal to maintain the magic is a good enough reason for me to close this.

My current go-to interactive installer is Rishang's install-release. It does sometimes guess wrong because of the wacky things that publishers may do, and there's no way to override it.

And we already have redraw's gh-install with a really nice interactive experience but no automation.

Your tool fills that automation niche.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants