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

> Force-overwrite individual translations by key and language.

Overwrite one or more existing translations in Entri, identified by their **key** and **language**. Unlike [`nt3 push`](/developers/cli/push), which syncs whole files, `overwrite` targets individual strings — making it well suited for **coding agents** and scripts that spot a wrong translation locally and want to correct it in place.

Overwritten translations are set to status `translated` with source `api`, so automated corrections are distinguishable from human, AI, and import edits in the translation history.

## Usage

```bash theme={null}
nt3 overwrite [options]
# alias: nt3 ow
```

## Examples

```bash theme={null}
# Overwrite a single translation inline
nt3 overwrite -k common.save_button -l nl -v "Opslaan"

# With a namespace
nt3 overwrite -k save_button -n common -l nl -v "Opslaan"

# Overwrite many translations from a JSON file
nt3 overwrite -f fixes.json

# Pipe a JSON array on stdin (e.g. from an agent)
echo '[{"key":"common.save_button","language":"nl","value":"Opslaan"}]' | nt3 overwrite

# JSON output for CI/agents
nt3 overwrite -f fixes.json --json
```

## Options

| Flag                    | Description                                                       |
| ----------------------- | ----------------------------------------------------------------- |
| `-k, --key <key>`       | Translation key to overwrite (inline mode)                        |
| `-v, --value <value>`   | New translation value (inline mode)                               |
| `-l, --language <lang>` | Target language code, e.g. `nl` (inline mode)                     |
| `-n, --namespace <ns>`  | Namespace the key belongs to (optional)                           |
| `-f, --file <path>`     | JSON file with an array of `{ key, namespace?, language, value }` |
| `--json`                | Output the result as JSON                                         |

## Input modes

`overwrite` resolves its input in this priority order:

1. **Inline flags** — `--key`, `--language`, and `--value` (plus optional `--namespace`) overwrite a single translation.
2. **JSON file** — `--file path.json` reads an array of items.
3. **Stdin** — if no inline flags or file are given, a JSON array is read from standard input, enabling piping from other tools.

The JSON array shape:

```json theme={null}
[
  { "key": "common.save_button", "language": "nl", "value": "Opslaan" },
  { "key": "save_button", "namespace": "common", "language": "fr", "value": "Enregistrer" }
]
```

## Result

```json theme={null}
{
  "overwritten": 2,
  "notFound": [
    { "key": "missing.key", "namespace": "", "language": "nl" }
  ]
}
```

Keys that don't exist in the project are reported under `notFound` rather than created — `overwrite` only updates existing translations. The process exits with code `1` if any key is not found, so callers can detect partial failures.

<Note>
  An empty `value` clears the translation and sets its status back to `untranslated`.
</Note>
