CLI Commands

orphans

Report translation keys that no source code references. Nothing is deleted unless remove is set.

Synopsis

the-i18n-cli orphans

Flags

FlagTypeRequiredDefaultDescription
--layerstringnoLayer name to scope this to (e.g., "root", "app-admin"). If omitted, every layer is included. Call discover to list the layers.
--localestringnoLocale code to read the translation keys from (e.g., "en", "en-US"). Defaults to the project default locale.
--removebooleannofalsePermanently delete the orphan keys from every locale file of their layer. Default: false, which only reports them — run without it first and read the findings. Uncertain keys and misplaced usages are never deleted.
--usagesbooleannofalseReport where keys are referenced in source (file paths and line numbers) instead of which keys are unreferenced.
--keysstringnoKeys to report usages for. Only read together with usages; without it, every key is considered. Comma-separated.
--outputFilestringnoAbsolute 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/orphan-keys.json"
--codequalityOutputstringnoAlso write the orphan findings as a GitLab Code Quality (CodeClimate) JSON report to this file path.
--failOnOrphansbooleannofalseExit 2 when any orphan key is found (CI gate).
Copyright © 2026