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

# pull

> Download translated locale files

The `pull` command downloads all completed translations and writes them as JSON files to your locales directory.

## Usage

```bash theme={null}
npx lazylocales pull [options]
```

## Options

| Flag        | Description                                          |
| ----------- | ---------------------------------------------------- |
| `--dry-run` | Show files that would be written without downloading |
| `--json`    | Output machine-readable JSON                         |

## What it does

<Steps>
  <Step title="Fetch locale status">
    Queries the API for all configured locales and their translation status.
  </Step>

  <Step title="Download completed translations">
    Downloads the translated JSON content for each locale with status `synced`.
  </Step>

  <Step title="Write locale files">
    Writes each translation to the `localesDir` path as `{locale}.json`:

    ```
    ┌─────────┬──────────────┬────────────────────────────┬────────┐
    │ Locale  │ Language     │ File                       │ Keys   │
    ├─────────┼──────────────┼────────────────────────────┼────────┤
    │ nl-NL   │ Dutch        │ public/locales/nl-NL.json  │ 142    │
    │ fr-FR   │ French       │ public/locales/fr-FR.json  │ 142    │
    │ de      │ German       │ public/locales/de.json     │ 142    │
    └─────────┴──────────────┴────────────────────────────┴────────┘
    ```
  </Step>
</Steps>

## Examples

Download all completed translations:

```bash theme={null}
npx lazylocales pull
```

Preview files that would be written:

```bash theme={null}
npx lazylocales pull --dry-run
```

<Info>
  If no synced translations are found, the CLI will suggest running
  `lazylocales translate` first.
</Info>
