Integrate pad rewriting into cli.