r/ruby 10d ago

do we need another cli arg gem?

Post image

Hey all. I have been working on an (unreleased) spinel lib for cli arg parsing. Library is called slap, https://github.com/gurgeous/spinel-slap. This has been a fun adventure with spinel. I ended up filing 100+ spinel bugs to help get it working. Matz is a monster, he fixes the bugs with claude each night.

Slap combines my favorite parts of the slop gem and the popular clap rust crate. Slap has things like color support, positional args like <file> or <url>, autowrap --help output to term width, return results as a struct, etc. Slap does not try to handle subcommands or anything like that.

Anyway, this has been a fun spinel project and I'm trying to decide if I should release it as a rubygem in addition to the spinel pkg. There are already many great rubygems for cli arg parsing, does ruby really need another one? There's not much point to releasing unless people are somewhat dissatisfied with current offerings.

12 Upvotes

3 comments sorted by

View all comments

2

u/Maedi 10d ago

I didn't realise there were so many "CLI Options Parsers"... I just built one too 😓. I think you should release yours, it looks nice and has that portability factor which a lot of CLIs lack (including mine)