libprompt is a library to interpret CLI prompts. It can identify commands, options and option values.
You need to be able to compile C code. Installing build-essential for Debian-based distros or base-devel for Arch-based distros should be sufficient.
Just run:
$ make installTo uninstall:
$ make uninstallTake a look at gh source code, it uses libprompt and is very simple to understand.
Bug reports and pull requests are welcome :)