CLI

CLI

Manage LangSync from the terminal with norcube / nrc — namespaces, marks, languages, and the command reference.

Not verified yet

The Norcube CLI (norcube, or its short alias nrc) covers all of LangSync from the terminal. It has two layers:

  • Resource commandsnamespace, mark, lang — direct management of namespaces, terms, and languages. Covered on this page.
  • Project syncinit, sync, pull — pin a Git repository to one or more namespaces and reconcile local JSON translation files against the server. Covered in Project sync.

Every command supports --org <slug> to override the organization and --output table|json|yaml for scripting-friendly output. Commands that would prompt interactively (pickers, confirmations) accept flags instead, so everything works in CI — destructive commands require --yes when there's no TTY to confirm on.

Setup

nrc login                 # OAuth login in your browser
nrc org use <slug>        # set the active organization
nrc langsync namespace list   # sanity check

Authentication uses your user session (tokens are stored in the OS keyring and refreshed automatically) — the CLI does not use API keys; those are for the read-only Public API. If commands start failing with authentication errors, re-run nrc login.

Namespaces

# list namespaces in the active org
nrc langsync namespace list

# create (name + default language required non-interactively)
nrc langsync namespace create web --default-language en
nrc langsync namespace create marketing --default-language cs --context "Marketing site copy"

# partial update: only pass what you want to change
nrc langsync namespace update web --rename web-app
nrc langsync namespace update web --context "New description"
nrc langsync namespace update web --default-language de

# delete — permanent, removes every mark and translation in it
nrc langsync namespace delete web        # prompts; --yes to skip

namespace also answers to namespaces and ns. The list output shows name, default language, attached languages, context, and ID.

Marks (terms)

The CLI calls terms marks, matching the dashboard's dialogs. Where --namespace/-n is omitted in a terminal, a picker opens; in scripts, pass it explicitly.

# add a mark, optionally with its source value and AI translation
nrc langsync mark add -n web "Save changes"
nrc langsync mark add -n web "Email" --context "form label" --default-value "E-mail"
nrc langsync mark add -n web "Welcome" --default-value "Welcome" --auto-translate

# list marks, with the same filters the dashboard has
nrc langsync mark list -n web
nrc langsync mark list -n web --search Save
nrc langsync mark list -n web --has-untranslated
nrc langsync mark list -n web --untranslated-lang 17    # missing a specific language (by ID)

# pagination for big namespaces
nrc langsync mark list -n web --limit 100 --cursor <cursor>
nrc langsync mark list -n web --all-pages --max-items 5000

# delete by term ID (shown in list output) — permanent
nrc langsync mark delete 1234 -n web --yes

--auto-translate asks the backend to AI-translate the new mark into every other language attached to the namespace — the same engine as auto-translate in the dashboard.

Languages

# list every language available to the org (KIND: shared | custom)
nrc langsync lang list
# or only what's attached to one namespace
nrc langsync lang list -n web

# attach / detach a language on a namespace (code or numeric ID)
nrc langsync lang add de -n web
nrc langsync lang remove de -n web --yes   # deletes that language's translations in the namespace

# org-scoped custom languages
nrc langsync lang create internal-en "Internal English"
nrc langsync lang delete <id> --yes        # refused while still attached anywhere

Detaching a language deletes its translations in that namespace (the marks themselves are untouched) — same behaviour as removal in the dashboard.

Organization resolution

Which organization a command hits is resolved in this order:

  1. --org <slug> — explicit override, always wins.
  2. The organization pinned in the project's .langsync.json, when you're inside a project tree.
  3. The CLI's active org (nrc org use).

The project-pin (2) is what makes multi-org development safe: inside a client's repo, langsync commands hit that client's org no matter what your global active org is.

Errors you'll actually see

MessageFix
"no active organization — run norcube org use <slug> or pass --org <slug>"Set an active org or pass --org.
"namespace 'X' is not accessible to the active organization"Check the org (nrc whoami), the namespace's existence, and the exact case-sensitive spelling.
"no .langsync.json found in … — run norcube langsync init"You're running sync/pull outside an initialised project.
"config version N is newer than this CLI supports"norcube upgrade.
  • Project syncinit, sync, pull, and the .langsync.json reference.
  • Sync jobs — what the server does with a sync.

On this page