Out Plane

whoami

Show the active credential.

read onlyrepeatable

Which credential is active, which team it belongs to, and when it expires.

Nothing is asked of the server. Expiry is read out of the token itself, so a token revoked in the console still looks fine here and fails on the next real command.

Usage

outplane whoami

Output

FieldTypeDescription
teamSlugstring | nullNull for a token supplied through the environment, which carries a team id but no slug.
teamIdstringAlways present.
tokenNamestring | nullThe label shown in the console, for a stored credential.
expiresAtstring | nullRFC 3339, read from the token.
daysLeftint | nullNull when the token never expires, negative once it has passed.
sourcestringWhere the credential came from (environment | config file | flag)

Examples

Show the active credential

outplane whoami

Check which team a script will act as

outplane whoami --json --fields teamSlug
{
  "teamSlug": "acme"
}

Check a specific team's stored credential

outplane whoami --team acme

What to Know

  • No network request is made. Expiry is read from the token itself, so a token revoked in the console still appears here until a command uses it.
  • With OUTPLANE_TOKEN set, teamSlug is null: a slug is only learned by signing in, and teamId is the identifier every API call actually uses.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
3authNot authenticated, token revoked or expired, or forbidden for this team.

The code on the error object is one of auth.not_authenticated, auth.team_not_signed_in. Branch on that, or on the exit status. The message is prose and changes.

On this page