nt3 CLI supports non-interactive authentication and machine-readable 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 globally in your workflow
Store your API token
Add your Entri API token as a repository secret:- Go to your GitHub repository → Settings → Secrets and variables → Actions
- Click New repository secret
- Name it
NT3_TOKENand paste your API token
Basic workflow: push on source change
This workflow runs whenever your source locale file changes. It pushes updated strings to Entri so translators and AI can act on them immediately.Full sync workflow: push and pull
For projects that want to keep translated files up to date in the repository, use a full push-pull cycle and commit the results back.The
git diff --staged --quiet || git commit pattern only creates a commit when there are actual changes, preventing empty commits when translations are already up to date.Scheduled AI translation
Run AI translation on a schedule to automatically translate new strings overnight.CLI flags reference
| Flag | Purpose |
|---|---|
nt3 login -t <token> | Non-interactive authentication for CI |
nt3 push --json | Push source strings; output machine-readable JSON |
nt3 pull --json | Pull all target languages; output machine-readable JSON |
nt3 pull -l fr --json | Pull a specific language only |
nt3 translate --all --json | AI-translate all untranslated keys |
nt3 push --overwrite --json | Push and overwrite existing translations |
Exit codes
The CLI exits with0 on success and a non-zero code on failure, so any step failure automatically fails the workflow job. Use --json to capture structured output for downstream steps or notifications.
Multiple file patterns
If your.nt3.yml defines multiple file patterns (for example, separate namespace files), push and pull handle all patterns automatically — no extra configuration is needed in the workflow.