CLI Commands

find-duplicates

Find translation keys defined in BOTH a shared layer and an app layer that consumes it.

Synopsis

the-i18n-cli find-duplicates

Flags

FlagTypeRequiredDefaultDescription
--localestringno—Locale code to compare values in (e.g., "de", "en-US"). Defaults to the project default locale.
--byValuebooleannofalseAlso group different keys carrying the same value — e.g. common.actions.save and calendar.views.save both "Speichern". Each group says what to do about it: "reuse" (a shared layer already has it — delete the app copies and repoint the call sites), "promote" (move one to a shared layer) or "consolidate" (duplication inside one layer). Default: false.
--minValueLengthstringno—Shortest value worth grouping when byValue is set. Default: 4 — below that, values like "OK" repeat across unrelated namespaces legitimately.
--outputFilestringno—Absolute path to write the full JSON output to. Only a compact summary is returned to the caller, which is what you want for a result too large to read in one piece. Example: ".i18n-reports/duplicate-keys.json"
--codequalityOutputstringno—Also write the duplicate keys as a GitLab Code Quality (CodeClimate) JSON report to this file path.
Copyright © 2026