AI-powered translation management. Validate, sort, and automatically generate missing translations using LLMs.
bun add @babeli/cli @babeli/anthropic# Validate translation files
bunx babeli validate -f en:locales/en.json de:locales/de.json
# Auto-translate missing keys
bunx babeli update -f en:locales/en.json de:locales/de.json -p anthropic -k sk-ant-...Or use a config file (babeli.config.mjs):
export default {
files: [
{ language: "en", file: "locales/en.json" },
{ language: "de", file: "locales/de.json" },
],
modelProvider: "anthropic",
baseLanguage: "en",
};bunx babeli validate
bunx babeli update| Package | Description |
|---|---|
@babeli/cli |
Command-line interface |
@babeli/core |
Core library, readers/writers, and actions |
@babeli/anthropic |
Anthropic Claude model provider |
@babeli/ollama |
Ollama local LLM provider |
JSON, JavaScript (.js/.mjs), TypeScript (.ts/.mts), YAML (.yaml/.yml), and Apple Strings (.strings).
See the @babeli/cli README for full documentation on CLI options, configuration, file formats, and usage.
See the @babeli/core README for programmatic usage and extensibility.
bun install
bun run test
bun run lint:check
bun run format:checkMIT
