logoalt Hacker News

paradox460last Sunday at 7:14 PM1 replyview on HN

I've started using jdx's usage[1] for my clis. It integrates neatly into clap, and can be used stand alone in scripts. It can generate completions, argparse, manpages, and more

I'm still on the fence if replacing the argparse blocks in my fish scripts is worth the hassle, but against things like old school optparse, it's far better

[1]: https://usage.jdx.dev/


Replies

FujiApplelast Sunday at 11:50 PM

I’ve recently been building a similar tool [1] which defines a specification for CLIs, though the goals are slightly different to the tool you mention I think. I just added support for fish as it happens.

[1] https://github.com/fujiapple852/claptrap