cli rewrite and docs