Skip to main content

Installation

Requirements

  • Node.js 20.11+ (native ESM)
  • A translation API key (see below)

Install

npm install --save-dev champollion

Get an API Key

Champollion needs a translation backend. Pick one:

ProviderEnvironment VariableBest For
OpenRouter (recommended)OPENROUTER_API_KEYContent-heavy projects, Markdown, 200+ models
Gemini (free tier)GEMINI_API_KEYZero-cost start, good quality
OpenAIOPENAI_API_KEYDirect GPT-4o access
AnthropicANTHROPIC_API_KEYDirect Claude access, nuanced text
DeepLDEEPL_API_KEYEuropean languages, built-in formality
Google TranslateGOOGLE_TRANSLATE_API_KEYHigh-volume key-value pairs, 130+ languages
Microsoft TranslatorMICROSOFT_TRANSLATOR_API_KEYAzure, 100+ languages
LibreTranslateLIBRETRANSLATE_API_URLSelf-hosted, privacy-first

OpenRouter provides a unified API for 200+ LLM models. Free tier available.

# Sign up at https://openrouter.ai, then:
export OPENROUTER_API_KEY=sk-or-v1-...

Or add to .env.local:

OPENROUTER_API_KEY=sk-or-v1-your-key-here

Best for: content-heavy projects, Markdown translation, and projects needing content-aware shielding (code blocks, shortcodes, interpolation variables).

Verify Installation

npx champollion --help

You should see the list of available commands. You're ready for the Quick Start.