Skip to content

uebelack/babeli

Repository files navigation

babeli

CI License: MIT Coverage Status

Babeli

AI-powered translation management. Validate, sort, and automatically generate missing translations using LLMs.

Quick Start

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

Packages

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

Supported File Formats

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.

Development

bun install
bun run test
bun run lint:check
bun run format:check

License

MIT

About

AI-powered translation management. Validate, sort, and automatically generate missing translations using LLMs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors