Prerequisites
- A LazyLocales project with a
lazylocales.config.tscommitted 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.Configuration
Update your config to use the API token in CI:lazylocales.config.ts
apiToken is set, the CLI skips the interactive login flow and authenticates directly with the token.
GitHub Actions
.github/workflows/translate.yml
GitLab CI
.gitlab-ci.yml
Vercel
AddLAZYLOCALES_API_TOKEN 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)
- Keep your
lazylocales.config.tscommitted to the repo — just make sureapiTokenreads from an environment variable