Snapcraft `whoami`

With the introduction of UX for snap collaboration and transfer it makes sense now to introduce

snapcraft whoami

The output of the command should have the following to the minimum:

  • email used to login to the store
  • developer id


  • permissions of the login (macaroon scopes)

I am not stuck on a specific output format, but replicating that of snap info seems logical to keep output mechanisms in check for informational queries that are not as complicated as a channel map (as used in e.g.; snapcraft status).

If following snap info formatting fully, the output would look like:

$ snapcraft whoami
Developer-id: ID

The latter format looks good. I’d just suggest using lowercase fields as typical in our content elsewhere:

$ snapcraft whoami
developer-id:  ...
1 Like

thanks, will update with your comments

Yeah this is great. Not only is it useful for snap collaboration/transfer, but for model assertions. Saying "run snapcraft whoami" is way easier than saying “go to the store and find your account ID.”

1 Like

Can we have the same thing for snap please? This is useful when you have several accounts and you want to know which one you are logged in to.





shouldn’t it have a similar syntax?

Here’s the initial PR for those tracking