Other commands

Updated: 2 months ago · 2 min read

Setup and identity commands. None of them touch source content — they only manage credentials and project bindings.

lingo login#

Authenticate against Lingo.dev. Two flows:

OTP (default, interactive)#

bash
lingo login
lingo login --email you@company.com           # skip the email prompt
lingo login --email you@company.com --code 123456   # skip the code prompt too

Sends a one-time code to your email, verifies it, stores a Supabase session in ~/.lingo/auth.json. Refresh tokens are stored alongside so the session survives across sessions until you explicitly logout.

API key (CI / non-interactive)#

bash
lingo login --api-key lk_...

Stores the API key. Generate keys on the Lingo.dev platform under your organization's API keys settings.

You can also pass --api-key as a global flag on any command, which bypasses stored credentials entirely:

bash
lingo push --api-key lk_...

Convenient for one-off CI jobs that shouldn't write credentials to disk.

lingo logout#

bash
lingo logout

Clears ~/.lingo/auth.json. No-op if you weren't logged in.

bash
lingo link
lingo link --org org_a8c... --engine eng_b9d...   # skip prompts

Bind the current project to an organization and a localization engine. Writes orgId + engineId into .lingo/config.json (commit it).

Interactive mode lets you pick from your existing orgs/engines or create new ones inline — link will prompt for a name, do the onboarding survey for new orgs, and create the resource via the API before linking.

bash
lingo unlink

Removes orgId and engineId from .lingo/config.json. Doesn't delete the org or the engine — only severs the local binding. Useful before re-linking to a different engine.

lingo whoami#

bash
lingo whoami
lingo whoami --json

Shows three things:

  1. Identity — the email you're logged in as, or whether you're using an API key.
  2. Org — the linked organization (resolves the name from the API).
  3. Engine — the linked engine (resolves the name from the API).
text
Email:   you@company.com
  Org:     Acme Inc (org_a8c...)
  Engine:  Production (eng_b9d...)
  Auth:    session

If you're not in a linked project directory, the Org/Engine lines are omitted. --json outputs the same data structured for scripting.

Global --api-key flag#

Every command accepts a --api-key flag that overrides stored credentials for that invocation only. Standard pattern in CI:

yaml
env:
  LINGO_API_KEY: ${{ secrets.LINGO_API_KEY }}
steps:
  - run: lingo push --backfill-missing --yes --api-key "$LINGO_API_KEY"

(The CLI also reads LINGO_API_KEY from the environment as a fallback.)

Where to next#