nh icon indicating copy to clipboard operation
nh copied to clipboard

Search functions in noogle.dev

Open viperML opened this issue 11 months ago • 4 comments

viperML avatar May 16 '25 18:05 viperML

Bro literally assigned me what

NotAShelf avatar May 17 '25 23:05 NotAShelf

@viperML what kind of an interface did you envision for this? I've started looking at such a feature, but I'm a little unsure how to add it. nh search strikes me as the most suitable candidate, however, nh search --target <nixpkgs | noogle> is probably a downgrade in terms of UX.

NotAShelf avatar Aug 03 '25 16:08 NotAShelf

I'm not sure, though I can throw in some options:

  • Search everything by default, merging the results and filtering with --pkg or --function.
  • Search packages by default, explictely pass -f/--function to search noogle.

viperML avatar Aug 05 '25 19:08 viperML

The latter is probably better UX and less backwards-incompatible. I was thinking of searching for packages by default (since that's what nix search does) and do something like --module, --function, etc. for other "providers".

On that note, I have plans to build an indexed database like nix-index, but more comprehensive and extensible. I'm sure we could think a bit more about this while I work on that.

NotAShelf avatar Aug 05 '25 19:08 NotAShelf