> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account: org, keys, members, billing, exports

> Read your organization, API keys, members, invitations, billing, usage history and exports from the anona CLI, and which of those need anona login --cli.

pip 0.26.0; npm 0.20.0

These commands read the account around your spaces rather than the memories in
them. They call the control plane, which an API key does not reach.

## Which credential they need

**Every command on this page that sends a request needs the command-line login from [`anona login --cli`](https://docs.anonalabs.com/cli/sign-in#with-anona-login)**,
except plain `anona usage` (your credit balance), which an API key can read too.
Only the `exports` commands take `--space`.
An API key or a temporary profile gets exit `4` with `session_required`:

```text theme={null}
anona: session_required: This needs a dashboard session or `anona login --cli`; an API key or temporary profile cannot use it.
```

If you are signed in with `anona login --cli` and still get `session_required`,
an API key is set: `--api-key`, `ANONA_API_KEY` or `~/.anona/config.env` outranks
the login. Unset the key, or run the command without it, to use the login.

The credential matrix, and the fixed list of routes a CLI login may call, is in
[Authentication](https://docs.anonalabs.com/api-reference/authentication.md#which-credential-each-route-accepts).
Your role and organization are read from your membership on every request, so
being removed or demoted applies to the CLI within 30 seconds.

## Reading the account

```bash theme={null}
anona org
anona orgs list
anona projects list
anona keys list
anona members list
anona members me
anona members invitations
anona billing
anona billing topups
anona usage --history --days 30
anona usage --breakdown --days 7
```

| Command | Prints | `--json` |
| - | - | - |
| `org` | `<org_id>  <name>  <slug>` | `{"org_id", "name", "slug", ...}` |
| `orgs list` | `<id>  <name>  <role>` for each organization you belong to | `{"orgs": [...], "max_orgs"}` |
| `projects list` | `<id>  <name>` | `[{"project_id", "name", "description"}]` |
| `keys list` | `<prefix>…  <name>  <created_at>  <last_used_at>`. **Never the secret** | `[{"id", "name", "key_prefix", "env", "created_at", "last_used_at", "status"}]` |
| `members list` | `<member_id>  <email>  <role>` | `[{"member_id", "email", "role", ...}]` |
| `members me` | who you are signed in as | `{"member_id", "email", "role", ...}` |
| `members invitations` | invitations your organization has sent | `{"invitations": [...]}` |
| `billing` | your plan, credits and the period end | `{"plan_id", "plan_name", "credits_limit", "credits_used", "credits_remaining", ...}` |
| `billing topups` | your top-up purchases | `{"items": [...]}` |

`usage` with no flag is unchanged: your credit balance, which an API key can
also read ([profile, user-profile, usage](https://docs.anonalabs.com/cli/profiles-and-usage.md#usage)). Two flags turn
it into a history, and these need `anona login --cli`:

| Flag | |
| - | - |
| `--history` | Daily operation counts instead of the credit balance |
| `--breakdown` | Operation counts per space instead of the credit balance |
| `--days N` | With either: how many days back, 1-365, default 30 |

## Invitations

```bash theme={null}
anona invitations pending
anona invitations accept TOKEN
anona invitations decline TOKEN
```

`pending` lists what is waiting on you, with each invitation's `token`.
`accept` prints `Joined <org>.` (or the space you were given access to);
`decline` prints `Declined.`. Accepting checks that your signed-in email is the
invited address, so a forwarded token does not hand over the seat.

## Exports

```bash theme={null}
anona exports create --space notes
anona exports list --space notes
anona exports download JOB_ID --out notes.zip --space notes
```

An export is a downloadable bundle of one space. Only the space's owner can
start one. `exports create` prints `Export <job_id> started.`; `exports list`
prints `<job_id>  <status>  <created_at>`; `exports download` saves the file and
prints `Saved <bytes> bytes to <FILE>.`.

The file comes from a short-lived download link. If the link has expired or its
storage refuses it, the command exits `7` and prints
`anona: download link expired or refused (HTTP <status>); run download again.`
Running `exports download` again asks for a fresh link.

| Flag | |
| - | - |
| `--out FILE` | Where to save it. Default: `anona-export-JOB_ID.zip` |
| `--yes` | Overwrite `FILE` if it already exists. Without it, an existing file makes the command exit `2` with `Nothing was sent.` |

**`--json`:** `create` prints `{"job_id", "space_id", "status", "created_at"}`,
`list` prints `{"items": [...], "total"}`, and `download` prints
`{"job_id", "path", "bytes"}`, written by the CLI after saving the file.

## Done in the dashboard

Anything that creates, changes or spends is not a CLI command. These print one
line to stderr, send **nothing**, and exit `4`:

| Command | Prints |
| - | - |
| `anona keys create`, `anona keys revoke` | `anona: creating an API key is done in the dashboard: https://memory.anonalabs.com/dashboard/keys` |
| `anona billing upgrade`, `checkout`, `topup`, `cancel`, `portal` | `anona: upgrading your plan is done in the dashboard: https://memory.anonalabs.com/dashboard/billing` |
| `anona org rename`, `delete`, `transfer`, `leave` | `anona: renaming the organization is done in the dashboard: https://memory.anonalabs.com/dashboard/profile` |
| `anona members invite`, `anona members remove` | `anona: inviting a member is done in the dashboard: https://memory.anonalabs.com/dashboard/members` |
| `anona spaces members remove SPACE MEMBER_ID` | `anona: removing a space member is done in the dashboard: https://memory.anonalabs.com/dashboard/spaces/SPACE` |

The verb in the sentence (`upgrading your plan`, `renaming the organization`, ...)
follows the command you typed. Any further arguments, and `--yes`, are accepted
and ignored: the command still sends nothing and exits `4`. Listing a
**space's** members is a CLI command: see [`spaces members list`](https://docs.anonalabs.com/cli/space-config#space-members).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.