Skip to main content
The nt3 CLI is designed for use in CI/CD pipelines. All commands support non-interactive authentication via a flag or environment variable, and produce machine-readable JSON output with --json.
The CLI exits with code 1 on any error, making it straightforward to fail a pipeline step when something goes wrong.

GitHub Actions

Push on source file change

This workflow triggers whenever the source translation file is updated on main, pushes the new strings to Entri, triggers AI translation, and pulls the results back as a commit.

Pull on demand

A manually triggered workflow for pulling the latest translations without running a full sync:

Environment variables

NT3_API_TOKEN

Set this variable instead of running nt3 login. It takes priority over stored credentials and requires no login step:
In GitHub Actions, store the token as a repository secret named NT3_TOKEN (or any name you prefer) and reference it with ${{ secrets.NT3_TOKEN }}.

Adding secrets in GitHub

  1. Go to your repository on GitHub
  2. Navigate to Settings > Secrets and variables > Actions
  3. Click New repository secret
  4. Set the name to NT3_TOKEN and paste your Entri API token as the value
Never hard-code your API token in workflow files. Always use secrets or environment variables.

GitLab CI

Store NT3_TOKEN as a CI/CD variable in Settings > CI/CD > Variables.

Exit codes

All commands respect these exit codes, so pipeline steps fail automatically on error without any additional scripting.

Parsing JSON output

With --json, commands write structured JSON to stdout. You can pipe this to jq for further processing:

Tips for reliable pipelines

  • Pin the CLI version to avoid unexpected behavior from updates: npm install -g nt3@1.2.3
  • Cache the npm install using actions/cache to speed up workflows
  • Use [skip ci] in auto-commit messages to prevent recursive workflow triggers
  • Run nt3 status early in a workflow to debug authentication issues before the real commands run