2025.3.0-6.1313 โ€ข Published 4 months ago

myelin.dev v2025.3.0-6.1313

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Myelin ยท License: MIT

Translation infrastructure that sparks joy โœจ

Myelin seamlessly integrates localization into your development process, freeing you to prioritize building exceptional user experiences while minimizing time spent on translation tasks.

npx myelino --translate

Features

  • ๐Ÿ”’ Local First & Private
    Translation calls happen on your machine. We never send your data to third-party APIs or external databases.

  • ๐ŸŒ Open Source
    Every line of code is transparent and available on GitHub.

  • ๐Ÿ†“ Free Forever
    No hidden costs. Now and always.

  • ๐Ÿค– Multi-Model Support
    Choose from openai, deepseek, moonshot, qwen, or bring your own model.

  • ๐Ÿ“š First-Class i18n Library Support
    Works seamlessly with next-intl, react-intl, react-i18next, and more.

  • ๐Ÿ—‚ Namespace Support
    Supports both namespaced and non-namespaced structures out of the box.

Quick Start

  1. Install Myelin
    Ensure Node.js (v18+) is installed, then run:

    npx myelino --init
  2. Configure
    Create myelin.config.json in your project root:

    {
      "aiProvider": "deepseek",
      "aiModel": "deepseek-chat",
      "locale": {
        "location": "locales",
        "sourceLanguage": "en",
        "targetLanguages": ["es", "fr", "zh", "zh-TW", "en-US"]
      }
    }
  3. Add API Key
    Create a .env file with your AI provider key:

    AI_API_KEY=sk-proj-your-api-key
  4. Translate!
    Run the translation command:

    npx myelino --translate

    Myelin scans your source locale file (e.g., locales/en.json), translates new/missing strings, and updates target files (e.g., locales/fr.json).

Configuration Guide

myelin.config.json

KeyDescriptionExample
aiProviderAI service provider"openai", "deepseek"
aiModelModel ID for the provider"deepseek-chat", "gpt-4"
locale.locationPath to locale directory"src/locales"
locale.sourceLanguageBase language (ISO 639-1)"en"
locale.targetLanguagesLanguages to translate into["es", "zh-TW"]

Supported Providers

  • OpenAI
  • DeepSeek
  • Moonshot
  • Qwen

Bring Your Own Model: Custom providers can be integrated via the open-source codebase.