Skip to content

localekit sync

Translate and push localization files to GitHub as a pull request

Solo plan

GitHub Token

The sync command needs a GitHub personal access token to create pull requests.

Create a token

  1. Go to github.com/settings/tokensGenerate new token (Fine-grained)
  2. Set a name (e.g., localekit) and expiration
  3. Under Repository access, select the target repository
  4. Under Permissions → Repository permissions, grant:
PermissionAccessWhy
ContentsRead and writePush translated files
Pull requestsRead and writeCreate and update PRs
MetadataRead-onlyRequired by GitHub
  1. Click Generate token and copy it

Set the token

bash
export GITHUB_TOKEN="ghp_your_token_here"

Or pass it directly:

bash
localekit sync --github-token ghp_your_token_here

Or add to .localekitrc.yml:

yaml
github:
  token: ${GITHUB_TOKEN}
  repo: owner/repo
  baseBranch: main

Quick Start

bash
localekit sync --engine deepl --api-key $DEEPL_API_KEY
bash
localekit sync --engine openai --api-key $OPENAI_API_KEY
bash
localekit sync --engine mlx --mlx-model mlx-community/Qwen3-4B-4bit

See Translation Engines for a detailed comparison and available MLX models.

Usage

bash
localekit sync [path] [options]

Arguments

ArgumentDescriptionDefault
pathPath to localization file or directory (defaults to current directory).

Options

OptionDescriptionDefault
--config <config>Path to configuration file (.localekitrc.yml)
-l, --languages <languages>Target languages to translate (comma-separated, e.g., 'de-DE,fr-FR')
--engine <engine>Translation engine: openai, deepl, mlxdeepl
--api-key <api-key>API key (or use LOCALEKIT_API_KEY, DEEPL_API_KEY, or OPENAI_API_KEY env var)
--github-token <github-token>GitHub personal access token (or use GITHUB_TOKEN env var)
--repo <repo>GitHub repository in owner/repo format
--branch <branch>Branch name for the PR (default: localekit/translations-YYYY-MM-dd)
--base <base>Base branch to target the PR againstmain
--title <title>Pull request titleUpdate translations via LocaleKit
--message <message>Commit messageUpdate translations
--source-language <source-language>Base/source language (e.g., en-US)
--mlx-model <mlx-model>MLX model ID from Hugging Face (e.g., mlx-community/Qwen3-4B-4bit)

Flags

FlagDescription
--skip-translateSkip translation and only push existing files
--dry-runPreview changes without pushing to GitHub
-v, --verboseShow detailed output

MLX (on-device)

6 models available — from Qwen3 4B (8 GB RAM) to Qwen3 32B (32 GB RAM). See all models and comparison.

LocaleKit CLI 0.7.2 · Built by Hexagone Studio