Skip to main content

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:

  1. --project flag with a project ID or name
  2. multilocale.json config file in the current directory
  3. 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

FlagDescription
-V, --versionPrint the CLI version
-e, --env <environment>Environment to use (default: production)
-h, --helpDisplay help