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
  • 6 formats — JSON, YAML, .strings, .po, ARB, Android XML
  • Incremental--only-new translates just the keys you added, merges the rest
  • 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"

# 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 / Team --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.2.tar.gz (9.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.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kaeris-0.1.2.tar.gz
  • Upload date:
  • Size: 9.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.2.tar.gz
Algorithm Hash digest
SHA256 ffdbe9e63f31a018de4c96feb4d5e12a2f45b0311f482cea046956ac8d6da6c7
MD5 aab6ac70e7e3d82e364b991bb31dfccd
BLAKE2b-256 3719e3fc5e8030b56e895761beb293833919bfd2072a425bc71aee64c16e9407

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaeris-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35e815abf1557ba7e9b49f3e3dbb1ebafb1d96902537f4a3b835e2517d1231b0
MD5 4f2fdf1734b9bc4037f1f21f6c3191d0
BLAKE2b-256 b2fc3bb0c6efbe910bd18f2cd61a777b6ef603600d7a6472b0813d552cd3194c

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