User Settings -> Account and security:
Then, it's in the Security section under API key.
The CLI has indeed no way to edit domains. What you did is the correct approach - make the dashboard available via the browser and then edit from the Domains view.
(As for the CLI warnings, looks like we have to replace request module with superagent. Sigh, we actually used to use superagent before...)