Installation
One-off Usage
Run loco-cli directly with npx:
npx loco-cli --helpProject Installation
Install as a dev dependency:
# npmnpm install -D loco-cli
# pnpmpnpm add -D loco-cli
# yarnyarn add -D loco-cliSetup
-
Get your API key from Loco: Developer Tools → API Keys → Full Access Key
If you only need to pull translations, an Export key is sufficient.
-
Create a
loco.config.jsfile in your project root:
/** @type {import('loco-cli/types').Config} */module.exports = { accessKey: '<loco-full-access-key>', localesDir: 'src/locales'};- Run your first sync:
npx loco-cli statusSee Configuration for all available options.