---
title: "Sign in and accounts · Alran Code Docs"
url: https://alran.dev/en/docs/auth
locale: en
updated: 2026-11-16
---

[Docs](https://alran.dev/en/docs)Get started

# Sign in and accounts

Alran Code signs in with your Ottili account. It never sees your password.

On this page

[How do I sign in?](#login) [Over SSH or without a display](#device) [With an API key](#api-key) [Companies and projects](#company) [Sign out](#logout) [Common questions](#faq)

## How do I sign in? {#login}

```bash
alran auth login
```

Alran opens the Ottili sign-in in your browser and receives a session when you are done. You enter your password only on Ottili's sign-in page. The session is stored in `~/.alran/auth`, readable only by you.

## Over SSH or without a display {#device}

In an SSH session, a container or on Linux without a display, `alran auth login` shows a code instead:

```text
To sign in, open this page in a browser on any device:
  https://ai.ottili.one/device

and enter the code:  BCDF-GHJK
```

Confirm it in any browser within ten minutes. `--device` and `--no-device` force one way or the other; in scripts, `ALRAN_LOGIN_FLOW=device` or `browser` decides.

## With an API key {#api-key}

On a machine without any browser, create a key at [ai.ottili.one/api-keys](https://ai.ottili.one/api-keys) and run:

```bash
alran auth login --api-key
```

For a single run, `ALRAN_API_KEY` sends a key without storing it.

## Companies and projects {#company}

| Command | What it does |
| `alran auth status` | Who is signed in, which company, project and model you use |
| `alran auth switch-company` | List your companies, or switch to one |
| `alran config company` | Show or switch the company |
| `alran config project` | Choose the project your model calls are attributed to |

## Sign out {#logout}

```bash
alran auth logout
```

This revokes the session at the Ottili Platform, then removes the local files. A copied session file stops working at once.

Using your own provider key instead? That needs no Ottili account at all. See [Your own provider](https://alran.dev/en/docs/byok).

## Common questions {#faq}

How do I sign in to Alran Code?

Run alran auth login. Alran opens the Ottili sign-in in your browser and you get a session when you are done; you enter your password only on the sign-in page of Ottili. The session is stored in ~/.alran/auth and is readable only by you.

How do I sign in over SSH without a browser?

In an SSH session, a container or on Linux without a display, alran auth login shows a code instead. Open https://ai.ottili.one/device in a browser on any device and confirm the code within ten minutes. Use --device or --no-device to force one way or the other.

How do I use an API key instead of the browser sign-in?

Create a key at https://ai.ottili.one/api-keys and run alran auth login --api-key. For a single run, ALRAN_API_KEY sends a key without storing it.

[PreviousQuickstart](https://alran.dev/en/docs/quickstart) [NextThe terminal UI](https://alran.dev/en/docs/tui)
