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

# Workspaces and environments

> Teams, environments that never mix, invites, and the CLI token for each

## Workspaces

A workspace is a team: its apps, deployments, volumes, secrets, notebooks, datasets and members. You get one
automatically when you sign in, shared with everyone who signs in from the same email domain. You can create
more, for a project, a client or a course: open the workspace menu in the top bar and pick **New workspace**.
Whoever creates one is its admin.

## Environments

Every workspace starts with one environment, `main`. Add others (`staging`, a branch name, a client) from the
same menu with **New environment**. Under the hood each environment is a separate controlplane workspace, so:

* apps and deployments deployed into `staging` do not appear in `main`, and the reverse;
* volumes, secrets and notebooks are per environment;
* each environment has its own token, and a token for one cannot touch another.

Switch environments from the menu; the page reloads into the one you picked. Delete an environment from the menu
too. Deleting only makes the dashboard forget it: whatever runs there keeps running until you stop it, and its
token stops working from the dashboard's side. `main` cannot be deleted.

## The CLI in an environment

`levers9 login` signs the CLI into `main`. For another environment, name it:

```bash theme={null}
levers9 login --env staging --name staging      # a context called staging, token for the staging environment
levers9 -c staging deploy app.py:api --name api  # deploys into staging
levers9 config select staging                    # or make it the default
```

Each context in `~/.levers9/config` holds one environment's token, so one machine can deploy to several.

## Members

Open **Members** in the workspace menu. Admins invite by email; the invited person's first sign-in with that
address lands in the workspace, and until then the list shows them as invited. Members see and use everything in
the workspace; only admins invite.

> [!NOTE]
>
> Self-hosting without Google sign-in? There are no workspaces or environments in the dashboard then: every
> person shares the token the API was started with, and separation happens with `levers9 token` and `levers9
>   config` contexts instead. See [Sign-in](https://levers9.mintlify.site/guides/sign-in.md).


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