Skip to content

CLI Reference ​

lingosync sync ​

Syncs every configured locale against the current master file.

bash
npx lingosync sync [--dry-run]

For every key currently in the master:

  1. If it has an active override for a locale, that value is used and the key is never sent to the provider.
  2. Otherwise, if the master's value changed since the last sync (or the target locale file doesn't have that key at all yet), it's translated.
  3. Otherwise, the existing value in the target locale file is kept as-is.

Keys removed from the master are removed from every target locale. After a successful (non-dry-run) sync, .translations-lock.json is updated to reflect the master's current state.

--dry-run reports exactly what would happen — counts of new, changed, and removed keys per locale — without calling the translation provider or writing any file. Doesn't require an API key.

lingosync override ​

Pins the value of one key, for one locale, by hand.

bash
npx lingosync override --locale <locale> --key <key> --value <value>
bash
npx lingosync override --locale es --key greeting.title --value "Hola"
  • --locale: must be one of the locales in your languages config.
  • --key: dot notation, matching the flattened path in your master file (greeting.title, not greeting["title"]).
  • --value: the value to pin.

That exact locale+key combination is now protected: future sync runs will never overwrite it, even if the master's value for that key changes. Other locales for the same key keep translating normally.

lingosync prune-overrides ​

Removes overrides whose key no longer exists in the master.

bash
npx lingosync prune-overrides [--dry-run]

When a key is deleted from the master, sync removes it from every locale file — but any override pinned for that key is left alone. That's deliberate: a deleted key might have been a mistake, and an orphaned override is still useful information until someone decides, on purpose, to clean it up. This command is that decision. It never runs on its own.

--dry-run reports which overrides would be removed, without writing anything.

Global ​

bash
npx lingosync --help
npx lingosync <command> --help
npx lingosync --version

Released under the MIT License.