Docs
CLI reference
Full headless parity with the web UI, from a shell. Every command group Localization OS ships: content and translation, workflows and quality, connectors and vendors, and the operator surfaces that run an install.
What the CLI is#
Localization OS ships a command-line interface alongside its web UI. Nearly everything you can do in the browser has a command here: create customers and projects, upload and translate documents, manage translation memory and glossaries, build and run workflows, mint API keys, and administer the install, all without a browser. It's built for CI, containers, and scripting. The CLI and the web UI share the same underlying services, so a project created from a script and one created by hand in the UI are indistinguishable. Every command and subcommand supports --help.
Installing and running it#
The CLI has no separate install step. It runs in-process against a working Localization OS checkout:
python -m app.cli <command> [args...]
Wrapper scripts at the repo root forward to the same entry point on Windows:
.\loc-tms.ps1 <command> [args...] # PowerShell
loc-tms.cmd <command> [args...] # cmd.exe
Optionally, pip install -e . from the repo root registers a real loc-tms console command, so you can drop the python -m prefix. This is purely a convenience: the CLI's runtime dependencies are the same ones the server and container image already install, so all three forms behave identically.
pip install -e . # once, in the project virtualenv
loc-tms health # -> the same in-process CLI
The examples on this page use loc-tms for brevity. Substitute python -m app.cli or a wrapper script as you prefer.
Authentication and identity#
A CLI command runs one of two ways.
In-process (the default)
The CLI acts as the local operator, at the same trust level as direct access to the underlying database. There's no login and no per-command role check: if the install can do it, this mode can do it. Commands are attributed to the acting operator for the audit trail. Commands that make an irreversible change (deleting a project, purging retained data, revoking every key a user holds) ask for confirmation unless you pass --yes, which is required in non-interactive, --json, or --quiet runs.
Before any command runs, the CLI loads the install's stored settings (default provider, per-provider model, keys) exactly as the web server does at boot, so a CLI translation run resolves the same engine a web-triggered one would. A provider key stored in the install takes precedence over the same key supplied only as an environment variable, on both surfaces.
Remote (--remote URL --token <your-api-key>)
A remote-capable command instead becomes a thin HTTP client of a running server's API, authenticated by a per-user API key. Authorization happens entirely server-side, scoped to the token's own organization: a remote call can never see or touch more than that person could see in the web UI, however privileged the local operator running the command happens to be. Behavior is otherwise transport-independent: the same intent, the same output shape, a human table or --json.
- An unreachable server exits 3.
- A rejected request (a permissions failure, a validation error) exits 1 with the server's own message.
- A remote
--jsonresponse can carry a few extra envelope fields, such as a server-resolved scope, that the in-process form doesn't emit; the underlying rows match. - Error wording differs slightly by transport, so branch on the exit code in scripts, never on the message text.
A command with no remote form refuses cleanly at exit 2 when you pass --remote, rather than silently running against the local host.
On a SaaS-style install with organization scoping turned on, an in-process command that would otherwise sweep across every organization needs an explicit scope: --org <id> confines it to one, and --operator authorizes an unscoped run, backed by a host-provided operator credential. Single-tenant installs never need either flag, and remote calls are always scoped by the token.
Remote capability at a glance#
Remote capability is decided per command, not per group: a subcommand is reachable over --remote exactly where a matching API route exists. This table is a starting map; the sections further down and each command's own --help confirm the exact leaf.
| Command group | Remote-capable? |
|---|---|
tm, langset, content-type, account, glossary, glossary module | Yes, every leaf, including module rename, delete, and term extraction. |
keys | Yes, except the delivery-hold trio (empties, deliver-approve, deliver-revoke), which are in-process only. |
doc | Yes, for most verbs; renaming and deleting a document stay in-process. |
memory, eval | Yes, except the authoring and draft-only verbs. |
style-guide | Yes, except ab, an in-process A/B evaluation harness (not an authoring verb). |
project | Mixed: create, list, show, and locale management (adding, removing, applying a Language Set) are remote; the lifecycle verbs (status, archive, unarchive) plus export and the TM-source/glossary-pinning families are in-process only. |
customer | Mostly in-process; create, list, and bulk pair import are remote. |
workflow | Mixed: run, resume, cancel, authoring, and the batch/group families are remote; a handful of management verbs (rename, delete, author-prompt) stay in-process. |
template, segprofile, routing | Yes. |
context | Mixed: viewing and setting are remote; deleting a context card and show-document are in-process only. |
image | Mixed: upload and translate are remote; the rest is in-process. |
connector | Mostly in-process; list, pull, push, and sync are remote. |
job | Yes, except backfill-embeddings, which is in-process only. |
report, export | Yes. |
apikey | Listing only. |
admin | In-process only, except one read-only routing-rule lookup. |
engine, providers, user, org, member, vendor | In-process operator only. |
tagging, prompt-tap | In-process only; both act on host-local state. |
db, health, audit verify, config, init | In-process only. |
ask, draft verbs | In-process only. |
Global flags#
Global flags precede the subcommand: loc-tms --json config get org_name.
| Flag | Meaning |
|---|---|
--json | Machine-readable JSON on stdout, one object per command. |
-q, --quiet | Suppress normal human output. |
-v, --verbose | Print extra detail. |
--actor EMAIL | Audit attribution (default cli). |
--remote URL | Route a remote-capable command to a live server's API. |
--token TOKEN | A per-user API key, required with --remote. |
--org ID | Scope a command to one organization (multi-tenant installs only). |
--operator | Authorize an unscoped, cross-organization run (multi-tenant installs only). |
Exit codes: 0 ok · 1 operation failure · 2 usage error · 3 remote unreachable.
Database, backup, and health#
Schema migrations, backup and restore, and integrity checks, for an install with no server running.
| Command | What it does |
|---|---|
db migrate | Bring the schema up to date. |
db init-schema | Create or upgrade the schema (create-if-missing, additive migrations). |
db backup <path> [--force] | Take a consistent database backup; refuses to overwrite an existing file without --force. |
db backup --full <archive.tar.gz> | Whole-install backup: one archive covering the database, uploaded files, and the encryption key material, with a manifest for verification. Restorable on a blank machine. |
db verify-backup <archive> | Verify a full-install archive's integrity without restoring it. |
db restore <path> [--yes] | Replace the current install from a backup. Destructive; a full archive is verified before any write and restored atomically. |
db encrypt / decrypt <src> <dst> | Write an encrypted or plaintext copy of the database file. |
db recover-jobs | Re-queue jobs interrupted by a restart. |
db verify | Read-only integrity check: schema, foreign keys, and migration state. |
health | Ping the database and report readiness, the CLI mirror of the health endpoint. |
audit verify | Verify the tamper-evident audit chain end to end. |
After a code update, run loc-tms db migrate before other commands on an existing database. The CLI's read commands deliberately don't auto-migrate, so against an older schema they stop with a clear hint instead of guessing.
loc-tms db migrate
loc-tms db backup --full backup-2026-08-31.tar.gz
loc-tms db verify-backup backup-2026-08-31.tar.gz
loc-tms health
Configuration#
Thin wrappers over the same settings store the web Settings UI writes, so there's one source of truth either way. It's also the way to reach settings that have a store but no dedicated form yet; config list is the authoritative inventory.
| Command | What it does |
|---|---|
config get <key> | Print one setting. Secret keys show (set) / (unset), never plaintext. |
config set <key> <value> | Set one setting, validated against known keys. |
config list [--group G] | List settings, grouped, secrets masked. |
config apply <file.toml> | Apply many settings from TOML atomically. --dry-run shows the diff without writing. |
config export-env | Print a .env scaffold of the install-time environment variables, secrets as placeholders. |
config features | List the toggleable features and their on/off state. |
loc-tms config get org_name
loc-tms config set org_name "Acme Inc."
loc-tms config apply settings.toml --dry-run
Enterprise features#
One door that turns optional enterprise capabilities on and off: OpenTelemetry tracing, Prometheus metrics, SAML 2.0 SSO, SCIM 2.0 provisioning, PII redaction, the durable job queue, and S3-compatible blob storage. It's the CLI twin of the web enterprise settings panel. Because flipping one of these changes a trust boundary, every verb runs host-only and refuses --remote. Each feature has a preflight check that runs against its proposed configuration before the switch flips, so a missing dependency or a bad endpoint is caught here rather than at the next restart. Every feature takes effect at boot, so restart the server after enabling one.
| Command | What it does |
|---|---|
enterprise status | Each feature's on/off state plus its offline preflight (no network calls). |
enterprise preflight <feature> | Run one feature's full preflight, including bounded live-network probes. |
enterprise enable <feature> [--force] | Enable a feature; the preflight runs first and refuses on failure unless --force. |
enterprise disable <feature> | Disable a feature. Never runs a preflight; configuration is preserved for re-enabling. |
Feature keys: otel, metrics, saml, scim, pii_ner, jobqueue, s3.
loc-tms config set otel_endpoint http://collector.example.com:4318/v1/traces
loc-tms enterprise preflight otel
loc-tms enterprise enable otel
loc-tms enterprise status
The LLM Ledger#
Control and read the LLM Ledger: an opt-in, read-only recorder of the exact request payload sent to a model on each completion call, so you can see what actually went out even when a local model's own logs truncate it. Off by default; nothing is written until you turn it on, and API keys are never recorded. It's a host-local surface with no remote arm.
| Command | What it does |
|---|---|
prompt-tap on / off | Turn request capture on or off. |
prompt-tap status | Report on/off and how much is stored. |
prompt-tap show [--tail N] | Print captured records, newest first. |
prompt-tap actions | List translation actions with their language-pair runs and spend. |
prompt-tap export [--out FILE] | Write captures out for analysis outside the tool. |
prompt-tap clear | Clear the legacy capture file (audited). |
loc-tms prompt-tap on
loc-tms prompt-tap export --provider local --tail 50 > local.jsonl
Bootstrap#
init brings the schema up and, only if no user exists yet, seeds the first admin and turns on the login wall. It's idempotent: on an already-seeded install it no-ops and says so, so it's safe to run on every boot.
python -m app.cli init --admin-email admin@example.com --admin-password 'a-strong-passphrase' --issue-key
# or from the environment, for containers and CI
LOC_TMS_ADMIN_EMAIL=admin@example.com LOC_TMS_ADMIN_PASSWORD='a-strong-passphrase' \
python -m app.cli init --from-env
--issue-key mints a per-user API key and prints it once, so store it immediately; it can't be recovered afterward.
A password passed as a flag argument is visible in shell history and process listings; prefer the --from-env form for containers and CI.
Ask and draft#
Ask answers plain-language questions about a module, grounded only in that module's own shipped guide, the same text the in-app help pages render, so an answer and a help page can never disagree. Draft turns plain-language intent into a pre-filled form you confirm: it writes nothing on its own, printing the drafted values plus the exact existing command that would apply them.
| Command | What it does |
|---|---|
ask [<module>] "<question>" | Answer a question about a module. Naming one grounds the answer on that guide plus everything it links to; omitting it grounds on a general overview. |
memory draft "<intent>" --customer ID [--apply --yes] | Draft one or more memory notes from an instruction. |
eval draft "<intent>" [--customer ID] [--apply --yes] | Draft an evaluation run plan from a question. |
Neither verb writes or launches anything without an explicit --apply --yes; without --apply each just prints what it would do. Both run on a configured assist engine and are billed like any other model call when that engine is a paid one.
loc-tms ask memories "how do I stop it translating our product name?"
loc-tms memory draft "we never translate Acme Cloud" --customer 1 --apply --yes
loc-tms eval draft "is the new model better on my support articles?" --customer 1
Customers and projects#
Customers and projects are the top of the content hierarchy: a project belongs to a customer, holds one or more target locales, and is where documents, translation memory, and glossaries attach.
Customers
| Command | What it does |
|---|---|
customer create <name> | Create a customer. |
customer list [--archived | --all] | List customers. |
customer pairs import <id> <csv> | Bulk-import a customer's active language pairs from a CSV. |
Everything else in the customer group (show, update, pairs add / remove, archive, set-default, and similar) is in-process only.
Projects
| Command | What it does |
|---|---|
project create <name> [--source LOC] [--targets "fr-FR,de-DE"] [--customer-id N] | Create a project and its target locales. |
project list [--status S] [--archived active|all|only] | List projects. |
project show <id> | Full detail: locales, documents, translation memory and glossary counts. |
project leverage <id> | A word-based translation-memory leverage breakdown, the basis for vendor cost estimates. |
project author "<description>" [--create] | Draft a whole project from a plain-language description; prints the draft unless --create. |
project add-locale / archive / unarchive / apply-langset | Manage a project's target locales and lifecycle. |
project export <id> [--locales …] [--zip] | Build the project's delivery bundle. |
project status <id> <status> | Move a project through its lifecycle. Status tokens: draft, pre_translating, in_translation, in_review, completed, closed, cancelled. |
project tm-sources add / remove / list <id> | Attach another project's translation memory as a matching source, without copying any rows. |
project glossaries add / remove / list <id> | Pin an existing module glossary to a project. |
A project export can degrade in two ways, both reported rather than silent: a document whose inline formatting can't be verified is excluded from the bundle and listed by name; a document that ships but had a damaged unit replaced with its source text is delivered but flagged, on stderr and in --json.
Project templates
| Command | What it does |
|---|---|
template create --from-project <id> --name N | Snapshot a project's setup as a reusable template. |
template list / show <id> | List or inspect templates. |
template apply <id> --name N | Create a new project from a template. |
template rename / delete <id> | Rename or delete a template (the snapshot only). |
loc-tms customer create "Acme Corp"
loc-tms project create "Handbook" --source en-US --targets "fr-FR,de-DE" --customer-id 1
loc-tms project leverage 1
Documents#
Upload, translate, and export the files inside a project. The CLI shares the same translation, quality, and export services the web editor uses, so a document translated headlessly carries the same checks (tag integrity, glossary and do-not-translate enforcement, placeholder and number checks) as one translated by hand.
| Command | What it does |
|---|---|
doc upload <project_id> <file> | Ingest a file (DOCX, TXT, HTML, Markdown, and more) into a project. |
doc list <project_id> | List a project's documents. |
doc show <doc_id> [--locale LOC] [--detail] | Per-locale segment counts, or with --detail, the review state of every segment. |
doc translate <doc_id> --locale LOC | Machine-translate synchronously. A one-shot CLI process has no background workers, so the command doesn't return until translation is really done. |
doc export <doc_id> --locale LOC [-o PATH] | Rebuild the format-preserving translated file. |
doc apply-tm <doc_id> <locale> | Fill every segment with a 100% translation-memory match. |
doc unlock-segment <segment_id> | Clear a translation-memory lock on one segment, so later steps can re-translate it. |
doc approve-segment <segment_id> | Approve a reviewed segment and save its source/target pair to translation memory. |
A workflow that fills a segment from translation memory before any model call can leave some targets empty on purpose, held back from delivery until a person signs off. doc empties, doc deliver-approve, and doc deliver-revoke list and clear that hold.
loc-tms doc upload 1 ./handbook.docx
loc-tms -v doc translate 1 --locale fr-FR
loc-tms doc export 1 --locale fr-FR -o handbook.fr-FR.docx
The same commands work against a running server with --remote. doc translate enqueues one job per locale; poll it with job status --remote:
loc-tms --remote https://tms.example.com --token <your-api-key> doc upload 1 ./handbook.docx
loc-tms --remote https://tms.example.com --token <your-api-key> doc translate 5 --locale fr-FR
loc-tms --remote https://tms.example.com --token <your-api-key> job status 9
Translation memory and glossaries#
Per-project translation memory and glossaries, plus customer-owned "module" glossaries that can be pinned across projects and carry their own approval lifecycle.
Translation memory
| Command | What it does |
|---|---|
tm import <project_id> <file.tmx> --source LOC --target LOC | Import a TMX file into the project's translation memory. |
tm export <project_id> <file.tmx> --source LOC --target LOC | Export the project's translation memory to TMX. |
Glossaries
| Command | What it does |
|---|---|
glossary import <project_id> <file.csv|file.tbx> --source LOC --target LOC | Import a per-project glossary from CSV or TBX. |
glossary add <project_id> <source_term> | Add or update one term. |
glossary list <project_id> | List a project's entries. |
glossary export <project_id> <out.csv|out.tbx> | Export a project's glossary. |
Module glossaries
| Command | What it does |
|---|---|
glossary module create <name> --customer ID | Create a draft glossary owned by a customer. |
glossary module list / show / rename / delete | Manage glossaries. |
glossary module approve / unapprove | Approve a glossary for use in workflow steps, or revert it to draft. |
glossary module add-term / edit-term | Add or edit one term, including do-not-translate and metadata fields. |
glossary module import / export | Round-trip a glossary as CSV or TBX. |
glossary module extract <id> <document_id> | Propose candidate terms from a document for review; nothing is added automatically. |
glossary module candidates list / accept / drop | Review the candidate-term queue. |
loc-tms tm import 1 corpus.tmx --source en-US --target fr-FR
loc-tms glossary module create "Brand terms" --customer 1
loc-tms glossary module add-term 3 "Acme Cloud" --target-term "Acme Cloud" --dnt
loc-tms glossary module approve 3
Style guides and language sets#
A style guide is a long-form, approvable block of guidance injected into translation prompts for a customer, content type, or language pair. A Language Set is a reusable named list of target locales, so a project can be created against "our core markets" instead of typing the list out each time.
Style guides
| Command | What it does |
|---|---|
style-guide create <name> [--customer ID] [--body-file PATH] | Create a draft guide. Omit --customer for an organization-wide guide. |
style-guide list / show <id> | List or inspect guides in scope. |
style-guide update <id> | Update a guide. Body and scope edits revert it to draft. |
style-guide set-status <id> draft|approved | Approve a guide, making it eligible for injection, or revert it to draft. |
style-guide ab --document ID | Measure whether the resolved style guide actually improves quality, on vs. off, on the same segments. On a keyless install this degrades to a structural smoke test, not a real quality signal, and says so plainly in its output. |
Language sets
| Command | What it does |
|---|---|
langset create <name> [--source LOC] [--targets "…"] | Create a Language Set. |
langset list | List sets. |
langset update <id> | Update a set; --targets replaces the locale list. |
langset delete <id> [--yes] | Delete a set. |
loc-tms style-guide create "Acme voice" --customer 1 --body-file voice.md
loc-tms style-guide set-status 1 approved
loc-tms langset create "Core markets" --source en-US --targets "fr-FR,de-DE,es-ES,ja-JP"
Workflows and jobs#
A workflow is an ordered pipeline of steps, translate, quality review, human review, translation-memory match, or dispatch to an external vendor, run over a document and locale. Runs execute synchronously in the CLI process, since a one-shot command has no background worker to hand off to: when a run command returns, its database state is final.
Jobs
| Command | What it does |
|---|---|
job run <kind> [--payload K=V …] | Run a job kind synchronously and block until it finishes. |
job status <id> | Show one job's status, progress, and result. |
job list [--kind K] [--status S] | List recent jobs, filterable by kind, status, document, or workflow. |
Workflows
| Command | What it does |
|---|---|
workflow create --name N [--scope global|customer|project] | Create a workflow. |
workflow list / show <wf> | List workflows, or show one and its ordered steps. |
workflow archive / unarchive <wf> | Retire or reactivate a workflow without losing its history. |
workflow add-step <wf> --type TYPE [options] | Append a step. Types: llm_agent (a model call), lqa (automated quality scoring against a configurable pass threshold), human_review (a pause for a person), tm_match (fills and locks 100% translation-memory matches, no model call), external (dispatches to a linked vendor). Each type accepts only the options relevant to it. |
workflow edit-step / delete-step / move-step | Change, remove, or reorder a step. Editing re-validates the whole graph; deleting or moving is refused while the workflow has a run in flight, or when it would break a branch or condition elsewhere in the graph. |
workflow clone <wf> | Deep-copy a workflow and all its steps. |
workflow author "<description>" [--create] | Draft a whole workflow from a plain-language description. --create applies it through the same path the web confirm screen uses. |
workflow run <doc-id> <wf-id> [locale] | Run synchronously. A single locale pauses at a human-review step and prints the resume command; --all-locales fans out across every target locale as one batch. |
workflow show-run <run-id> [--visits] [--findings] | Show a run's status, and for a paused human-review run, the text split into safe-to-edit segment boundaries. |
workflow resume <run-id> --edited-text TEXT | Resume a paused run with the reviewed text. |
workflow cancel-run <run-id> | Abort an in-flight run. Terminal, not resumable. |
Batches and multilingual groups
| Command | What it does |
|---|---|
workflow batch show <batch-id> / retry-failed <batch-id> | Monitor and re-drive a multi-locale batch launched with --all-locales. |
workflow batch rerun <batch-id> --locale L | Re-run one locale of a batch as a fresh member run into the same batch. |
workflow group create / list / show / add / set-default | Tie a base workflow to per-language-pair variants, resolved automatically by a run's target locale. |
workflow copy <wf> --to-pairs SRC:TGT[,…] | Copy a workflow onto other language pairs inside a group. |
loc-tms workflow create --name "EN to FR review" --scope global
loc-tms workflow add-step 1 --type llm_agent --name Translator --prompt 'Translate: {text}'
loc-tms workflow add-step 1 --type human_review --name "In-country review"
loc-tms workflow run 42 1 fr-FR
loc-tms workflow show-run 5
loc-tms workflow resume 5 --edited-text "reviewed text" --locale fr-FR
Memory#
Typed, scoped memories learned from workflow events (reviewer corrections, quality findings) or written by hand, then recalled selectively into later translate prompts. Every memory belongs to exactly one customer; there's no such thing as a customer-less or cross-customer memory.
| Command | What it does |
|---|---|
memory list / show / events | Browse memories and the evidence behind them. |
memory add-note --customer ID --kind K | Create a manual memory; activates immediately. |
memory invalidate <id> / invalidate-since --since TS | Revoke one memory, or roll back everything created since a point in time. |
memory purge <id> | Hard-erase a memory's content, keeping an audit tombstone. Destructive. |
memory distill [--customer ID] | Run the deterministic pass that turns captured evidence into new or updated memories. Idempotent. |
memory janitor [--dry-run] | Age out unused or stale memories on a lifecycle sweep; never deletes. |
memory export | Export memories as JSONL or CSV. |
A related, opt-in queue, memory suggestions …, drafts proposed changes to a workflow's configuration from the same evidence, each one reviewed and approved by hand. Applying a suggestion is always a separate, explicit step that never happens automatically.
loc-tms memory add-note --customer 1 --kind project_note --body "Always spell out acronyms on first use."
loc-tms memory distill --customer 1
loc-tms memory export --customer 1 --format jsonl > memories.jsonl
Evaluations#
A quality sandbox: build a dataset, define candidates (a workflow, or an inline configuration), run them through selectable scorers, compare with statistical honesty, and promote a winner into production. It never touches production data; pulling a dataset from a live document is a one-directional snapshot.
| Command | What it does |
|---|---|
eval dataset list / create / import-doc / show | Build and browse datasets, from pasted text or a snapshot of a live document. |
eval candidate list / create | Define a config-under-test: a workflow, or an inline setup. |
eval run start --dataset ID --candidate ID [--budget USD] [--yes] | Launch a run across dataset × candidates × scorers. |
eval run show <run_id> | Show one run's status, realized cost, and scored-value count. |
eval run compare --dataset ID --baseline ID --candidate ID | The comparison view: per-candidate verdict against the baseline. |
eval export … | Export the comparison report to JSONL or CSV. |
eval promote --candidate ID --dataset ID [--yes] | Promote a candidate into a production workflow. |
A run uses each candidate's own configured engine, real and billed by default, not a mock. The only ceiling is the per-run --budget you pass; there's no separate, always-on spend cap for evaluation runs. Launching a run prints a pre-run cost estimate first and refuses without --yes. Promoting a candidate the statistics don't support needs an extra acknowledgement flag on top of --yes.
loc-tms eval dataset create --name "Support replies" --text $'Hello world\nGood morning\tGuten Morgen' --target de-DE
loc-tms eval run start --dataset 1 --candidate 2 --candidate 3 --budget 5.00 --yes
loc-tms eval run compare --dataset 1 --baseline 2 --candidate 3
Connectors#
Two-way integrations with external content systems, among them Airtable, Jira, Strapi, Contentful, Shopify, HubSpot, WordPress, and Akeneo: pull source content in, translate it, and push it back. Credential and configuration management stays in-process; day-to-day operation is also reachable remotely.
| Command | What it does |
|---|---|
connector create --kind K --name N | Create a connection. Secrets are encrypted at rest and never echoed back. |
connector list / show / update / delete | Manage connections. |
connector rotate <id> --secret K=V | Replace credentials, only after proving the new ones work. |
connector test <id> / browse <id> | Test credentials, or list the containers (bases, projects, spaces) a connection can see. |
connector schedule <id> --every-minutes N | Automate the sync on an interval, or --off to stop it. |
connector pull / push / sync <id> | Pull source content in, push translations back, or do both plus translation in one pass. |
connector retry <id> --from-json FILE | Re-run only the items that failed in a prior run. |
connector <platform>-translate <id> | A per-platform translate verb, mapped onto that platform's own content model. |
OAuth connectors still need one interactive browser-consent step in the web UI; everything else, including a token-authenticated connector end to end, is fully CLI-managed.
loc-tms connector create --kind airtable --name "Marketing" \
--config base_id=appX --config table=Content --secret api_key
loc-tms connector test 1
loc-tms connector sync 1
loc-tms connector schedule 1 --every-minutes 60
Vendors#
First-class external translation or review vendors: a name, a connection, a per-word-band rate card, and the customers it's linked to. A workflow's external step dispatches its packaged text to a linked vendor, and the run parks until the vendor returns it. Vendor management is host-local; every verb runs in-process only.
| Command | What it does |
|---|---|
vendor add <name> | Create a vendor. |
vendor list / show / update | Manage vendors. |
vendor set-secret <id> --secret K | Set or rotate a credential; never echoed. |
vendor link-customer / unlink-customer | Grant or remove a customer's access to a vendor. |
vendor rate-card set / show | Set or view the per-band cost-per-word rate card. |
vendor dispatches / dispatch-show | List and inspect work that's currently out with a vendor. |
vendor return --file PATH | Manually admit a vendor's returned work, as JSON or XLIFF. |
vendor poll | Poll a vendor for returns that are ready. |
vendor quote / approve-quote / decline-quote | Record, approve, or decline a vendor's price quote before work proceeds. |
vendor reject --dispatch-id ID | Reject a delivered return and dispatch a rework to the same vendor. |
Every returned segment goes through the same quality gates as a machine translation: a refusal or a locked segment withholds the text for review; a softer issue, such as a glossary miss, stores the text and flags it.
loc-tms vendor add "Acme Linguistic Services"
loc-tms vendor set-secret 1 --secret signing_secret
loc-tms vendor link-customer 1 3
loc-tms vendor rate-card set 1 --band fuzzy_high --rate 0.06
Images and key-based projects#
Images (Beta)
Localize text inside an image: upload it, review the detected text regions (each becomes an ordinary segment, so translation memory, glossary, and workflows all apply), translate, re-render, and export.
| Command | What it does |
|---|---|
image upload <project_id> <file> | Upload an image; detects text regions. |
image show <doc_id> [--locale LOC] | Show regions, translations, and confidence. |
image translate <doc_id> --locale LOC | Translate an image's regions. |
image render <doc_id> --locale LOC [-o PATH] | Re-render the localized image and report per-region fit. Writes nothing unless -o is given. |
image export <doc_id> --locale LOC -o PATH | Export the localized image file. |
loc-tms image upload 3 ./banner.png
loc-tms image translate 12 --locale es-ES
loc-tms image export 12 --locale es-ES -o banner.es-ES.png
Key-based projects
The continuous-localization project type, where the unit of work is a string key rather than an uploaded file and the deliverable is one key/value file per locale, for syncing an app's own localization catalogue. Fully remote-capable, with its own dedicated API-key scope.
| Command | What it does |
|---|---|
keys add --project ID --name NAME | Create a string key, optionally with its source text. |
keys list --project ID | List keys with their per-locale values and filters. |
keys set --project ID --name NAME --locale LOC --text T | Set one locale's value. |
keys delete / restore | Soft-delete a key (kept, reversible), or undo that. |
keys import / export | Bulk import or export a JSON or gettext catalogue. |
keys changes --project ID --since N | A change feed: everything added, edited, or deleted since a cursor, for a CI sync loop. |
keys translate --project ID --workflow ID --locale LOC | Launch translation over a key project's strings. |
keys image add / list / rm / set-primary | Attach in-context images to a key so a vision-capable engine sees them when translating it. |
loc-tms keys import --project 7 --file ./en/common.json
loc-tms keys set --project 7 --namespace common --name error::generic --locale de-DE --text "Etwas ist schiefgelaufen."
loc-tms keys export --project 7 --locale de-DE --namespace common -o de/common.json
loc-tms keys changes --project 7 --cursor-file
Users, API keys, and access#
Accounts, per-user API keys, and project membership, in-process only aside from listing keys. The role and lifecycle logic here is the same one the admin Users page calls.
Users
| Command | What it does |
|---|---|
user create --email E --role R | Create a user. A blank password means no local login, single sign-on only. |
user list / show <user> | List or inspect users. |
user role / department <user> | Set a user's role or department. |
user enable / disable <user> | Activate or deactivate a user. Refuses to disable the last active administrator. |
user reset-password <user> | Set a new password without knowing the current one. |
user invite --email E --role R | Create an invite. |
user export / erase <user> | A subject-access export, or erasure: anonymize, revoke keys, keep the audit trail. Erasure is destructive and irreversible. |
API keys and membership
| Command | What it does |
|---|---|
apikey issue --user U | Mint a per-user key, printed once, unrecoverable afterward. |
apikey list [--user U] | List issued keys as metadata only, never the value. Remote-capable. |
apikey revoke <key-id> / revoke-all <user> | Revoke one key, or every key a user holds. |
member add / remove / list <project_id> | Grant, revoke, or list a project's membership. |
Account
account show, set-skin, and reset-onboarding manage a user's own preferences. Over --remote the command always acts on the token's own account; in-process it needs an explicit --user, since there's no session to infer one from.
A password passed as a flag argument is visible in shell history and process listings; omit --password to be prompted for it securely instead.
loc-tms user create --email jo@example.com --role translator --password 's3cret-passphrase'
loc-tms apikey issue --user jo@example.com --scopes docs
loc-tms member add jo@example.com 7
Engines, providers, and translation setup#
How a translation call resolves to a model: registered engine profiles, the built-in cloud provider keys, segmentation, and the context and content-type scaffolding around a prompt.
Engine profiles
| Command | What it does |
|---|---|
engine list / show <engine_id> | List or inspect saved provider presets. |
engine create --name N --kind K | Register a profile: local, an OpenAI-compatible endpoint, DeepL, Google, Microsoft, Cohere, Lara (experimental), or Amazon. A credential goes on --secret as KEY=VALUE, e.g. --secret api_key=YOUR_KEY; unlike connector and vendor, this group doesn't offer the bare-name prompt form. |
engine update <engine_id> | Change a profile; fields are left unchanged when omitted. |
engine test <engine_id> | A live round-trip against the profile's endpoint. |
engine delete <engine_id> | Delete a profile. |
Reference a profile anywhere a provider is expected as engine:<id>.
Cloud provider keys
| Command | What it does |
|---|---|
providers key show | One row per built-in provider: source (app-stored, environment, or none) and a fingerprint. |
providers key set <claude|gemini|openai> | Store a key, taking effect immediately. |
providers key clear <provider> | Remove the app-stored key. If an environment-variable key is also present for that provider, it takes over. The provider goes offline only when neither is set. |
providers models --provider REF | Fetch the model pick-list from the provider itself. |
Only a four-character fingerprint is ever printed, never the key itself.
Segmentation, context, and content types
| Command | What it does |
|---|---|
segprofile list / show / create / assign | Manage sentence-segmentation profiles and which project uses which. |
context show [--project ID] | Show the resolved context package for a scope: domain, audience, formality, tone, notes, character limit. |
context set-profile / set-document | Create or update a context card, scoped by customer, content type, project, or one document. |
context ab --document ID | Measure whether the context package is actually helping. On a keyless install this degrades to a structural smoke test, not a real quality signal, and says so plainly in its output. |
content-type list / create / rename / delete | Manage the content-type labels that glossaries, style guides, and context cards scope on. |
loc-tms engine create --name "DeepL prod" --kind deepl --secret api_key=YOUR_KEY --config formality=more
loc-tms providers key set claude
loc-tms providers models --provider claude
loc-tms context set-profile --customer 1 --content-type 2 --tone "friendly,concise" --formality informal
Reports and data export#
Reports
Cost, token, volume, quality, and post-edit reporting over finished work, as a table, JSON, or CSV. Cost figures and named-person breakdowns require a manager-level key over --remote.
| Command | What it does |
|---|---|
report run <kind> [--from DATE] [--to DATE] [--group-by GB] [-o CSV] | Run a report. Kinds: cost, tokens, volume, qa, postedit. |
report kinds | List the report kinds and the columns each renders. |
loc-tms report run cost --from 2026-07-01 --to 2026-07-31 --group-by provider -o july-cost.csv
loc-tms report run qa --group-by dimension
loc-tms report kinds
Data export
A self-describing dump of everything visible to the caller, or a narrower scope: one archive of per-entity data plus a manifest. Reads are confined to the caller's own visibility; a customer-bound key can only export its own customer.
| Command | What it does |
|---|---|
export run [--scope self|customer|project|workspace] | Run one export. |
export list / status <run> | List past runs, or inspect one. |
export download <run_uuid> -o FILE | Download a completed export archive. |
loc-tms export run --scope customer --ref 7 --history full
loc-tms export status 3
loc-tms export download <run_uuid> -o dump.zip
Databricks export
Ships the install's analytical exhaust, post-edit pairs, spend, quality findings, translation-memory growth, to a customer's own Databricks lakehouse. Runs are manual, read-only against every source table, and strictly additive. Off by default; enabling it means content and translations leave the install for your own warehouse.
| Command | What it does |
|---|---|
databricks setup | One-time: create the destination volume and tables. |
databricks export [--stage-only] | Run one export batch; --stage-only stages locally with zero connectivity. |
databricks exports / status <run-id> | List past runs, or inspect one. |
loc-tms databricks setup
loc-tms databricks export --stage-only
loc-tms databricks exports
Collaboration#
Queries
Threaded questions and comments on a segment, key, document, or project.
| Command | What it does |
|---|---|
query open --segment N --body B | Open a thread with a first post. |
query list / show <id> | List or inspect threads. |
query reply / answer <id> --body B | Post a reply, optionally marking the thread answered. |
query close <id> [--reopen] | Close a thread, or reopen a closed one. |
query assign <id> [--assignee E] | Set or clear the assignee. |
My work and reviewer findings
work list is a reviewer's cross-project worklist: paused review steps that name them, queries assigned to or answered for them, and documents needing quality attention. lqa … logs reviewer-authored quality findings on a segment, separate from the automated score: they feed reports but never change a machine score or a workflow gate.
| Command | What it does |
|---|---|
--actor E work list | The cross-project worklist. --actor is a global flag, so it precedes the subcommand; in-process it's required (there's no session to infer an identity from). Over --remote the token's own identity is used instead. |
lqa log --document N --segment M --dimension D --severity S --note T | Log one reviewer finding. |
lqa findings --document N | List a document's reviewer findings. |
lqa edit / withdraw <fid> | Edit a finding, or soft-withdraw it (kept, never deleted). |
loc-tms --actor me@example.com query open --segment 42 --subject "tone?" --body "Is this too formal?"
loc-tms --actor me@example.com work list
loc-tms lqa log --document 5 --segment 42 --dimension Accuracy --severity major --note "mistranslation"
Content routing#
Rules that route an inbound submission, by file extension and department, to a specific project and/or provider. A rule is consulted on exactly two paths: the REST API's document-upload call (with no project named) and its translate call. Uploading through the web UI, or through the in-process CLI's own doc upload, doesn't consult routing rules at all. A rule never overrides an explicit project choice.
| Command | What it does |
|---|---|
routing rule add [--ext E] [--department D] [--priority N] | Create a rule. |
routing rule list / show <rule-id> | List rules in priority order, or inspect one. |
routing rule toggle <rule-id> | Flip a rule active or inactive. |
routing rule delete <rule-id> | Delete a rule. |
loc-tms routing rule add --ext srt,vtt --priority 10 --project 3
loc-tms routing rule list
Admin#
Operator surfaces for capabilities outside the everyday content flow: semantic translation-memory matching, custom segmentation rules, data retention, directory identity (LDAP, OIDC), the audit trail, GDPR requests, budgets, and quality rulebooks. Every subcommand is host-only, except one read-only routing-rule lookup.
| Command | What it does |
|---|---|
admin semantic enable / disable / backfill | Turn on embedding-based fuzzy matching and backfill vectors for existing entries. |
admin srx enable / disable / validate / upload | Manage a custom sentence-segmentation ruleset. |
admin retention config / status / purge-now | Configure and run a data-retention sweep. Purging is destructive and echoes exactly what it will remove before confirming. |
admin tick | Run one scheduler pass now, the external-cron entry point for a headless deployment. |
admin ldap config / status / test-login | Configure LDAP and smoke-test a login. Secrets are stored encrypted and never echoed. |
admin oidc config / status | Configure OIDC single sign-on. |
admin audit export / verify | Export the audit chain as newline-delimited JSON, or verify it end to end. |
admin gdpr export / erase <user> | Subject-access export, or anonymize a user. |
admin routing rule … | The admin-console twin of the content-routing rules above. |
admin budget set / list / project set | Department monthly token caps and per-project spend caps. |
admin lqa rulebook get <src> <tgt> / set <src> <tgt> <file> | Read or install a language-pair quality rulebook. |
loc-tms admin semantic enable
loc-tms admin retention config --enabled on --days 90
loc-tms admin retention purge-now --yes
loc-tms admin audit export --since 2026-01-01 -o audit.ndjson
loc-tms admin audit verify
Tag integrity and quality guardrails#
Document filters replace inline formatting (bold, links, placeholders) with tokens so a translation can carry them through intact. A handful of always-on, model-free guards protect that token stream and the glossary, independent of whatever engine is doing the translating. AI-assisted tag repair is present but not enabled in this release.
| Command | What it does |
|---|---|
tagging verify [--apply] | Scan stored translations for broken formatting tokens: dropped, reordered, or duplicated. Dry-run by default; --apply flags damaged segments for review. |
Two further guards run inside the quality-review correction loop: a fixer's output is checked against the glossary before it's accepted, and a translation-memory match is protected from being silently overwritten by a later automated fix.
loc-tms tagging verify --project 3
loc-tms tagging verify --doc 12 --apply
Organizations, SCIM, and MCP#
Organizations
On a multi-tenant install, organization management (create, rename, suspend, delete) is inherently cross-tenant, so it's in-process only, and once organization scoping is turned on, it requires the operator flag described earlier on this page.
| Command | What it does |
|---|---|
org create --name N | Create an organization. |
org list / show <org_id> | List or inspect organizations. |
org rename <org_id> --name N | Rename an organization. |
org suspend / unsuspend <org_id> | Lock out or reinstate a tenant. |
org delete <org_id> | Delete an empty organization. Refuses on any organization still holding users, projects, or other data. |
SCIM provisioning
A read-only view of SCIM 2.0 directory provisioning. Provisioning itself is identity-provider-push by design: your provider creates, updates, and deactivates accounts directly; these commands only report what it's done.
| Command | What it does |
|---|---|
scim status | The provisioning switch, account and group counts, and last sync activity. |
scim users / groups | List SCIM-managed accounts and directory groups. |
The MCP connection helper
Localization OS also runs an MCP server, a sibling surface built for AI agents rather than a shell. This command prints the connection snippet for a running server, matching what the in-app help page would show a browser user.
loc-tms --operator org create --name 'Acme Inc.'
loc-tms scim status
loc-tms mcp connect --base-url https://tms.example.com