devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Add a way to get information about a package before installing it

Open andbleo opened this issue 1 year ago • 2 comments

What problem are you trying to solve?

When I run devbox search blah, I get a list of packages matching that query with a list of available versions. If I am unsure what the exact package I am looking for is named, I find I need to look on https://search.nixos.org/packages to verify I am installing the correct package.

What solution would you like?

I can see a few possibilities:

  1. Add a one line blurb to the results of devbox search
    • Maybe with an added flag to add more context in the search results if adding more information would be a breaking change?
  2. Add a link to the package on https://search.nixos.org/packages in the devbox search results
  3. Add a new subcommand that returns information about a package
    • I thought that devbox info was that command, but that isn't available for devbox global and also only appears to work for packages that are already installed

Alternatives you've considered

No response

andbleo avatar Sep 14 '24 06:09 andbleo

@andbleo devbox info should do what you want (though I agree it could be improved).

I'm not sure what you mean by: "but that isn't available for devbox global". It should work with all packages:

devbox info nodejs
devbox info go

Possible improvements:

  • Add version support
  • Adds links to website with underlying source.

mikeland73 avatar Sep 16 '24 18:09 mikeland73

This is what I get when I run devbox info go:

Error: No devbox.json found in this directory, or any parent directories. Did you run `devbox init` yet?

I have only run devbox global add for everything I need so far, so it appears you can only run this command from within a devbox project, which is surprising.

andbleo avatar Sep 16 '24 18:09 andbleo

I think your suggestions @mikeland73 would be a really good improvement, right nowinfo only prints the description, but the URL to the package page would make this command so much more useful.

13013SwagR avatar Nov 11 '24 18:11 13013SwagR

I think we have two issues here:

  1. The info command could return more information about the package (like a URL)
  2. The info command should be usable outside of devbox projects so that it works nicely with devbox global

This issue is more about 2. When I created the issue, I was only using devbox as a global package manager, so I didn't have any devbox projects that I could run devbox info in (and it wasn't clear that that was required). I will edit this issue to better reflect that. Any additions to the info command can be raised in another issue.

andbleo avatar Nov 11 '24 21:11 andbleo