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.ymlconfig file committed to your repository - The
nt3CLI installed in your pipeline
Store your API token
Add your Entri API token as a CI/CD variable:- Go to your GitLab project → Settings → CI/CD → Variables
- Click Add variable
- 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.Complete multi-stage example
A production-ready configuration with separate push and pull stages.CLI flags reference
Exit codes
The CLI exits with0 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: