Skip to content

CLI commands

RimLoc CLI is the deterministic/headless surface of the same Rust toolchain used by the desktop app.

PO is optional

PO is an interchange format. It is not the canonical RimLoc project model. The desktop workflow edits project state directly, and the CLI can also build from an existing RimWorld Languages tree.

Typical uses

Inspect and validate

rimloc-cli scan --root ./Mods/MyMod --format json
rimloc-cli validate --root ./Mods/MyMod

External CAT / PO handoff

rimloc-cli export-po --root ./Mods/MyMod --out-po ./work/MyMod.po --lang ru
rimloc-cli validate-po --po ./work/MyMod.po --strict
rimloc-cli import-po --po ./work/MyMod.po --mod-root ./work/MyMod-copy --lang ru --dry-run

Build without PO

rimloc-cli build-mod \
  --from-root ./work/MyTranslatedMod \
  --out-mod ./dist/MyTranslatedMod-RU \
  --lang ru \
  --dry-run

This packages an existing translated Languages tree directly.

Command families

The CLI currently contains more commands than the public nav historically documented. The most common ones are:

Command Purpose
scan discover translation units
validate validate RimWorld XML/translation state
validate-po validate a PO handoff
export-po / import-po optional PO interoperability
build-mod build a translation-only mod from PO or Languages tree
diff-xml compare source/translation and source changes
annotate source-text comments
xml-health XML health checks
morph morphology providers
init create translation skeleton
lang-update language-update workflow

Additional developer/advanced commands exist in the binary (for example compare/doctor/schema/translate/wordinfo/version-diff/learning helpers). Their dedicated pages are being filled in during the documentation refresh; use rimloc-cli --help and rimloc-cli <command> --help as the current executable truth.

Global options

Common options include:

  • --ui-lang <LANG> — CLI message locale;
  • --no-color — plain output;
  • --quiet — reduce non-essential stdout for scripting.

Safety

Not every historical CLI command was designed around the newer canonical project model. Before using a write command on valuable data:

  • use a copy or isolated output directory;
  • use --dry-run when supported;
  • keep original Workshop/game directories read-only;
  • review the command-specific help.

See also