rewrite opening for cli