translate-kit

i18n that writes itself

From bare strings to fully translated app — at build time, with AI.One CLI. Any provider. Zero runtime.

Works with next-intl · Powered by Vercel AI SDK

How it works

Five steps. One minute.

01

Install

One package. That's all you need.

~/my-app
$ bun add translate-kit @ai-sdk/openai
installed translate-kit@0.1.0
02

Configure

The interactive wizard sets up everything. Pick your AI provider, set your target languages, done.

~/my-app
$ bunx translate-kit init
┌ translate-kit
◆ Provider: OpenAI (gpt-4o-mini)
◆ Source: en
◆ Target: es, fr, de, ja
◆ Directory: ./messages
└ Config created ✓
03

Scan

Finds every translatable string in your codebase. AI generates semantic keys automatically.

~/my-app
$ bunx translate-kit scan
Scanning src/**/*.tsx...
Found 47 strings in 12 files
Generating semantic keys...
✓ .translate-map.json (47 keys)
✓ messages/en.json
04

Transform

Replaces hardcoded strings with i18n calls. Adds imports automatically. Zero manual work.

~/my-app
$ bunx translate-kit codegen
src/app/page.tsx
"Welcome back" → t("hero.welcomeBack")
"Get started" → t("cta.getStarted")
src/components/nav.tsx
"Sign in" → t("nav.signIn")
"Sign out" → t("nav.signOut")
✓ 47 strings replaced in 12 files
05

Translate

AI translates only what changed. Incremental by default. Run it and forget.

~/my-app
$ bunx translate-kit translate
Translating en → 4 locales...
✓ es 47 keys 1.2s
✓ fr 47 keys 1.1s
✓ de 47 keys 1.3s
✓ ja 47 keys 1.5s
Done — 188 translations ✓

Any AI Provider

OpenAI, Anthropic, Google, Mistral, Groq — any Vercel AI SDK provider works.

Incremental

Lock file tracks source hashes. Re-runs only translate what changed.

Two Modes

Keys mode with t("key") or inline mode with <T> components. Your choice.

next-intl Ready

Generates useTranslations-compatible message files out of the box.

Scanner + Codegen

Extract strings and replace them with i18n calls automatically.

Zero Runtime

All translation happens at build time. No client-side overhead.

Ready to translate?

Get started in under a minute.