Installation
Prerequisites
Section titled “Prerequisites”- Node.js 18+ or Deno 2.7+
- A LokAI account (sign up at lokai.cloud)
- An existing project with i18n files (JSON, YAML, or PO format supported)
Install the CLI
Section titled “Install the CLI”-
Install via npm / pnpm / yarn
Terminal window # npmnpm install -g @lokai/cli# pnpmpnpm add -g @lokai/cli# yarnyarn global add @lokai/cliOr download a pre-built binary from the releases page.
-
Verify the installation
Terminal window lokai --version -
Authenticate
Terminal window lokai loginThis opens a browser window to complete the OAuth flow. Your credentials are stored securely in your OS keychain.
-
Initialise a project
Run this from the root of your repository:
Terminal window lokai initThis creates a
lokai.config.yamlfile in your project root.
Configuration file
Section titled “Configuration file”The lokai.config.yaml file tells the CLI where your translation files live and how to sync them with LokAI.
version: 1workspace: my-workspaceproject: my-projectapiUrl: https://api.lokai.cloud
localesDir: ./src/localesformat: json # json | yaml | po
mainLanguages: - en
targetLanguages: - fr - de - es - ja
pullOptions: includeDraft: false flatten: false
pushOptions: createMissing: true updateExisting: trueSee the full Config File Reference for all available options.
Next steps
Section titled “Next steps”- Follow the Quickstart to push your first keys and get AI translations
- Browse the CLI Reference for all available commands