productivity
Lokalise CLI for AI Agents
Use the Lokalise CLI from KosmoKrator to call Lokalise tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Lokalise CLI Setup
Lokalise can be configured headlessly with `kosmokrator integrations:configure lokalise`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure lokalise --set api_token="$LOKALISE_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor lokalise --json
kosmokrator integrations:status --json Credentials
Authentication type: API token api_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_token | LOKALISE_API_TOKEN | Secret secret | yes | API Token |
base_url | LOKALISE_BASE_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call lokalise.lokalise_list_projects '{"limit":1,"page":1}' --json kosmo integrations:lokalise lokalise_list_projects '{"limit":1,"page":1}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs lokalise --json
kosmo integrations:docs lokalise.lokalise_list_projects --json
kosmo integrations:schema lokalise.lokalise_list_projects --json
kosmo integrations:search "Lokalise" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
lokalise.lokalise_list_projects
List Lokalise projects. Returns project IDs, names, languages, and other metadata. Supports pagination.
read - Parameters
- limit, page
kosmo integrations:call lokalise.lokalise_list_projects '{"limit":1,"page":1}' --json kosmo integrations:lokalise lokalise_list_projects '{"limit":1,"page":1}' --json lokalise.lokalise_get_project
Get details of a specific Lokalise project. Returns project name, description, languages, statistics, and settings.
read - Parameters
- project_id
kosmo integrations:call lokalise.lokalise_get_project '{"project_id":"example_project_id"}' --json kosmo integrations:lokalise lokalise_get_project '{"project_id":"example_project_id"}' --json lokalise.lokalise_list_keys
List translation keys in a Lokalise project. Returns key IDs, names, platforms, and other metadata. Supports pagination.
read - Parameters
- project_id, limit, page
kosmo integrations:call lokalise.lokalise_list_keys '{"project_id":"example_project_id","limit":1,"page":1}' --json kosmo integrations:lokalise lokalise_list_keys '{"project_id":"example_project_id","limit":1,"page":1}' --json lokalise.lokalise_get_key
Get details of a specific translation key in a Lokalise project. Returns key name, platforms, translations, and other metadata.
read - Parameters
- project_id, key_id
kosmo integrations:call lokalise.lokalise_get_key '{"project_id":"example_project_id","key_id":1}' --json kosmo integrations:lokalise lokalise_get_key '{"project_id":"example_project_id","key_id":1}' --json lokalise.lokalise_create_key
Create a new translation key in a Lokalise project. The key name and optional translations for each language can be provided.
write - Parameters
- project_id, key_name, platforms, translations, description, tags
kosmo integrations:call lokalise.lokalise_create_key '{"project_id":"example_project_id","key_name":"example_key_name","platforms":"example_platforms","translations":"example_translations","description":"example_description","tags":"example_tags"}' --json kosmo integrations:lokalise lokalise_create_key '{"project_id":"example_project_id","key_name":"example_key_name","platforms":"example_platforms","translations":"example_translations","description":"example_description","tags":"example_tags"}' --json lokalise.lokalise_list_translations
List translations in a Lokalise project. Returns translation values, language codes, and key references. Supports pagination.
read - Parameters
- project_id, limit, page
kosmo integrations:call lokalise.lokalise_list_translations '{"project_id":"example_project_id","limit":1,"page":1}' --json kosmo integrations:lokalise lokalise_list_translations '{"project_id":"example_project_id","limit":1,"page":1}' --json lokalise.lokalise_get_current_user
Get the currently authenticated Lokalise user. Returns user email, name, and account details.
read - Parameters
- none
kosmo integrations:call lokalise.lokalise_get_current_user '{}' --json kosmo integrations:lokalise lokalise_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
lokalise.lokalise_list_projects 2 parameters
kosmo integrations:schema lokalise.lokalise_list_projects --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of projects to return (default 25). |
page | integer | no | Page number for pagination (default 1). |
lokalise.lokalise_get_project 1 parameters
kosmo integrations:schema lokalise.lokalise_get_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
lokalise.lokalise_list_keys 3 parameters
kosmo integrations:schema lokalise.lokalise_list_keys --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
limit | integer | no | Maximum number of keys to return (default 25). |
page | integer | no | Page number for pagination (default 1). |
lokalise.lokalise_get_key 2 parameters
kosmo integrations:schema lokalise.lokalise_get_key --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
key_id | integer | yes | The key ID. |
lokalise.lokalise_create_key 6 parameters
kosmo integrations:schema lokalise.lokalise_create_key --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
key_name | string | yes | The key name (e.g. "app.welcome"). |
platforms | array | no | List of platforms (e.g. ["web", "ios", "android"]). |
translations | object | no | Key-value map of language ISO codes to translation values (e.g. {"en": "Welcome", "fr": "Bienvenue"}). |
description | string | no | Description for the key. |
tags | array | no | List of tags to assign to the key. |
lokalise.lokalise_list_translations 3 parameters
kosmo integrations:schema lokalise.lokalise_list_translations --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
limit | integer | no | Maximum number of translations to return (default 25). |
page | integer | no | Page number for pagination (default 1). |
lokalise.lokalise_get_current_user 0 parameters
kosmo integrations:schema lokalise.lokalise_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.