validate
localive validate [options]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--source <path> | src | Source root directory |
--locale-file <path> | src/locales/*.json | Locale JSON file(s) |
--json | false | Output structured JSON |
Output
Section titled “Output”Returns a ValidateResult with:
extracted— keys found in source coderesults— per-locale validation resultlocale— locale codemissingKeys— keys in source but not in locale fileunusedKeys— keys in locale file but not in source code
ok—trueif all locales have zero missing and zero unused keys
Examples
Section titled “Examples”# Validate against default locale fileslocalive validate
# Validate against specific fileslocalive validate --locale-file src/i18n/en.json --locale-file src/i18n/fr.json
# CI: exit non-zero on validation errorslocalive validate --json || exit 1