CLI + GitHub Action
Translation as a build step, not a dashboard you log into. The i18nme CLI diffs your source locale file against what it last synced, translates only what changed, and writes the results straight into your target locale files. Unchanged strings are served from translation memory and cost nothing — CI can run on every push without burning quota.
Install
No install needed — run it with npx, or add it as a dev dependency. The package is published as @cod3lab/i18nme (npm's package-similarity policy blocked the unscoped i18nme name), but the CLI command itself is still i18nme once installed:
npm install --save-dev @cod3lab/i18nme1. Initialize
npx @cod3lab/i18nme init --source-locale en --target-locales de,fr,esThis creates i18nme.config.json and an empty source locale file at locales/en.json (customize the path with --files, and the format with --format — see Adapters below).
2. Add strings
Edit locales/en.json like any nested i18n JSON file:
{
"greeting": {
"hello": "Hello"
}
}3. Get an API key
From your project's API Keys tab in the portal. This is the same project-scoped key used by the Translation API — sync authenticates with it, not a logged-in session, so it works unattended in CI.
4. Sync
export I18NME_API_KEY=key_live_XXXX
npx @cod3lab/i18nme synclocales/de.json, locales/fr.json, and locales/es.json get created/updated, and a .i18nme-lock.json file is written — commit it. It's what makes the next run diff-only: without it, every run re-translates every key (still correct, since the server re-checks translation memory too, just slower).
Flags:
--overwrite— replace existing translations instead of only filling in missing ones.--force— ignore the lockfile and resync every key.
By default, translations written by sync land with status review — they're not served by the Translation API (which defaults to approved-only) until someone approves them in the portal. If you want CI syncs to go live immediately with no human step, turn on Auto-approve CLI syncs in the project's settings in the portal — this only affects the CLI/CI path; the portal's own translate/edit UI always writes review regardless of this setting.
5. Check completeness in CI
npx @cod3lab/i18nme status --checkstatus --check only counts approved translations, so if your project has auto-approve turned off, run this after a human has reviewed and approved the synced strings — not immediately after sync.
Exits non-zero if any target locale is missing translations for a key that exists in the source locale — use it as a build gate.
GitHub Action
name: Sync translations
on:
push:
branches: [main]
jobs:
i18nme-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: omnibus04/i18nme/cli/action@v1
with:
api-key: ${{ secrets.I18NME_API_KEY }}Runs i18nme sync and opens a pull request with the updated locale files — translation becomes a normal part of code review, not a separate workflow.
Adapters
i18nme.config.json's format field selects how locale files are read and written:
format | Ecosystem | Layout |
|---|---|---|
json | next-intl, i18next | Nested JSON, dot-notation keys (default) |
arb | Flutter | Flat JSON, @@locale header |
rails-yaml | Ruby on Rails | YAML nested under a locale root key |
See the full config file reference for every field.