main: add version flag
Merge pull request #1170 from jonboulle/version

main: add version flag