CLI reference

norcube langsync sync

Reconcile a project's local translation files with Langsync

Not verified yet

Reconciles the local translation files in .langsync.json against the configured Langsync namespaces. The CLI submits one sync job per namespace and polls until the server is done; all namespaces run in parallel so you see a live dashboard of every job at once.

Phases (driven by the backend, durable across backend restarts):

1. planning — diff submitted marks vs server state, write op list
2. pushing  — apply each op (idempotent on resume)
3. autotranslating — trigger LLM batch (at-most-once cost guarantee)
4. finalizing — read per-language state and return it

Flags:

--dry-run            stop after planning; the response carries the plan
--strategy local     (default) push local, local-wins on conflicts
--strategy server    skip push entirely (pull-only refresh)
--strategy interactive  per-conflict prompt before submitting
--prune              delete server-side marks missing locally
--wait               (default) block until autotranslate has drained
--wait=false         submit and return; translations finish in the background
--retranslate-on-source-change
                     when a term's source-language value has changed,
                     empty its existing non-source-language translations
                     so the server re-translates them via the LLM
                     (default off: stale translations stay as-is)

Usage

norcube langsync sync [flags]

Examples

norcube langsync sync
norcube langsync sync --dry-run
norcube langsync sync -n ytracker-backend
norcube langsync sync --strategy server
norcube langsync sync --strategy interactive
norcube langsync sync --prune
norcube langsync sync --wait=false   # don't block on autotranslate
norcube langsync sync -o json   # one summary per namespace, for CI

Flags

FlagDefaultDescription
--configPath to .langsync.json (defaults to walking up from the cwd)
--dry-runSubmit a planning-only job (returns the diff without applying it)
-n, --namespaceSync only this namespace (repeat for multiple)
--poll-every1sHow often to poll the job's state
--pruneDelete server-side marks that aren't present in the local default-language file
--retranslate-on-source-changeRe-translate non-source values when a term's source-language value has changed (overwrites stale translations; preserves the source-of-truth-is-source-lang invariant)
--strategylocalConflict policy: local|server|interactive
--waittrueBlock until autotranslate has filled every gap (pass --wait=false to skip)
--wait-timeout5m0sClient-side timeout for the polling loop

Every command also takes the global flags: --profile, --org, -o, --query, --debug and more.

See also

  • norcube langsync: Manage LangSync namespaces, terms, languages and translations

On this page