CLI Commands
Complete reference for the v2 CLI.
translate
shipi18n translate <input> [options]
<input> is the source locale file, for example locales/en.json.
Options
| Option | Default | Description |
|---|---|---|
-t, --target <languages> | es,fr | Comma-separated target language codes |
-s, --source <language> | en | Source language code |
-o, --output <dir> | ./locales | Directory the translated files are written to |
-p, --provider <name> | anthropic | anthropic or openai |
--api-key <key> | env var | Pass the key explicitly instead of via the environment |
--model <model> | provider default | Override the model |
-i, --incremental | off | Reuse existing output files; only translate new or missing keys |
Examples
# three languages, default provider shipi18n translate locales/en.json --target es,fr,de # only what changed since last time shipi18n translate locales/en.json --target es,fr --incremental # OpenAI, custom output directory shipi18n translate src/i18n/en.json -p openai -t ja,ko -o src/i18n # translate from German instead of English shipi18n translate locales/de.json --source de --target en
Removed in v2
shipi18n keys and shipi18n config managed a hosted Shipi18n account. There is no account any more, so both commands are gone. Provider credentials live in your environment instead.