Skip to main content
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.
lazylocales.config.json
{
  "projectId": "proj_abc123",
  "localesDir": "./public/locales",
  "sourceLocale": "en"
}

Options

OptionTypeRequiredDescription
projectIdstringYesYour LazyLocales project ID (e.g. proj_abc123)
localesDirstringYesRelative path to your locales directory
sourceLocalestringYesBCP 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 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.
en.source.json
{
  "greeting": "Hello",
  "__context__greeting": "Informal greeting on the homepage",
  "brand": "LazyLocales",
  "__lock__brand": true
}
See the Source File page for the full annotation syntax, examples, and how the clean runtime file is generated.