Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

luna whoami

Show who this machine is logged in as, and the organisation, project and environment commands act on here.

luna whoami prints who commands act as, and the organisation, project and environment they act on in this folder.

luna whoami

Reference

luna whoami [OPTIONS]
Option Type Default Does
--json flag Off Prints the answer as JSON, with the context under context.
--token <TOKEN> text LUNA_TOKEN, then your login An API token or account key to ask about.

Good to know

  • The first line is Account with your email, or Token with the token’s id and name when commands act with an API token.
  • Organisation is the one commands act on when none is named. Project and Environment are the ones this folder’s env file names. Each one reads none when nothing is chosen.
  • On a machine that is not logged in, and with no LUNA_TOKEN, the command stops with exit code 3.
  • It changes nothing, so it is safe to run first in any script or agent session.

Examples

Check what a command would act on

luna whoami

Read the context in a script

luna whoami --json

Check what an API token is

LUNA_TOKEN=<API_TOKEN> luna whoami

Was this page helpful?