KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
kosmo integrations:call lokalise.lokalise_list_projects '{"limit":1,"page":1}' --json
Provider shortcut
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.

Discovery commands
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 read
Parameters
limit, page
Generic call
kosmo integrations:call lokalise.lokalise_list_projects '{"limit":1,"page":1}' --json
Shortcut
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 read
Parameters
project_id
Generic call
kosmo integrations:call lokalise.lokalise_get_project '{"project_id":"example_project_id"}' --json
Shortcut
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 read
Parameters
project_id, limit, page
Generic call
kosmo integrations:call lokalise.lokalise_list_keys '{"project_id":"example_project_id","limit":1,"page":1}' --json
Shortcut
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 read
Parameters
project_id, key_id
Generic call
kosmo integrations:call lokalise.lokalise_get_key '{"project_id":"example_project_id","key_id":1}' --json
Shortcut
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 write
Parameters
project_id, key_name, platforms, translations, description, tags
Generic call
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
Shortcut
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 read
Parameters
project_id, limit, page
Generic call
kosmo integrations:call lokalise.lokalise_list_translations '{"project_id":"example_project_id","limit":1,"page":1}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call lokalise.lokalise_get_current_user '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema lokalise.lokalise_list_projects --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema lokalise.lokalise_get_project --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
lokalise.lokalise_list_keys 3 parameters
Schema command
kosmo integrations:schema lokalise.lokalise_list_keys --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema lokalise.lokalise_get_key --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
key_id integer yes The key ID.
lokalise.lokalise_create_key 6 parameters
Schema command
kosmo integrations:schema lokalise.lokalise_create_key --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema lokalise.lokalise_list_translations --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema lokalise.lokalise_get_current_user --json
ParameterTypeRequiredDescription
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.