CLI commands
The CLI guide shows the common workflows. This page lists everything, and is generated from the same table that drives --help.
Common flags
silent, infoDefaultinfofalseInspect
info
Print the resolved i18n configuration of the project
falsecheck
The CI gate: fail on missing, empty, extra, undefined or unused keys and broken placeholders
i18n.translationDir of nuxt.configunused named here fails when it cannot runDefault all but duplicatesfalsefalsei18n-micro check
i18n-micro check --only missing,placeholders --json
stats
Show translation completion per locale
i18n.translationDir of nuxt.configfalsei18n-micro stats --baseRef main
i18n-micro stats --html reports/i18n.html
lint
Check the text of translations; fails when issues remain
i18n.translationDir of nuxt.configenabledRules of .i18n-lintrc.jsonfalsefalsei18n-micro lint --rules no-trailing-spaces --fix
search
Search keys and values, and show where each key is used
i18n.translationDir of nuxt.configfalseclean would remove; the query becomes optionalDefaultfalseglobal, pages, allDefaultallfalsei18n-micro search "Welcome"
i18n-micro search --onlyUnused
Translation workflow
extract
List the keys source files use that have no text yet, and add those with a default text to the default locale
i18n.translationDir of nuxt.configi18n-micro extract
translate
Fill missing translations from the default locale through a translation service
i18n.translationDir of nuxt.configfalsefalse|ai serviceDefault.i18n-glossary.json when it existsi18n-micro translate --dryRun
I18N_TRANSLATE_TOKEN=... i18n-micro translate --service deepl --locale de,fr
i18n-micro translate --service ai --options provider:openai,model:gpt-4o-mini
i18n-micro translate --service libretranslate --options baseUrl:https://translate.example.com
sync
Remove keys the default locale does not have; stops when that cannot be proven safe. Missing keys stay missing
i18n.translationDir of nuxt.configfalsefalsei18n-micro sync --dryRun
clean
Remove keys nothing in the project uses; stops when that cannot be proven
i18n.translationDir of nuxt.configfalsefalsei18n-micro clean --dryRun
i18n-micro clean --exclude '^errors\.'
Refactoring
text-to-i18n
Replace hardcoded text in Vue templates with translation calls, and report hardcoded text in code
<translationDir>/<defaultLocale>.jsonfalsefalsei18n-micro text-to-i18n --dryRun
i18n-micro text-to-i18n --path components --context ui
rename
Rename a key or a namespace in every locale and in source files
i18n.translationDir of nuxt.configfalsei18n-micro rename --from common.save --to actions.save
pseudo
Fill a locale with pseudo-translations to find layout and hardcoded-text issues
i18n.translationDir of nuxt.configfalseformat
Rewrite locale files with sorted keys and uniform indentation
i18n.translationDir of nuxt.config2truefalsei18n-micro format --check
Exchange
export
Export locale files to PO or CSV, with the default-locale text as the source
i18n.translationDir of nuxt.configpo, csvDefaultpopots for po, csv_exports for csvfalsei18n-micro export --format csv
import
Merge PO or CSV files into the locale files
i18n.translationDir of nuxt.configpo, csvDefaultpopots for po, csv_exports for csvfalsei18n-micro import --format csv --dryRun
sync-remote
Pull global translations from, or push them to, the HTTP endpoint in .i18n-remote.json
i18n.translationDir of nuxt.configtruefalsefalsefalsei18n-micro sync-remote --dryRun
i18n-micro sync-remote --no-pull --push
Lint rules
--fix.--fix.Exit codes
check, lint or format --check found something, clean or sync could not prove a removal safe, export would overwrite unimported work, translate left keys out, import or sync-remote met a conflict, a sync-remote push would drop remote text. A --dryRun of clean, sync or a sync-remote pull reports these and exits 0Configuration files
lint: enabledRules, disabledRules, customRegexRules (name, pattern, flags, description, replacement)sync-remote: url, path, token, auth (username, password). type may be left out; only custom existstranslate --service ai: entries of source, target, and optional from, toEnvironment variables
translate. Read from .env toosync-remote. Read from .env tooai service, when I18N_TRANSLATE_TOKEN is not setdefaultLocale, as in the module