Skip to main content

AI localization CLI — translate JSON/YAML/.strings/.po/ARB/Android XML into 42 languages

Project description

KAERIS i18n — CLI

AI localization from your terminal. Translate your app's strings files into 42 languages — locally or in CI/CD. Format-aware, placeholder-safe, and incremental (only new keys).

  • Zero dependencies — pure Python stdlib, installs in a second
  • 7 formats — JSON, YAML, .strings, .po, ARB, Android XML, CSV
  • Incremental--only-new translates just the keys you added, merges the rest
  • Translation QA — flags dropped placeholders & UI-overflow risk; --verify back-translates so you can check the meaning
  • CI-ready — GitHub Action included; open a PR with fresh translations on every push

Install

pip install kaeris
# or, without installing:
pipx run kaeris --help

Quick start

# Translate a whole file into Spanish, French and Japanese
kaeris translate locales/en.json --langs es,fr,ja --out locales

# Only translate keys that are missing from the existing target files
kaeris translate locales/en.json --langs es,fr,ja --out locales --only-new

# Keep brand/product names verbatim in every language (glossary / do-not-translate)
kaeris translate locales/en.json --langs es,de --keep "KAERIS,GitHub,OpenRouter"

# Translation QA — verify meaning (back-translate) and write verify.json to review
kaeris translate locales/en.json --langs de,ja --verify

# List all supported languages
kaeris languages

Output files are written next to the source (or into --out), named by language: es.json, fr.json, ja.json (or values-es/strings.xml for Android, etc.).

Authentication & tiers

Tier How Limit
Free (anonymous) no key 10,000 chars/file
Pro / Scale --key kaerisp_… or KAERIS_API_KEY 200k / 500k chars/file
Lifetime (BYOK) --key and --openrouter-key sk-or-… unlimited (you pay OpenRouter for tokens)
export KAERIS_API_KEY=kaerisp_xxxxxxxx
export KAERIS_OPENROUTER_KEY=sk-or-v1-xxxx   # Lifetime/BYOK only
kaeris translate en.json --langs de,uk

Get a key at https://kaeris.dev/pricing.html. A free OpenRouter key: https://openrouter.ai/keys.

CI/CD (GitHub Actions)

Translate new keys and open a PR automatically on every push — see translate.example.yml:

- uses: kaeris-dev/i18n_tool/.github/actions/kaeris-translate@main
  with:
    source: locales/en.json
    languages: es,fr,de,ja
    out: locales
    only-new: "true"

How incremental mode works

--only-new (JSON) parses your source and each existing translation, finds the keys present in the source but missing from the target, translates only those, and merges them back — preserving your existing translations and any non-string values (numbers, booleans). No more re-translating (and re-paying for) the whole file every time you add one string.

Environment variables

  • KAERIS_API_KEY — API key
  • KAERIS_OPENROUTER_KEY — OpenRouter key (BYOK)
  • KAERIS_API_URL — override the API base URL
  • NO_COLOR — disable coloured output

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kaeris-0.1.3.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaeris-0.1.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file kaeris-0.1.3.tar.gz.

File metadata

  • Download URL: kaeris-0.1.3.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for kaeris-0.1.3.tar.gz
Algorithm Hash digest
SHA256 954f417b21461f9df287798216819d4136cd55e67ea26a05295187dde59f1540
MD5 ecb48fad9bdb8ffea192077aef665113
BLAKE2b-256 53af51ab175299ce81cf2218e84d469ff6b4e90bb89cdfcfab3ec9d97cdecac7

See more details on using hashes here.

File details

Details for the file kaeris-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: kaeris-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for kaeris-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 859241714cf7b1f84c82c68dbcadab59066a3fddc086ec2b8c725cb2b922532b
MD5 0f98455bdbdeeca754b40cb5fb354439
BLAKE2b-256 0f0ded58d5c0f76f68938ad47511d7b675a98f7b53a620484c6ec7f4ad7347f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page