added keys method and updated cli to use new api