update phrame to optionally work as cli tool