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

# login

> Authenticate with Base44 using device code flow, or with an environment variable when you can't use a browser

Authenticate your CLI session with Base44. The CLI uses a secure device code flow, so you'll receive a code to enter in your browser to complete authentication. You need a Base44 account to log in.

If you can't use a browser, such as in CI or an AI agent environment, skip `base44 login` and set an environment variable instead. See [Authenticate without a browser](https://docs.base44.com/developers/references/cli/commands/introduction.md#authenticate-without-a-browser).

For a walkthrough of the authentication process, see the [Backend only](https://docs.base44.com/developers/backend/quickstart/templates/quickstart-backend-only.md) or [React](https://docs.base44.com/developers/backend/quickstart/templates/quickstart-react-template.md) quickstart.

## Usage

```bash theme={null}
base44 login
```

## Authentication storage

On successful login, your credentials are stored at `~/.base44/auth/auth.json`. This file contains your:

* Authentication token
* User email
* User display name

> [!NOTE]
>
> Your token remains valid until you explicitly log out or it expires. You don't
> need to log in before every command.

## See also

* [Quickstart - Backend only](https://docs.base44.com/developers/backend/quickstart/templates/quickstart-backend-only.md): Create your first backend-only project
* [Quickstart - React](https://docs.base44.com/developers/backend/quickstart/templates/quickstart-react-template.md): Build a full-stack React app
* [`logout`](https://docs.base44.com/developers/references/cli/commands/logout): Sign out from the CLI
* [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami): Check your logged-in user


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