cli functionality, and json as default i/o