> Markdown version of https://tuna.am/en/docs/cli/login/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# tuna login

Login to tuna.am account.

Logs in through the browser: the session is stored in the system keyring and can be revoked with `tuna logout` or from the profile page. On servers and in CI pass an api key with `--with-api-key` instead.

Guide with examples: [Sessions and API keys](https://tuna.am/en/docs/guides/sessions-and-api-keys.md).

Usage

```bash
tuna login [flags]

```

Examples

```bash
tuna login
echo "$TUNA_API_KEY" | tuna login --with-api-key

```

| Flag                 | Description                                                                            |
| -------------------- | -------------------------------------------------------------------------------------- |
| `--hostname string`  | Device name shown in the list of sessions. Default: computer name.                     |
| `--insecure-storage` | Store the session in a plain text file instead of the system keyring.                  |
| `--no-browser`       | Print a link to confirm the login from another device, for machines without a browser. |
| `--web`              | Log in through the browser without asking for the method.                              |
| `--with-api-key`     | Read an api key from standard input.                                                   |

[Global flags](https://tuna.am/en/docs/cli.md#global-flags) work too.
