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

# login, workspace, profile, token

> Sign the CLI in, choose a workspace, and manage stored credentials.

## lazycloud login

Sign in once on your machine:

```bash theme={null}
uv run lazycloud login
```

Prints a link and a code. Approving the code in the browser signs the CLI in as
you, with access to every workspace your account belongs to. An expired code
needs a fresh `lazycloud login`. The credential lives in
`~/.lazycloud/config.yaml`.

CI needs no login step. It reads `LAZYCLOUD_TOKEN` from your CI secret store
and `LAZYCLOUD_WORKSPACE` for the target workspace. To save an existing
environment token in a local profile:

```bash theme={null}
uv run lazycloud login --token "$LAZYCLOUD_TOKEN" --workspace <name>
```

`--profile <name>` saves the sign-in under a named profile, and
`--no-activate` saves it without switching to it.

## lazycloud workspace

```bash theme={null}
uv run lazycloud workspace list
uv run lazycloud workspace use NAME        # the workspace later commands act in
uv run lazycloud workspace rename NAME     # renames the current workspace
```

`LAZYCLOUD_WORKSPACE` overrides the stored choice for every command, and
`--workspace <name>` overrides it for one.

## lazycloud profile

Profiles hold separate sign-ins. One is active at a time.
Switching workspaces within one account does not need a new profile.

```bash theme={null}
uv run lazycloud profile list
uv run lazycloud profile current
uv run lazycloud profile show [--profile <name>]
uv run lazycloud profile set [--profile <name>] [--workspace <name>] [--token <token>] [--no-activate]
uv run lazycloud profile activate NAME
uv run lazycloud profile delete NAME
```

`LAZYCLOUD_PROFILE=<name>` uses a profile for one command.

## lazycloud token

```bash theme={null}
uv run lazycloud token show [--profile <name>]     # whether the profile holds a token
uv run lazycloud token set VALUE [--profile <name>]
```

The dashboard creates and deletes tokens under Settings, then Tokens. These
commands manage only the copy stored in a profile.
