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

# CLI authentication

> Sign in, inspect your account, and revoke a Lettercamp CLI session from your terminal.

To edit one cloud site with a local coding agent, use
[`lettercamp connect <code>`](https://www.lettercamp.com/docs/cli/connect). That connection is limited to the site's
source, previews, posts, and media library. Publishing saved content is opt-in.
Revoke the connection in **Settings → Agent connections**. It is
separate from the account-wide login and logout commands below.

`deploy` and `domain` start browser login when needed. You can also sign in explicitly:

```bash theme={null}
npx lettercamp login
npx lettercamp whoami
npx lettercamp logout
```

Approve only the code shown in your terminal. Publishing authorization includes
creating sites, uploading source and assets, and managing addresses for accessible
sites. Older upload-only sessions need one new login before publishing. Sessions
expire after 90 days and can be revoked; `logout` revokes the current session and
removes its saved credential.

Run initial deployment setup in an interactive terminal. Interactive deploys
show your verified name and email and let you continue, change accounts, or cancel.
Automated deploys with a valid login and an established deployment destination
print the verified identity and proceed without an account prompt. If sign-in or
site setup is needed, run the command interactively first. A source conflict
stops deployment; it does not offer to overwrite newer remote edits.

## Options

| Command | Option | Purpose |
| - | - | - |
| `login` | `--no-browser` | Print the approval link without opening a browser. |
| `login` | `--name <name>` | Set a name for this CLI session. |
| `whoami` | `--json` | Print account details as JSON. |

```bash theme={null}
npx lettercamp login --no-browser --name "My laptop"
npx lettercamp whoami --json
```


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