Quickstart
End-to-end: install, authenticate, link to an engine, push sources, pull translations.
Prerequisites
Node.js 22+ (node -v to check). The CLI runs as lingo once installed.
Setup#
Install
npm install -g @lingo.dev/cliOr pnpm add -g @lingo.dev/cli / yarn global add @lingo.dev/cli / bun add -g @lingo.dev/cli.
Authenticate
lingo loginEnter your email; the CLI sends a one-time code and stores a session token in ~/.lingo/auth.json. For CI / non-interactive contexts use an API key: lingo login --api-key lk_... (or set --api-key as a global flag on any command).
Initialize the project
In your project root:
lingo initPrompts for source locale, target locales, and file patterns (globs that point at your source files). Writes the localization section into .lingo/config.json. Commit this file — it's the source of truth for what gets translated.
Link to an engine
lingo linkPick (or create) an organization and a localization engine. The engine holds your AI model config, glossaries, brand voice, and rules — set it up once on the Lingo.dev platform and reuse it across projects. link appends orgId and engineId to .lingo/config.json (also committed).
First push#
With a non-empty source file in place (e.g. locales/en.json):
lingo push --backfill-missing --waitTranslates every missing target across every configured pattern. --wait keeps the CLI attached until the run completes, then writes outputs (locales/de.json, locales/fr.json, ...) to disk. On a clean checkout this takes anywhere from seconds (small JSON) to minutes (large markdown bundles). Without --wait, push exits as soon as the run is submitted and lingo pull writes the outputs later.
When it finishes:
✓ Run lrg_a8c... : localized 12 target file(s), uploaded 1 new artifact(s).Subsequent runs#
After you edit source files, plain lingo push only translates the delta — files whose source hash didn't change are skipped server-side. Local target edits are preserved by default; pass --force (with a scope) to overwrite.
lingo push # delta only
lingo push docs/en/**/*.md # scoped: only this subtree
lingo push docs/en/about.md -f # scoped + force: retranslate even if up to dateEach of these exits once the run is submitted — add --wait to write the outputs in the same command, or collect them with lingo pull.
Pulling later#
push records the run ID in ~/.lingo/runs/<hash>.json (keyed by absolute project path). Later, on the same machine and from the same checkout:
lingo pull…waits for the last push to finish if it's still running, then writes its outputs. Useful after closing the terminal mid-translation. Other machines get the translations once you commit them.
Where to next#
- Configuration —
.lingo/config.jsonschema, lockfile, where run state lives. - lingo push — scoped patterns,
--force, retry semantics. - lingo pull — conflict detection,
--dry-run.