> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-cli/authentication.md).

# Authentication

Sign in to BaaS from the terminal, or sign out.

The CLI signs you in through your browser and keeps the session on your machine, so you only do this once per computer.

## Sign in

```bash
baas login
```

Complete sign-in in the browser tab that opens. Back in the terminal, the CLI confirms which account you're using.

Already signed in? `baas login` asks whether you want to sign in again. Answer `N` to keep your current session.

Your session refreshes itself silently. If it ever expires, the CLI offers to sign you in again right when you need it. Outside a terminal, in CI for example, it stops with a clear message instead.

## Sign out

```bash
baas logout
```

This ends your session and deletes the credentials saved on this machine, including the active project. Next time, run `baas login` and pick a project again.

## Next

* [Pick a project](/baas-cli/projects.md) to deploy to.
* [Troubleshooting](/baas-cli/troubleshooting.md#sign-in-and-projects) if sign-in doesn't go through.
