babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
360 stars 26 forks source link

Feature request: a flag that does what `dep search` already does, but works for multiple artifacts and outputs a string suitable for `-Sdeps` #204

Open p-himik opened 5 months ago

p-himik commented 5 months ago

An example workflow: suppose I want to test out traversy and specter in a quick plain clj-based REPL.

What I usually do:

  1. neil dep search traversy
  2. neil dep search specter
  3. Get the right values
  4. Compose clj -Sdeps '{:deps {...}}' manually
  5. Run

What I'd like to be able to run instead, approximately:

  1. clj -Sdeps "$(neil deps-edn traversy specter)"
  2. "Failure: more than one matches for 'specter', please specify" followed by a list of matches
  3. clj -Sdeps "$(neil deps-edn traversy com.rpl/specter)"
borkdude commented 5 months ago

Oh that would indeed be convenient!

kpassapk commented 5 months ago

I have been using deps-try for this, and I have loved it so far. This library targets the (rebl-readline) REPL and AFAIK doesn't provide a way to write out a deps.edn file. This would achieve a similar result but allow users to continue adding more dependencies. Seems like a plus.

p-himik commented 5 months ago

Ah, neat, didn't know about deps-try. But there are a couple of things that get in the way of using it: