Skip to main content
Run LazyLocales translations automatically as part of your CI/CD pipeline. This ensures translations are always up to date before deployment.

Prerequisites

  1. A LazyLocales project with a lazylocales.config.json committed to your repo
  2. A read_write API token (generated in your project settings)

Generate an API token

1

Go to your project settings

Open your project at lazylocales.com and navigate to Settings.
2

Create a token

Create a new API token with read_write permissions. Give it a descriptive label like CI Pipeline.
The token is shown once when created. Copy it immediately and store it as a secret in your CI provider.
3

Add the token to your CI secrets

Store the token as LAZYLOCALES_API_KEY in your CI provider’s secret management.

How it works

The CLI automatically checks for the LAZYLOCALES_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

Add LAZYLOCALES_API_KEY to your Vercel project environment variables, then add a prebuild step:
package.json

Tips

  • Use --json flag 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.json to your repo — it never contains secrets