If you’re familiar with React, this is a fantastic contribution to make!
I’m making this thread separately from tink: Implement ancillary subcommands because it’s more involved and I want more back-and-forth about the implementation.
I’d like a shiny new search command that allows interactive search + installation of packages from those results. The command should display things significantly better than the current CLI search and act as a damn good alternative to searching on the website. Additionally, it should use the new search endpoint off the configured registry instead of a third-party one.
tl;dr I’d like something like
emma cooked directly into
tink, but using tink for installations, and npm’s new search endpoint instead of Algolia. This command, depending on how it works out, is very likely to get slurped into the npm CLI proper eventually. Also, although
npm-suggestions is really cool, please don’t use that endpoint – it’s going to fall over as soon as npm’s userbase starts hitting it, and npm, Inc will need to build (and scale) its own version of this before we can do it.
My sketch for the UI is something like this:
$ tink search (no arguments = interactive mode. arguments = api mode) Find a package: foo Results: > foo @zkat p 95 q 41 m 69 bar @iarna p 100 q 84 m 35 baz @isaacs p 80 q 80 m 80 ... ...(53 more) Full Description: Does a foo thing and also this is a very long description, with the text wrapping on the bottom like this.