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

# Signing in and linking

Two things have to be true before `meridian dev` works: this **machine** is signed in to your account, and this **project** is linked to an app.

## Signing in

`meridian login` is a device-code flow. It prints a short code, opens the verification page in your browser, and waits for you to approve.

```bash theme={null}
meridian login
```

| Flag | Effect |
| - | - |
| `--force` | Re-authenticate even when a valid token is already stored |
| `--no-browser` | Print the verification URL instead of opening it |
| `--hostname <name>` | The hostname reported to Meridian for this device. Defaults to the machine hostname |

The token is stored in `~/.meridian/config.json` with `0600` permissions. `--hostname` is what names this machine in your account's [CLI sessions](/cli-sessions) list, so set it when the real hostname is meaningless: a container ID, a shared build box.

`meridian logout` clears the stored token. `meridian whoami` shows who you are, which organizations you belong to, and the linked project; add `--offline` to skip the API call and report only what is stored locally.

<Note>
  A machine stays signed in until its token expires or someone revokes it. Revoking is done from your account, per machine. See [CLI sessions](/cli-sessions). Signing out of the dashboard does not disconnect the CLI, but **End all other sessions** does.
</Note>

## Linking a project

`meridian link` picks the organization and app for the current project and writes `.meridian/project.json`.

| Flag | Effect |
| - | - |
| `--org <idOrName>` | Organization to link, by id, name or slug |
| `--app <idOrName>` | App to link, by id, name or slug |
| `--dev-command <cmd>` | Override the command `meridian dev` runs. Defaults to `npm run dev` |
| `--force` | Overwrite an existing link, and skip the missing-`package.json` warning, without prompting |

Passing `--org` and `--app` makes the command non-interactive, which is what you want in a setup script or a devcontainer.

Commit `project.json` if your whole team uses Meridian. **Each developer still gets their own isolated database**, because databases are provisioned per user and app.

## Unlinking

`meridian unlink` removes `.meridian/project.json` after confirming. It leaves `.meridian/snapshots/` and everything else under `.meridian/` alone, so unlinking never costs you a [pre-migration snapshot](/cli-migrations).

Running it in a directory that was never linked reports that and changes nothing.


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