Register REST API Key applications via command line

We are trying to streamline the process and automate the registration of rest api key applications via command line or rest endpoint. Is there a way to automate this process without having to go through the portal?