Skip to content

Installation

  • 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)
  1. Install via npm / pnpm / yarn

    Terminal window
    # npm
    npm install -g @lokai/cli
    # pnpm
    pnpm add -g @lokai/cli
    # yarn
    yarn global add @lokai/cli

    Or download a pre-built binary from the releases page.

  2. Verify the installation

    Terminal window
    lokai --version
  3. Authenticate

    Terminal window
    lokai login

    This opens a browser window to complete the OAuth flow. Your credentials are stored securely in your OS keychain.

  4. Initialise a project

    Run this from the root of your repository:

    Terminal window
    lokai init

    This creates a lokai.config.yaml file in your project root.

The lokai.config.yaml file tells the CLI where your translation files live and how to sync them with LokAI.

lokai.config.yaml
version: 1
workspace: my-workspace
project: my-project
apiUrl: https://api.lokai.cloud
localesDir: ./src/locales
format: json # json | yaml | po
mainLanguages:
- en
targetLanguages:
- fr
- de
- es
- ja
pullOptions:
includeDraft: false
flatten: false
pushOptions:
createMissing: true
updateExisting: true

See the full Config File Reference for all available options.

  • Follow the Quickstart to push your first keys and get AI translations
  • Browse the CLI Reference for all available commands