|
Documentation
Book a DemoPlatform
PlatformMCPCLI
APIWorkflows
GuidesChangelog

Overview

  • @lingo.dev/cli

Getting started

  • Quickstart
  • Configuration
  • Examples

Reference

  • lingo push
  • lingo pull
  • lingo purge
  • Other commands

Configuration

  • Key controls
  • Formats
  • Locales

Guides

  • Adding a locale
  • Existing translations
  • Retranslation
  • Translator notes
  • Runs, state, and recovery
  • CI/CD
  • Monorepos
  • Large projects

Looking for the older CLI (v0)? See the legacy CLI docs

CI/CD

The CLI has no dedicated ci command. To localize in CI you have two options: let the Lingo.dev GitHub App do it server-side (recommended on GitHub), or run lingo push inside your own pipeline and commit the results.

Option 1: GitHub App (recommended)#

Install the Lingo.dev GitHub App on your repository. Point it at a committed .lingo/config.json (with an engineId) and it reacts to pushes and pull requests automatically - detecting changed source strings, translating them through your engine, and committing the results back to the branch or opening a pull request. No runner, no API-key secret, and no lockfile to manage.

Option 2: run lingo push in your own runner#

Any CI environment with Node.js 22+ can run the CLI directly. Authenticate with an API key (stored as a secret), push, and commit the outputs.

yaml
name: Translate
on:
  push:
    branches: [main]
permissions:
  contents: write
jobs:
  localize:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm install -g @lingo.dev/cli
      - run: lingo push
        env:
          LINGO_API_KEY: ${{ secrets.LINGO_API_KEY }}
      - name: Commit translations
        run: |
          git config user.name "lingo-bot"
          git config user.email "support@lingo.dev"
          git add .
          git diff --cached --quiet || git commit -m "chore: update translations"
          git push

lingo push translates only what changed since the last run (tracked in .lingo/lock.json), waits for the run to finish, and writes the outputs. To open a pull request instead of committing to the branch, push the changes to a dedicated branch and open the PR with your platform's tooling (e.g. gh pr create).

Verify before deploy#

Add a lingo check step before your build to fail the pipeline when any source string is missing a translation:

bash
lingo check

See also#

  • GitHub App - managed continuous localization, no runner or secret.
  • lingo push - scoped patterns, --backfill-missing, retry behavior.
  • Configuration - .lingo/config.json and the lockfile.

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated 20 days ago·1 min read