@conapps/tmt-cli
v0.1.2
Published
CLI for the Platform Translation Management Tool
Readme
@conapps/tmt-cli
Command-line interface for the conapps Translation Management Tool (TMT). Push source strings, pull translations, trigger machine translation and manage projects, jobs and translation keys — straight from your terminal or CI.
Installation
npm install -g @conapps/tmt-cli
# or run ad-hoc
npx @conapps/tmt-cli statusRequires Node.js >= 18.
Quick start
# Interactive setup — writes a .tmt.yml config into your project
tmt init
# Push source strings to TMT
tmt push
# Check translation progress
tmt status
# Pull finished translations back into your locale files
tmt pullConfiguration
The CLI reads .tmt.yml from the current directory (override with --config <path>):
tmt:
client_id: <your-client-id>
client_secret: <your-client-secret>
workspace_id: <your-workspace-id>
base_url: https://api.example.com
push:
sources:
- file: ./locales/<locale_name>.json
project_id: my-project
format: json
source_language: en
target_languages: [de, fr]
pull:
targets:
- file: ./locales/<locale_name>.json
project_id: my-project
format: jsonCredentials can also be supplied via environment variables (TMT_CLIENT_ID,
TMT_CLIENT_SECRET, TMT_WORKSPACE_ID, TMT_BASE_URL) or per-invocation
flags (--client-id, --client-secret, --workspace-id, --base-url) —
handy for CI. Do not commit secrets to version control.
Commands
| Command | Description |
|---|---|
| tmt init | Interactive setup, writes .tmt.yml |
| tmt push | Upload source strings from configured files |
| tmt pull | Download translations into configured files |
| tmt status | Show translation progress |
| tmt projects … | List and manage translation projects |
| tmt jobs … | List and manage translation jobs |
| tmt keys … | Manage translation keys |
| tmt translate … | Trigger machine translation |
All commands support --json for machine-readable output.
License
MIT
