Use the Community CLI
Inspect locale files, dry-run a translation, and validate reviewed strings in your local Git repository.
Run the commands below from the Community checkout after npm ci. Replace /path/to/repo with your checkout and fr with a configured target locale. See Install Community if you have not cloned it yet.
Initialize and inspect a project
If a project does not already have transglot.community.json, initialize it with a file pattern. This writes settings without modifying any locale files.
node bin/transglot-local.mjs init --project /path/to/repo \
--source en --locales fr,de --pattern 'locales/{locale}/**/*.json'
node bin/transglot-local.mjs status --project /path/to/repoPreview work without model requests
node bin/transglot-local.mjs translate --project /path/to/repo --locale fr --dry-runThe preview lists what would be translated without sending a model request or writing to your files. Use --file for a specific source file or --key for an exact displayed key. Add --json for machine-readable output.
Test a connection and run translation
Save a model in the editor or configure it in transglot.community.json. Set the provider's API key in your shell if required. A key pasted into the editor is available only to that editor session. See Connect a model.
node bin/transglot-local.mjs test-connection --project /path/to/repo
node bin/transglot-local.mjs translate --project /path/to/repo --locale frReview the saved drafts in the editor and inspect your Git diff. To check the target files after review, run:
node bin/transglot-local.mjs check --project /path/to/repo --locale fr --require-reviewedThe check exits with an error when strings are missing, stale, structurally invalid, or still unreviewed. Run node bin/transglot-local.mjs --help for the full command list, including review, backups, and restore.