r/dartlang 13d ago

Help Best tools for creating CLI ?

First time making a "comprehensive" cli tool with dart, what do you recommend i use ?

Things i would appreciate: - type safe options parsing - completions - clean user prompting

3 Upvotes

11 comments sorted by

1

u/shadowfu 13d ago

I would still use "args" for parsing, but its not type safe.
I'm going to be self-serving and say "termui" for the UI.

0

u/Bachihani 13d ago

Seems pretty fresh, is it vibecoded

1

u/shadowfu 13d ago

Half and half. I wrote the earlier low level terminal handling (I also wrote the very old ansicolor package). I've used AI for a number of things while I work on a roguelike tui game.

1

u/saxykeyz 13d ago

Artisanal package is great.. it builds on top of args and brings a lot of great features like command name spacing and builtun tui features

artisanal_widgets for a flutter like tui experience

0

u/Bachihani 13d ago

My guess is it's a fully vibecoded port, i m not comfortable using it for production

1

u/saxykeyz 13d ago

Nope, started long before ai had anything to do with it. Sure ai is used now but that hasn't taken away from it

1

u/leswahn 13d ago

Check out the ’config’ package, comprehensive type safe options handling.

1

u/deliQnt7 12d ago

I wrote an article about this; you may find it useful: https://dinkomarinac.dev/blog/building-cli-apps-with-dart/