Thanks for your prompt attention. Couple related mentions:
on line 288, the condition should not check for help flag here, and code should EXIT_FAILURE (due to inadequate num of cmdline arguments).
why not use getopt_long() instead?
would suggest version number be put in variable near top of "main.cpp" rather than use hardcoded string (line 406); in its current location, very likely to not be updated (forgotten/missed) when other maintenance changes occur.
Thanks for looking into the code and the suggestions.
I do check the "-h" flag again in line 401. Now I've removed the checking on line 288 and changed all the exit code on exceptions to EXIT_FAILURE.
I don't think getopt functions works well on the options with multiple arguments, such as "-k" and "-K" in our case. (Though it definitely can be resolved)
I've created a string LIGHTER_VERSION near the top of main.cpp as you suggested.
Please add explicit cmdline options for both help and version information.