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

# Configuration

> Configure LazyLocales for your project

LazyLocales uses a JSON configuration file at the root of your project. It is created automatically on your first `lazylocales translate` run, or you can create it manually.

## Config file

The CLI looks for `lazylocales.config.json` in your project root.

```json lazylocales.config.json theme={null}
{
  "projectId": "proj_abc123",
  "localesDir": "./public/locales",
  "sourceLocale": "en"
}
```

## Options

| Option         | Type     | Required | Description                                      |
| -------------- | -------- | -------- | ------------------------------------------------ |
| `projectId`    | `string` | Yes      | Your LazyLocales project ID (e.g. `proj_abc123`) |
| `localesDir`   | `string` | Yes      | Relative path to your locales directory          |
| `sourceLocale` | `string` | Yes      | BCP 47 code of your source language (e.g. `en`)  |

This file never contains secrets and is always safe to commit.

## Authentication

The CLI supports two authentication methods:

1. **Interactive login** (local development) — run `lazylocales login` to authenticate via your browser
2. **API token** (CI/CD) — set the `LAZYLOCALES_API_KEY` environment variable

When `LAZYLOCALES_API_KEY` is set in the environment, the CLI uses it automatically and skips interactive login. See the [CI/CD Setup](/integrations/ci-cd) page for examples.

## Source file & annotations

LazyLocales uses a `.source.json` convention for your source locale file. This file supports `__context__` and `__lock__` annotation keys to control AI translation behavior.

```json en.source.json theme={null}
{
  "greeting": "Hello",
  "__context__greeting": "Informal greeting on the homepage",
  "brand": "LazyLocales",
  "__lock__brand": true
}
```

See the [Source File](/source-file) page for the full annotation syntax, examples, and how the clean runtime file is generated.
