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

# 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.0.tar.gz (8.4 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.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kaeris-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 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.0.tar.gz
Algorithm Hash digest
SHA256 bdb32fbaeaddb0bc3cb7ce4437226c18a2c5f501601d9e49423f50eb4ae6642b
MD5 36fb22e13fc49b72573782583c43ab6c
BLAKE2b-256 f7b8283e7864625f6503ae0cd9d6ecceaaa9c90da2ab3df39cbf28a645517edf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kaeris-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1cdf01bb61c0f663b75ab16d8284e06766e5ac51338a9a0bea8c95c295dd29a
MD5 5cc09486156ccf4065758fa548d41e0b
BLAKE2b-256 a4e112e2df7369c55b4303dedad2dd645822c4bba5c6546f7447bb7ce95a96a7

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