Refactred and extended metric api command line interface