Add version option to cli util

Same as #328 but with fixed code style.