CLI Commands
Full reference for all i18n CLI commands — push, publish, translate, validate, draft, import, export, and more.
i18n push
Scan your codebase for data-label attributes and i18n.t() calls, then sync the discovered keys to ShipEasyI18n.
i18n push
i18n push --profile en:prod
i18n push --chunk index # push only keys matching the index chunk pattern
i18n push --dry-run # preview what would be pushed without writing
What it does:
- Scans files matching
scan.includeini18n.config.json - Extracts all
data-labelvalues andi18n.t('...')key names - Creates any keys that don't yet exist in the specified profile
- Reports new, updated, and unchanged key counts
Scanning src/…
✓ 142 keys found
+ 12 new keys created
~ 3 keys updated (description changed)
= 127 keys unchanged
→ Synced to en:prod in 1.4s
i18n validate
Check that every key referenced in your codebase exists in ShipEasyI18n. Exits with code 1 if any keys are missing (useful as a CI gate).
i18n validate
i18n validate --profile en:prod
✓ 142 keys found in code
✓ All keys exist in en:prod
If keys are missing:
✗ 3 keys not found in ShipEasyI18n:
checkout.submit.express src/Checkout.tsx:42
form.cvv.tooltip src/PaymentForm.tsx:18
errors.paymentDeclined src/PaymentForm.tsx:91
Run i18n push to create them.
i18n publish
Publish a profile to the CDN. Generates content-addressed label files, uploads to R2, and purges the Cloudflare CDN cache.
i18n publish --profile en:prod
i18n publish --profile fr:prod --profile de:prod # publish multiple
i18n publish --all # publish all profiles
Changes propagate globally in ~60 seconds.
i18n translate
AI-assisted translation from a source profile to one or more target profiles.
i18n translate requires the Business plan or above.
i18n translate --from en:prod --to fr:prod
i18n translate --from en:prod --to fr:prod --to de:prod --to es:prod
i18n translate --from en:prod --to fr:prod --missing-only # skip already-translated keys
i18n translate --from en:prod --to fr:prod --chunk checkout # translate one chunk
The command creates draft translations for review before publishing:
Translating en:prod → fr:prod
✓ 142 keys translated
✗ 3 keys skipped (contain HTML — manual review needed)
→ Draft created: draft_abc123
→ Preview: https://app.i18n.shipeasy.ai/dashboard/profiles/fr:prod?draft=draft_abc123
i18n draft
Manage translation drafts (Pro+ feature).
i18n draft list --profile fr:prod
i18n draft create --profile fr:prod --name "Q1 marketing copy"
i18n draft publish --id draft_abc123
i18n draft discard --id draft_abc123
i18n draft diff --id draft_abc123 # show changed keys
i18n coverage
Show translation coverage stats across profiles.
i18n coverage
i18n coverage --profile fr:prod
Profile Keys Translated Coverage
─────────────────────────────────────────────
en:prod 142 142 100%
fr:prod 142 118 83%
de:prod 142 61 43%
es:prod 142 0 0%
i18n scan
Scan your codebase without pushing — useful to preview what push would do.
i18n scan
i18n scan --diff HEAD~1 # only scan files changed since last commit
i18n scan --json # output as JSON for use in scripts
i18n codemod
Run a framework-specific codemod to automatically add data-label attributes to your source code.
i18n codemod nextjs
i18n codemod react
i18n codemod vue
i18n codemod rails
i18n codemod django
i18n codemod auto # auto-detect framework from package.json / project files
Options:
i18n codemod nextjs --path src/ # target directory (default: from i18n.config.json)
i18n codemod nextjs --dry-run # preview changes without writing files
i18n codemod nextjs --interactive # review each change before applying
The codemod does a two-pass scan:
- Detects string literals in JSX/template code
- Generates key names from the string content and context
- Replaces strings with
data-labelattributes and writes a review file (i18n-codemod-review.json)
Always review i18n-codemod-review.json — it lists keys where the codemod was uncertain and flags strings that contain HTML or are too short to translate reliably.
i18n import
Import keys from a JSON, CSV, or XLIFF file into a profile.
i18n import --profile fr:prod --file translations.json
i18n import --profile fr:prod --file translations.csv
i18n import --profile fr:prod --file translations.xliff # Pro+ only
JSON format:
{
"nav.home": "Accueil",
"nav.signIn": "Se connecter",
"checkout.submit": "Passer la commande"
}
i18n export
Export a profile's keys to a file.
i18n export --profile fr:prod --format json # default
i18n export --profile fr:prod --format csv
i18n export --profile fr:prod --format xliff # Pro+ only
i18n export --profile fr:prod --out ./translations/fr.json
i18n keys
Manage API keys.
i18n keys list
i18n keys create --label "Production"
i18n keys revoke --id key_abc123
Global flags
All commands support:
| Flag | Description |
|---|---|
--config <path> | Path to i18n.config.json (default: searches up from CWD) |
--token <token> | Override the stored secret token |
--api <url> | Override the API base URL (for self-hosted) |
--json | Output as JSON |
--quiet | Suppress non-error output |
--verbose | Show detailed request/response logs |