Documentation

Commands

translate, update, lint, and auth.

translate

Translates every string in the source file. Use this to create translations that do not exist yet.

# using the config file
parlancekit translate

# explicit, multiple languages
parlancekit translate --input en.json --langs es,fr,de

# single language, exact output path
parlancekit translate --input en.json --langs es --output es.json

# preview only
parlancekit translate --dry-run

update

Compares your source against an existing translation and sends only the missing or changed strings. Your existing translations are never overwritten, and you are only billed for what is new.

parlancekit update --input en.json --langs es,fr --pattern locales/{lang}.json

# single language, explicit target
parlancekit update --input en.json --langs es --target es.json

update only touches languages that already have a translation file. A language with no target file is skipped and reported — use translate to create it first.

lint

Checks a localization file for structural problems — duplicate keys, unbalanced braces, invalid or mixed format specifiers, raw percent signs — and for plural-shaped flat strings that will not translate correctly into languages needing more plural forms than your source. Output as text or JSON, which makes it easy to fail a CI build on errors.

Pass --target-langs to name the languages you are translating into; lint then reports exactly which targets a flat count string would break, and how to express it as a plural for your format. Add --strict to also flag literal counts such as "5 seats", not only runtime placeholders like "{{count}} seats".

parlancekit lint --input en.json
parlancekit lint --input en.json --target-langs ar,ru
parlancekit lint --input en.json --format json

auth

Stores your API key locally. Run once per machine. In CI, run it as a step before any translate command.

parlancekit auth sk-pk-your-key

Shared flags

FlagDescription
--input, -iSource file. Overrides sourceFile.
--langsComma-separated target languages.
--tone, -tTone of voice.
--formalitydefault, formal, or informal.
--glossary, -gComma-separated terms never to translate.
--pattern, -pTarget path pattern using {lang}.
--output, -oExact output path. Single language only.
--skip-keysComma-separated key patterns to skip.
--preserve-valuesComma-separated values to preserve exactly.
--target-langsTarget languages for the plural-shape check (lint only).
--strictFlag literal-integer counts too, not just placeholders (lint only).
--config, -cPath to a config file other than ./parlancekit.config.json.
--dry-runPrint the plan and exit. Writes nothing, calls nothing.
--forceOverwrite output files without asking.

--lang (singular) is deprecated. Use --langs, which accepts one or many.