I want to use the architecture used by zig’s own parser to create a really fast cli argument parser, that supports all the goodies. Then we can hook it to python and typescript via FFI.
Syntax
This is not formal regex or anything
This is just for me to easily see what I need to implement
./binary --[a-Z0-9]+ [value]? -[aZ] [value]?- A
valuewill have its own parsers, for identifying the type of whats being parsed. i.e numbers, strings, ips, etc.., maybe for ffi it’s just more convenient to have just string and numbers. - A
valuecan be anumber,string,booleanor anenum. - A
valuecan also be a list of any of the previous types, separated by adelimiter. - A
valuecan also be of acustomtype that will be treated as astringand latter parsed by acustomparser in the target language liketypescriptorpython.
Features
- Support auto adding,
no-xvariants of axboolean flag and vis e versa. - Auto generated beautiful
helpmenu. - Autogenerated completions for most mainstream shells. (low priority).