jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
8.72k stars 203 forks source link

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

Open andbleo opened 1 month ago

andbleo commented 1 month ago

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

mikeland73 commented 1 month ago

@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:

andbleo commented 1 month ago

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.