added line history support to cli wrapper