CLI — Audit & Reports
Audit and reporting commands — check, prune, stale, export, import, stats. For scaffolding and generation commands (init, add, merge, types, split, merge-ns), see CLI — Scaffolding & Codegen.
check — Audit translation completeness
Reads all .json files in the locales directory and reports missing or extra keys compared to the reference locale.
vue-i18n-kit check
vue-i18n-kit check --default en --dir src/i18n
# Exit with code 1 if any keys are missing (useful in CI)
vue-i18n-kit check --default en --fail| Flag | Default | Description |
|---|---|---|
--dir <path> | src/locales | Locales directory. |
--default <locale> | first alphabetically | Reference locale. |
--fail | false | Exit with code 1 if any keys are missing. |
CI integration (GitHub Actions):
- name: Check i18n completeness
run: npx vue-i18n-kit check --default en --failprune — Remove unused keys
Scans source files for t(), tm(), $t() calls and removes any locale keys not referenced anywhere in the project.
vue-i18n-kit prune --dry
vue-i18n-kit prune
vue-i18n-kit prune --entries i18n-tools/locales.entries.json| Flag | Default | Description |
|---|---|---|
--dir <path> | src/locales | Locales directory. |
--entries <file> | (scan) | Path to a pre-built locales.entries.json; skips scanning. |
--dry | false | Print keys that would be removed, without writing files. |
--yes | false | Skip confirmation prompt. |
--ignore <patterns> | (none) | Comma-separated key patterns to never remove (e.g. "status.*,legacy.*"). |
Tip: Run
prune --dryin CI and fail the build if output is non-empty to enforce a "no dead keys" policy.
stale — Show outdated translations
Reports keys whose reference locale value has changed since the translation was last reviewed. Requires staleTracking: true in i18n-kit.config.json.
vue-i18n-kit staleOutput:
Stale keys (reference locale changed since last review):
buttons.submit stored: "Submit" → current: "Submit form"
errors.auth.invalid stored: "Invalid" → current: "Invalid credentials"export — Export for translators (XLIFF / PO)
Exports a locale to XLIFF 1.2 or Gettext PO format, ready to send to a professional translation agency or CAT tool.
vue-i18n-kit export --locale ru
vue-i18n-kit export --locale ru --format po --out translations/ru.po
vue-i18n-kit export --locale ru --format xliff --ref en| Flag | Default | Description |
|---|---|---|
--locale <code> | — | Required. Locale to export. |
--format <xliff|po> | xliff | Output format. |
--out <path> | <locale>.<format> | Output file path. |
--dir <path> | src/locales | Locales directory. |
--ref <code> | first in config | Reference locale (source language). |
import — Import from XLIFF / PO
Reads a completed XLIFF or PO file from a translator and writes the translated values back into the locale JSON file.
vue-i18n-kit import ru.xliff
vue-i18n-kit import translations/ru.po --dryThe target locale code is read from the file itself. Only keys present in the import file are updated; unrelated keys are left untouched.
Coverage report (vue-i18n-kit stats)
Get a quick snapshot of translation completeness without opening the editor.
vue-i18n-kit stats
vue-i18n-kit stats --format json --out ci-report.json
vue-i18n-kit stats --format htmlConsole output:
vue-i18n-kit stats 2026-04-11
35 keys · 3 locales
Coverage
🇬🇧 English (en) ████████████████████ 100%
🇷🇺 Русский (ru) ████████████████░░░░ 89% 4 missing
🇩🇪 Deutsch (de) ███████████████░░░░░ 77% 8 missingGitHub Actions example:
- name: Check i18n coverage
run: |
npx vue-i18n-kit stats --format json --out coverage.json
node -e "
const r = require('./coverage.json');
const low = r.locales.filter(l => l.coverage < 80);
if (low.length) { console.error('Low coverage:', low.map(l => l.code + ' ' + l.coverage + '%')); process.exit(1); }
"| Option | Description |
|---|---|
--format console | Terminal output with ANSI colours (default) |
--format json | Machine-readable JSON; writes to stdout or --out |
--format html | Self-contained HTML file (default: i18n-stats.html) |
--out <path> | Write to file instead of stdout (json/html) |
--dir <path> | Locales directory (default: src/locales) |