CLI — Getting Started
The Multilocale CLI lets you manage translations from the command line. Download translation files, import existing translations, add new phrases, and auto-translate to new locales.
Installation
npm install -g multilocale
Authentication
Before using the CLI, log in with your Multilocale account:
multilocale login
You'll be prompted for your email and password. The session is stored locally so you don't need to log in again.
To log out:
multilocale logout
Project Selection
Most commands require a project. The CLI detects your project in this order:
--projectflag with a project ID or namemultilocale.jsonconfig file in the current directory- Interactive prompt to select from your projects
Quick Start
# Install globally
npm install -g multilocale
# Log in
multilocale login
# Download translations for your project
multilocale download --project my-app
# Add a new phrase and auto-translate it
multilocale add welcome_message "Welcome to our app" --project my-app
# Add a new locale and translate all phrases into it
multilocale localize es --project my-app
Global Options
| Flag | Description |
|---|---|
-V, --version | Print the CLI version |
-e, --env <environment> | Environment to use (default: production) |
-h, --help | Display help |