4 ms·
I've been using my own interface to easily define CLI applications: https://github.com/breuleux/coleo https://github.com/breuleux/coleo (kind of a work in progr
by breuleux 6y ago
I've been using my own interface to easily define CLI applications: https://github.com/breuleux/coleo https://github.com/breuleux/coleo (kind of a work in progress).
Admittedly, the way it works is kind of black magic, so it's probably not for everyone, but it's so simple: just annotate an existing variable with Option and it becomes a command-line argument. You can define options where they are used in the program instead of defining them in one spot and then using them somewhere else.