rewrite cli