CLI Commands

remove-orphans

Find and remove orphan translation keys not referenced in source code

Synopsis

the-i18n-cli remove-orphans

Flags

FlagTypeRequiredDefaultDescription
--layerstringnoFilter to a specific layer
--localestringnoLocale to check (default: project default)
--dryRunbooleannotruePreview without removing (default: true)
--outputFilestringnoWrite full output to this file path and return only a summary (useful for large outputs)
--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)

Every command accepts the shared flags and sets one of the exit codes documented on the overview.

Copyright © 2026