Prerequisites
- A LazyLocales project with a
lazylocales.config.jsoncommitted to your repo - A read_write API token (generated in your project settings)
Generate an API token
Go to your project settings
Open your project at lazylocales.com and navigate to Settings.
Create a token
Create a new API token with read_write permissions. Give it a descriptive label like
CI Pipeline.How it works
The CLI automatically checks for theLAZYLOCALES_API_KEY environment variable. When set, it skips interactive login and authenticates with the token instead. No config changes needed — just set the env var and run the CLI.
GitHub Actions
.github/workflows/translate.yml
GitLab CI
.gitlab-ci.yml
Vercel
AddLAZYLOCALES_API_KEY to your Vercel project environment variables, then add a prebuild step:
package.json
Tips
- Use
--jsonflag in CI for machine-readable output and cleaner logs - Trigger translations only when the source file changes (use path filters in your CI config)
- Use read_write tokens for CI (read-only tokens cannot push source files or trigger translations)
- Commit
lazylocales.config.jsonto your repo — it never contains secrets