Quick Start
yaku works out of the box with the hosted backend — no API key needed. If you prefer to use your own LLM API key, see Option B below.
Option A: Use the hosted service (default)
Section titled “Option A: Use the hosted service (default)”-
Translate something
With no configuration, yaku sends requests to the hosted service at
api.yakulang.com:Terminal window yaku --to en "Bonjour le monde"Output:
Hello, world -
Set a default target language
Skip typing
--toevery time:Terminal window yaku config set default-target enNow you can simply run:
Terminal window echo "Bonjour le monde" | yaku -
Translate a file
Terminal window yaku -f README.fr.md -o README.mdyaku detects the
.mdextension and preserves Markdown structure (headings, code blocks, links) automatically.
The hosted service uses refined, per-language prompts for higher-quality translations. See Hosted Service & Plans for quota limits and how to upgrade.
Option B: Use your own API key
Section titled “Option B: Use your own API key”-
Set your API key
yaku supports Gemini, OpenAI, and Anthropic. Pick one:
Get a free API key from Google AI Studio.
Terminal window yaku config set backend geminiyaku config set api-key YOUR_GEMINI_API_KEYOr set it via environment variable:
Terminal window export YAKU_BACKEND=geminiexport GOOGLE_API_KEY=YOUR_GEMINI_API_KEYTerminal window yaku config set backend openaiyaku config set api-key YOUR_OPENAI_API_KEYOr with environment variables:
Terminal window export YAKU_BACKEND=openaiexport YAKU_API_KEY=YOUR_OPENAI_API_KEYyaku --to en "Hola"Terminal window yaku config set backend anthropicyaku config set api-key YOUR_ANTHROPIC_API_KEYOr with environment variables:
Terminal window export YAKU_BACKEND=anthropicexport YAKU_API_KEY=YOUR_ANTHROPIC_API_KEYyaku --to en "Hola" -
Set a default target language
Terminal window yaku config set default-target en -
Translate something
Terminal window echo "La réunion est prévue pour demain à 10 heures." | yakuOutput:
The meeting is scheduled for tomorrow at 10 o'clock.
Quick examples
Section titled “Quick examples”# Translate text directlyyaku --to en "おはようございます"
# Translate from a specific languageyaku --from fr --to en "L'API a renvoyé une erreur 404."
# Translate a JSON i18n file, preserving keysyaku --to en -f zh-TW.json -o en.json
# Polish your writing in another languageyaku --mode polish --to es "Quiero informarte que el deployment será delay."
# Add domain context for better terminologyyaku --to en --context "cooking recipe" -f recipe.fr.md
# Use a project glossaryyaku --to en --glossary terms.yaml -f docs.zh-TW.md
# Stream output in real timeyaku --to en --stream -f article.fr.md
# See model and token usageyaku --verbose --to en "こんにちは"Next steps
Section titled “Next steps”- Input & Output — stdin, files, and output options
- Backends — choose between Gemini, OpenAI, Anthropic, or the hosted service
- Format-Aware Translation — translate JSON, YAML, and Markdown with structure preservation
- Glossary — control terminology with a glossary file
- Flags Reference — every flag explained