generalized cli crud