Skip to main content
Integrate Entri into your GitLab CI/CD pipelines to automatically push new source strings and pull translations. The nt3 CLI supports non-interactive authentication and JSON output designed for CI environments.

Prerequisites

  • An Entri API token (generate one in Settings → API Tokens)
  • A .nt3.yml config file committed to your repository
  • The nt3 CLI installed in your pipeline

Store your API token

Add your Entri API token as a CI/CD variable:
  1. Go to your GitLab project → Settings → CI/CD → Variables
  2. Click Add variable
  3. Set the key to NT3_TOKEN, paste your API token as the value, and mark it as Masked

Basic pipeline: push on source change

This job runs when your source locale file changes and pushes updated strings to Entri.

Full sync pipeline: push and pull

Push source strings and pull back all translations, then commit the result to the repository.
Committing back to the repository requires a GITLAB_TOKEN with write access to the repository. Create a project access token with the write_repository scope and add it as a CI/CD variable.

Scheduled AI translation

Use a GitLab scheduled pipeline to run AI translation automatically.
Configure the schedule under CI/CD → Schedules in your GitLab project settings (for example, daily at 2 AM UTC).

Complete multi-stage example

A production-ready configuration with separate push and pull stages.

CLI flags reference

Exit codes

The CLI exits with 0 on success and a non-zero code on failure, causing the pipeline job to fail automatically. Use --json for structured output that can be parsed in downstream scripts or notifications.

Self-hosted Entri

If you are running a self-hosted Entri instance, pass the --url flag during login: