Fork me on GitHub
#announcements
<
2024-02-17
>
plexus12:02:03

I'm happy and proud to announce the arrival of com.lambdaisland/cli, our take on CLI argument and subcommand handling https://github.com/lambdaisland/cli • Enforce or strongly encourage existing CLI conventions • Concise, low ceremony, and flexible • Generate excellent help text • Zero dependencies, bb compatible • Passes vibe check

clojure-spin 8
👀 7
🎉 12
lambdaisland 1
mkvlr13:02:58

hey arne, congrats on the release! I’d be interested in how this compares to https://github.com/babashka/cli.

1
plexus13:02:40

I'd be interested too! You'd have to read the READMEs and compare. Many small and less small differences in design, which you may or may not find more intuitive. I think the specification of commands and flags strikes a good balance between conciseness and expressiveness. The ability to take docstrings and other configuration from var metadata is compelling. In general it looks like li.cli is more opinionated and framework-y (we call you), while bb.cli is more a collection of pieces. E.g. we implement --help for you, while bb.cli gives you building blocks to do it yourself.

🙏 1
Anders Olsson10:02:25

Looking good 👌 One thing most cli libs are missing is shell completion. I really like the Typer python lib for this reason, atleast for fish shell you even get completions as you develop, so you do not need to reinstall the completions as you change the script. I believe it hooks the script itself into the fish completion system.

👀 1
plexus12:02:06

yeah that would definitely be nice. Implementing shell completion is notoriously dense and cryptic, and you'd need to do at least bash and zsh (IMO), which are completely different... a feature I'd love to have, and maybe one day will add, but not one I look forward to writing.

Anders Olsson20:02:41

Yes, not trivial but definitely doable. I wonder if there is a library somewhere that abstracts completions and generates all the bits and pieces for the different shells (bash/zsh/fish)? Fish also has inline docs, maybe the other do too nowadays? This is for example what I get when typing "ls -" then tab:

plexus12:02:38

We also released a new point release of deep-diff2, with thanks to @djblue and @rutledgepaulv • preserve metadata • more consistent key handling for maps with varying key order https://github.com/lambdaisland/deep-diff2/releases/tag/v2.11.216

🎉 12
Eric Dvorsak18:03:42

thanks I love this lib!

Niki21:02:15

Weekend drop: https://github.com/tonsky/clj-reload! A replacement for tools.namespace that does a few things differently: • Can handle namespaces split across multiple files • Does not try to load files that were not explicitly loaded before • Can keep vars between reloads (defonce finally works as intended!) • Lets you specify unload hooks for namespaces • (arguably) cleaner API Here’s a blog post with a video demonstration https://tonsky.me/blog/clj-reload/

♻️ 27
👍 24
😍 12
🙏 7
❤️ 6
gratitude 4
1
Petar Radosevic07:02:18

Amazingly useful. Thanks for releasing this!

❤️ 1
John16:02:02

(insignificant) typo; "persistet"

🙏 1