argument parser generator
last updated: Oct 20, 2023
https://github.com/matejak/argbash
Argbash is not a parsing library, but it is rather a code generator that generates a bash library tailor-made for your script. It lets you to describe arguments your script should take and then, you can generate the
bash
parsing code. It stays in your script by default, but you can have it generated to a separate file and letArgbash
to include it in your script for you. In any case, you won't needArgbash
to run the script.
Argbash
is very simple to use and the generated code is relatively nice to read. Moreover, argument definitions stay embedded in the script, so when you need to update the parsing logic, you just re-run theargbash
script on the already generated script.