---
title: "Login"
description: "Authenticate the Merfolk CLI with your account."
---

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

# Login

## Usage

```sh
merfolk login [flags]
```

## Description

Authenticates the CLI for commands that access private diagrams and team resources.

## Flags

| Flag     | Description           |
| -------- | --------------------- |
| `--json` | Output result as JSON |

## Examples

```sh
# Start login flow
merfolk login

# Output login status as JSON
merfolk login --json
```

## Output

On success, prints a confirmation message. With `--json`:

```json
{ "status": "authenticated" }
```

## Exit codes

| Code | Meaning                   |
| ---- | ------------------------- |
| `0`  | Authentication successful |
| `1`  | Login failed or cancelled |

Source: https://docs.merfolk.io/cli/login/index.mdx
