KosmoKrator

productivity

Phrase CLI for AI Agents

Use the Phrase CLI from KosmoKrator to call Phrase tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write Bearer token auth

Phrase CLI Setup

Phrase can be configured headlessly with `kosmokrator integrations:configure phrase`.

# 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 phrase --set access_token="$PHRASE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor phrase --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token PHRASE_ACCESS_TOKEN Secret secret yes API Token

Call Phrase Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call phrase.phrase_list_projects '{
  "page": 1,
  "per_page": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:phrase phrase_list_projects '{
  "page": 1,
  "per_page": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs phrase --json
kosmo integrations:docs phrase.phrase_list_projects --json
kosmo integrations:schema phrase.phrase_list_projects --json
kosmo integrations:search "Phrase" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Phrase.

phrase.phrase_list_projects

Read read

List all Phrase projects the authenticated user has access to. Returns project IDs, names, main formats, and locale counts.

Parameters
page, per_page

Generic CLI call

kosmo integrations:call phrase.phrase_list_projects '{"page":1,"per_page":1}' --json

Provider shortcut

kosmo integrations:phrase phrase_list_projects '{"page":1,"per_page":1}' --json

phrase.phrase_get_project

Read read

Get details of a single Phrase project including name, slug, main format, default locale, and shares.

Parameters
project_id

Generic CLI call

kosmo integrations:call phrase.phrase_get_project '{"project_id":"example_project_id"}' --json

Provider shortcut

kosmo integrations:phrase phrase_get_project '{"project_id":"example_project_id"}' --json

phrase.phrase_list_keys

Read read

List translation keys in a Phrase project. Optionally filter by name using the query parameter, and control pagination with page and per_page. Returns key IDs, names, and creation dates.

Parameters
project_id, page, per_page, q

Generic CLI call

kosmo integrations:call phrase.phrase_list_keys '{"project_id":"example_project_id","page":1,"per_page":1,"q":"example_q"}' --json

Provider shortcut

kosmo integrations:phrase phrase_list_keys '{"project_id":"example_project_id","page":1,"per_page":1,"q":"example_q"}' --json

phrase.phrase_get_key

Read read

Get a single translation key by ID, including its name, description, tags, and plural settings.

Parameters
project_id, key_id

Generic CLI call

kosmo integrations:call phrase.phrase_get_key '{"project_id":"example_project_id","key_id":"example_key_id"}' --json

Provider shortcut

kosmo integrations:phrase phrase_get_key '{"project_id":"example_project_id","key_id":"example_key_id"}' --json

phrase.phrase_list_translations

Read read

List translations in a Phrase project. Optionally filter by key ID or locale ID, and control pagination with page and per_page. Returns translation content, key names, and locale codes.

Parameters
project_id, page, per_page, key_id, locale_id, q

Generic CLI call

kosmo integrations:call phrase.phrase_list_translations '{"project_id":"example_project_id","page":1,"per_page":1,"key_id":"example_key_id","locale_id":"example_locale_id","q":"example_q"}' --json

Provider shortcut

kosmo integrations:phrase phrase_list_translations '{"project_id":"example_project_id","page":1,"per_page":1,"key_id":"example_key_id","locale_id":"example_locale_id","q":"example_q"}' --json

phrase.phrase_list_locales

Read read

List locales in a Phrase project. Returns locale IDs, codes, names, and default status.

Parameters
project_id, page, per_page

Generic CLI call

kosmo integrations:call phrase.phrase_list_locales '{"project_id":"example_project_id","page":1,"per_page":1}' --json

Provider shortcut

kosmo integrations:phrase phrase_list_locales '{"project_id":"example_project_id","page":1,"per_page":1}' --json

phrase.phrase_get_current_user

Read read

Get the current authenticated Phrase user's profile, including username, name, email, and account details.

Parameters
none

Generic CLI call

kosmo integrations:call phrase.phrase_get_current_user '{}' --json

Provider shortcut

kosmo integrations:phrase phrase_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

phrase.phrase_list_projects

List all Phrase projects the authenticated user has access to. Returns project IDs, names, main formats, and locale counts.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_list_projects --json
ParameterTypeRequiredDescription
page integer no Page number (default 1).
per_page integer no Number of projects per page (default 25, max 100).

phrase.phrase_get_project

Get details of a single Phrase project including name, slug, main format, default locale, and shares.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_get_project --json
ParameterTypeRequiredDescription
project_id string yes The ID of the project to retrieve.

phrase.phrase_list_keys

List translation keys in a Phrase project. Optionally filter by name using the query parameter, and control pagination with page and per_page. Returns key IDs, names, and creation dates.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_list_keys --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
page integer no Page number (default 1).
per_page integer no Number of keys per page (default 25, max 100).
q string no Search query to filter keys by name.

phrase.phrase_get_key

Get a single translation key by ID, including its name, description, tags, and plural settings.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_get_key --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
key_id string yes The key ID.

phrase.phrase_list_translations

List translations in a Phrase project. Optionally filter by key ID or locale ID, and control pagination with page and per_page. Returns translation content, key names, and locale codes.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_list_translations --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
page integer no Page number (default 1).
per_page integer no Number of translations per page (default 25, max 100).
key_id string no Filter translations by key ID.
locale_id string no Filter translations by locale ID.
q string no Search query to filter translations.

phrase.phrase_list_locales

List locales in a Phrase project. Returns locale IDs, codes, names, and default status.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_list_locales --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
page integer no Page number (default 1).
per_page integer no Number of locales per page (default 25, max 100).

phrase.phrase_get_current_user

Get the current authenticated Phrase user's profile, including username, name, email, and account details.

Operation
Read read
Schema command
kosmo integrations:schema phrase.phrase_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.