Skip to main content
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. Type the code from your terminal into that page. The page shows the device, when the request was made and the network address it came from, and warns you when that address differs from your browser’s network.
With --no-browser, MERIDIAN_NO_BROWSER, CI or a non-interactive terminal, the browser is not opened and you open the URL yourself. With --json, the code and URL are printed on stderr and the JSON result on stdout once you approve. The token lasts 90 days. It is stored in ~/.meridian/config.json with 0600 permissions, together with the API it was issued by. The CLI only ever sends it to that API: when MERIDIAN_API_URL or --api-url points somewhere else (a shell that loaded an app’s .env, for example), commands stop with an error instead of sending it, and meridian login signs in to that other API afresh. --hostname is what names this machine in your account’s CLI sessions list, so set it when the real hostname is meaningless: a container ID, a shared build box. Meridian emails you each time a machine signs in with the CLI, with the machine, its IP address, the country and the time, and a link to revoke it. See Security emails. meridian logout revokes the token on the server, then deletes it from this machine. When the server cannot be reached, the token is still deleted locally and the output says it was not revoked on the server: it then stays valid until it expires or you revoke it from your account. meridian logout leaves .meridian/project.json alone. meridian logout --production only ends production access and keeps you logged in. meridian whoami shows who you are, which organizations you belong to, when production access ends, and the linked project. Add --offline to skip the API call and report only what is stored locally.
A machine stays signed in until its token expires or is revoked, with meridian logout on the machine or from your account. See CLI sessions. Signing out of the dashboard does not disconnect the CLI, but Disconnect all sessions does.

Production access

The token from meridian login is enough for development and staging. A production change from the CLI also needs production access: a grant on this machine’s token, from 15 minutes to 12 hours, that you approve in your browser. Production changes are meridian deploy and meridian rollback to production, and meridian env set and meridian env unset on production or with --all-environments.
--for takes hours and minutes (30m, 4h, 1h30m), from 15 minutes to 12 hours, and defaults to 1 hour. Once granted, the end is fixed, and using production access never extends it. The CLI prints a code and a link, as meridian login does. The page you open names the machine and how long access lasts, and Allow production access grants it. Before it does, Meridian asks you to confirm it’s you with your password, a passkey or an authenticator code, as the database pages do. For a machine that is already signed in, only the account it is signed in to can allow it.
  • Already logged in: only the production approval runs.
  • A new machine, or one that is not logged in: one approval covers both the login and production access. The sign-in page says the login includes production access, and for how long.
  • Production access still active: the command prints when it ends and asks for nothing. Run meridian logout --production first to replace it with a new one.
  • No terminal (a coding agent, a script, CI): the CLI does not open the browser. It prints the link and the code for a person to approve, then waits up to 15 minutes. It exits non-zero when the request is denied or expires.
While production access lasts, nothing asks for it again. meridian whoami shows when it ends (Production access: until 15:42 (48 min left), or none), and whoami --json adds production_grant_expires_at. Production access adds no permission: it covers the apps you can reach, within your role, so a production deploy or rollback still needs hosting.promote (see Permissions). The CLI asks you to confirm each production change too, and --yes answers that question only. It never stands in for production access. See What starts one. Each time a machine gets production access, Meridian emails you with the machine and when the access ends, and a link to end it. See Security emails. Without production access, a production change is refused. In a terminal, the CLI asks Production changes need production access, approved in your browser. Request it now?, requests it for 1 hour, and sends the change again once you approve. Outside a terminal it never asks: it prints the refusal and Run: meridian login --production, then exits non-zero. Production access ends at the time it was given, or earlier with meridian logout --production or End production access in your account. Revoking the machine, Revoke all CLI sessions and Disconnect all sessions end it too. See CLI sessions.

Linking a project

meridian link picks the organization and app for the current project and writes .meridian/project.json. 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. Running it in a directory that was never linked reports that and changes nothing.
Last modified on November 17, 2026