> ## 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.

# nt3 init

> Initialize Entri configuration in your project directory.

Create a `.nt3.yml` configuration file in the current directory. This file tells the CLI which project to sync, where your translation files are located, and which format they use.

## Usage

```bash theme={null}
nt3 init [options]
# alias: nt3 i
```

## Interactive mode

Running `nt3 init` without flags launches an interactive prompt:

```bash theme={null}
nt3 init
```

```
Project ID: proj_abc123
Source language (default: en): en
File pattern path (default: src/locales/{lang}.json): locales/{lang}.json
Format (json-flat, json-nested, yaml, ...) (default: json-nested): po
Created .nt3.yml
```

## Non-interactive mode

Provide the `--project-id` flag to skip all prompts. Remaining flags are optional and fall back to their defaults:

```bash theme={null}
nt3 init -p proj_abc123 -f po --path "locales/{lang}/messages.po"
```

Providing `--project-id` activates non-interactive mode. Any unprovided option uses its default value.

## Options

| Flag                           | Description                                 | Default                   |
| ------------------------------ | ------------------------------------------- | ------------------------- |
| `-p, --project-id <id>`        | Project ID from the Entri dashboard         | (prompted)                |
| `-s, --source-language <lang>` | Source language code                        | `en`                      |
| `--path <pattern>`             | File path pattern with `{lang}` placeholder | `src/locales/{lang}.json` |
| `-f, --format <format>`        | File format                                 | `json-nested`             |
| `--force`                      | Overwrite an existing `.nt3.yml`            | `false`                   |

## Output

`nt3 init` creates a `.nt3.yml` file in the current directory:

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

The `{lang}` placeholder in the path is replaced with the language code at runtime — for example, `locales/fr/messages.po` for French.

## The --force flag

If `.nt3.yml` already exists, `nt3 init` exits with an error to prevent accidental overwrites:

```
.nt3.yml already exists. Use --force to overwrite.
```

Use `--force` to replace the existing config:

```bash theme={null}
nt3 init --force -p proj_new123
```

## Supported formats

| Value             | 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)             |

## Finding your Project ID

Your Project ID is available in the Entri dashboard under **Project Settings**. It starts with `proj_`.

## Next steps

After initializing your project, push your source translation file:

```bash theme={null}
nt3 push
```

For more configuration options — including multiple file patterns and namespaces — see the [configuration reference](/developers/cli/configuration).
