---
title: "Log in to the CLI"
url: https://docs.truemarkets.co/cli/authentication
description: "Sign up or log in to the tm CLI with an emailed code, or set an environment variable for non-interactive use."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Log in to the CLI

Sign up or log in with a code we email you. You don't need an API key to get started. Your wallet's private key stays in Turnkey's secure enclave, and the key the CLI signs with never leaves your device.

## Create an account

Sign up with your email

```bash
tm signup you@example.com
```

The CLI creates the account and verifies it with an emailed code. The email argument is optional; omit it and the CLI prompts.

## Log in

Log in to an existing account

```bash
tm login you@example.com
```

Once you enter the emailed code, the CLI stores your tokens locally.

## Check who you are

Show the account a script will trade on

```bash
tm whoami
```

Shows your account and wallet info. Run it to confirm which account a script is about to trade on.

## Log out

Clear stored tokens

```bash
tm logout
```

## Run without an interactive login

| Variable | Purpose |
| --- | --- |
| `TM_API_KEY` | API key, for non-interactive use (CI, scripted agents) |
| `TM_AUTH_TOKEN` | Auth token, used in place of the stored login |

Set one of these in CI rather than baking a login into a pipeline.

## Configuration

Show and set configuration; secrets stay masked

```bash
tm config show              # current configuration; secrets are masked
tm config set api_key <v>   # set a value
```

`tm config show` masks the stored `api_key` rather than printing it.

* * *

**[Next: Commands](https://docs.truemarkets.co/cli/commands)**