> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nt3.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> The Entri CLI (nt3) lets you sync translations directly from your terminal.

The `nt3` CLI connects your codebase to Entri. It reads and writes translation files in your project, pushes source strings to the platform, and pulls back translated content — all from a single command.

## Commands

<CardGroup cols={2}>
  <Card title="nt3 login" icon="key" href="/developers/cli/login">
    Authenticate with your Entri API token.
  </Card>

  <Card title="nt3 init" icon="file-plus" href="/developers/cli/init">
    Create a .nt3.yml configuration file for your project.
  </Card>

  <Card title="nt3 push" icon="arrow-up" href="/developers/cli/push">
    Upload source translation files to Entri.
  </Card>

  <Card title="nt3 pull" icon="arrow-down" href="/developers/cli/pull">
    Download translated files from Entri to your project.
  </Card>

  <Card title="nt3 translate" icon="language" href="/developers/cli/translate">
    Trigger AI translation for untranslated keys.
  </Card>

  <Card title="nt3 status" icon="circle-info" href="/developers/cli/status">
    Show current auth and project configuration.
  </Card>

  <Card title="nt3 logout" icon="arrow-right-from-bracket" href="/developers/cli/logout">
    Remove stored credentials and log out.
  </Card>
</CardGroup>

## Quick reference

```bash theme={null}
# Authenticate
nt3 login -t entri_your_token

# Set up a project
nt3 init

# Sync
nt3 push          # Upload source file
nt3 translate --all   # AI translate all languages
nt3 pull          # Download translations

# Check status
nt3 status
```

## How it works

The CLI uses a `.nt3.yml` file in your project root to know which files to sync and in which format. The `{lang}` placeholder in your file pattern is replaced with each language code at runtime.

For example, with this config:

```yaml theme={null}
project_id: "proj_abc123"
source_language: en
file_patterns:
  - path: "src/locales/{lang}.json"
    format: json-nested
```

Running `nt3 pull` would download files to `src/locales/fr.json`, `src/locales/nl.json`, etc., depending on which languages are configured in your Entri project.

## Authentication

The CLI stores your API token in `~/.nt3/config.json` with owner-only file permissions. For folder-scoped auth, use `nt3 login --local` to save credentials in `.nt3.local.json` instead.

You can also set `NT3_API_TOKEN` as an environment variable — this takes priority over all stored credentials.

## CI/CD support

All commands that produce output support a `--json` flag for machine-readable results. Authentication can be handled non-interactively with `nt3 login -t $TOKEN`. See the [CI/CD integration guide](/developers/cli/ci-cd) for a complete GitHub Actions example.

## Supported file formats

| Format            | Description                           |
| ----------------- | ------------------------------------- |
| `json-flat`       | Flat key-value JSON                   |
| `json-nested`     | Nested JSON objects                   |
| `yaml`            | YAML key-value                        |
| `po`              | GNU gettext PO files                  |
| `xliff`           | XLIFF 1.2                             |
| `xliff2`          | XLIFF 2.0                             |
| `arb`             | Application Resource Bundle (Flutter) |
| `android-xml`     | Android string resources              |
| `ios-strings`     | iOS Localizable.strings               |
| `ios-stringsdict` | iOS Stringsdict (plurals)             |
