> ## Documentation Index
> [HTML page](https://blode.md/docs/cli/login)
> [Documentation index](https://blode.md/docs/llms.txt)
> Use the index to discover all available pages before exploring further.

# edda login

Authenticate the Edda CLI with GitHub in your browser, store a local OAuth session, and unlock deploy commands like edda push.

Authenticate your CLI session so you can deploy documentation with `edda push`.

You only need `edda login` once per machine unless you run `edda logout` or your session expires. After login, the CLI stores OAuth tokens locally and refreshes them automatically when you run commands like `edda push` or `edda whoami`. Local deploys use your GitHub session; CI pipelines should use a project deploy key instead (see [Continuous deployment](/deployment/ci)).

First-time setup often looks like: install the CLI from [CLI overview](/cli/overview), run `edda new`, then `edda login` and `edda push`. If port 8787 is in use, pass `--port` or use `--no-open` in headless environments.

```bash
edda login
```

## How it works

`edda login` opens your browser to sign in with GitHub via Supabase OAuth (PKCE). After you authorize, the CLI receives an access token and stores it locally. No API keys, ever.

The CLI starts a temporary local server on port 8787 to receive the OAuth callback. If the browser does not open automatically, copy the printed URL manually.

## Options

- `--port <port>` (type: number, default: 8787): Port for the local OAuth callback server.
- `--timeout <seconds>` (type: number, default: 180): How long to wait for browser authorization before timing out.
- `--no-open` (type: boolean, default: false): Print the authorization URL instead of opening the browser.

## Examples

```bash title="Browser sign-in"
edda login
```

```bash title="Custom port and no browser"
edda login --port 9090 --no-open
```

## Credential storage

Credentials are stored at `~/.config/blodemd/credentials.json`. The OAuth session includes a refresh token so the CLI can renew your session automatically. Run `edda logout` to remove stored credentials.

## Related pages

- [edda whoami](/cli/whoami) -- confirm the signed-in email
- [edda logout](/cli/logout) -- remove stored credentials
- [edda push](/cli/push) -- deploy after authentication