CLI
Translate project files, collect their outputs, and maintain the source catalogs used by React applications.
The Lingo.dev CLI connects files in your project to a localization engine. You configure source paths and target languages, push the selected content, and collect translated files. Later runs use the recorded source baseline to process changes.
@lingo.dev/cli installs the lingo executable. Start with your first file for the complete setup and retrieval sequence.
Install the current @lingo.dev/cli and use lingo --version to record the version used by your project. For lingo.dev@0.138.10 and its i18n.json projects, use the CLI v0 reference.
Install for the way you work #
For a project dependency recorded in version control:
npm install --save-dev @lingo.dev/cli
npx lingo --help
npx lingo --versionFor a shell-wide executable:
npm install --global @lingo.dev/cli
lingo --helpThis manual uses lingo directly. With a local install, invoke it through your package manager. npx @lingo.dev/cli@latest and pnpm dlx @lingo.dev/cli@latest run the latest release without a persistent install. Pin a version when local and CI behavior must agree; the CI examples use Node.js 22.
lingo update uses the detected installation method. Use the package manager for an explicit version or an unrecognized/ephemeral installation.
Translate files or extract messages #
For existing resources, configure files, authenticate, and link a localization engine. Translation runs on the server. push --wait waits and downloads; separate push and pull let you collect later.
For React source calls, extract creates JSONC and TypeScript declarations locally. It does not translate or install a runtime. Add the extracted catalog to file configuration for translation, then load it through React's catalog workflow.
Preserve the state that makes updates possible #
A first plain push stores source bytes. Backfill creates missing target files; later plain pushes translate source changes. Keep .lingo/config.json, .lingo/lock.json, and accepted translations together in version control. Credentials and the latest-run pointer remain in your home directory.
Push, Pull, and Lockfile and cache explain mode and recovery choices. Commands lists setup, translation, and catalog-maintenance commands.