srevinsaju / zap

:zap: Delightful AppImage package manager
https://zap.srev.in
MIT License
508 stars 18 forks source link

Make zap install command more user friendly #42

Open srevinsaju opened 3 years ago

srevinsaju commented 3 years ago

As of now, zap has three modes of installation 1)

zap install inkscape  # gets the results from appimage.github.io

2)

zap install --from file:///path/to/downloaded.AppImage downloaded-appimage  # installs the appimage from a local file or URL

3)

zap install --github --from=srevinsaju/Firefox-AppImage firefox  # fetches the latest release from github and installs it

We might want to automatically infer the type of Installation source, for example, automatically figuring out if the path provided is a local file, or when to search in github,

For example

zap install srevinsaju/Firefox-AppImage

may be considered as a better command than what was mentioned in (3)

Or,

zap install ./firefox.AppImage

should probably automatically detect that the installation needs to be done from a local file.

srevinsaju commented 3 years ago

Awesome! Would be really cool! Thank you!

hadihammurabi commented 3 years ago

I fix it in #43

luni3359 commented 3 years ago

The first example you suggested seems really handy, but I can't help but feel it might cause conflicts with Gitlab.

srevinsaju commented 3 years ago

Agreed, I think we should perhaps use a non conflicting option like this

zap install github.com/libresprite/libresprite

@luni3359 what do you think?

srevinsaju commented 3 years ago

Also, I think, if github.com is not explicitly specified, we can fallback user/repo to fetching from github, but this is generally opinionated,. I am fine leaving them like that too

luni3359 commented 3 years ago

Yeah, that's what I thought too. Even if Gitlab exists, the fact that Github is by and large the most used of them all should warrant a fallback.

Though I think your suggestion on figuring out whether it's coming from Github or Gitlab to be pretty fancy. I feel like it'd be an user-friendly choice.