magnet whoami command shows the identity behind your current credentials — your user account when logged in via magnet login, or the workspace when MAGNET_API_KEY is set.
Usage
MAGNET_API_KEY takes precedence: if it’s set, whoami reports the workspace that owns the key, even if you’re also logged in as a user.