---
title: luna whoami
description: Show who this machine is logged in as, and the organisation, project and environment commands act on here.
related:
  - /concepts/organisations-projects-and-environments
  - /cli/login
  - /cli/orgs
---

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

```bash
luna whoami
```

## Reference

```bash
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

```bash
luna whoami
```

### Read the context in a script

```bash
luna whoami --json
```

### Check what an API token is

```bash
LUNA_TOKEN=<API_TOKEN> luna whoami
```
