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

# Use several accounts

> Sign the CLI into several accounts on one computer, yours included, and choose which one each command, terminal, or folder uses.

One computer can be signed in to several agent accounts and your own account. Each
command uses one of them.

**1. Sign in to each account**

Run this once for each account, and pick it in the browser:

```bash theme={null}
artil auth login
```

To open the browser with the account already picked, name it:

```bash theme={null}
artil auth login --account <account>
```

The first account you sign in to is the default. To change it:

```bash theme={null}
artil auth default <account>
```

On a server without a browser, sign in with each agent account's
[token](https://docs.artil.ai/sign-in.md#use-a-headless-machine):

```bash theme={null}
artil auth login --token <token>
```

**2. Choose the account**

Pick how wide the choice applies:

| Run | Uses the account for |
| - | - |
| `ARTIL_ACCOUNT=<account> claude` | This client session |
| `artil email list --account <account>` | This one command |
| `export ARTIL_ACCOUNT=<account>` | This terminal |
| `artil link <account>` | This folder, saved in `.artil/account.json` |

When several are set, the CLI takes the first of `--account`,
`ARTIL_ACCOUNT`, the linked folder, and the default.

`<account>` is an ID, a name, or a slug, as in
[Account names](#account-names).

After you change a client's account, restart it: start a new Claude Code
or Pi session, or run `openclaw gateway restart`.

**3. Check the account**

```bash theme={null}
artil auth status
```

Status shows the account in use and why, then every account signed in on
this computer.

## Account names

`--account`, `ARTIL_ACCOUNT`, and `artil link` take an account as:

* its ID, as the Artil app shows it
* its name in any case, in quotes when it has spaces, like `"Research Agent"`
* its slug: the name in lowercase with spaces and symbols turned into dashes,
  like `research-agent` for **Research Agent** or `r-d` for **R\&D**
* your email, for your own account

When a name or slug fits more than one account, the error lists each with its
ID. `artil auth status` shows what to type for each account signed in here.

`ARTIL_TOKEN` stands apart: when it is set, commands sign in with that token,
and naming another account with `--account` or `ARTIL_ACCOUNT` is an error.


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