KosmoKrator

productivity

Phrase CLI for Shell Scripts

Use the Phrase CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 7 read 0 write Bearer token auth

Phrase CLI for Shell Scripts

Call integration functions from shell scripts with stable JSON input and output.

Use shell scripts for small local automations that need one or more integration calls. The Phrase CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Phrase CLI for Shell Scripts
kosmokrator integrations:configure phrase --set access_token="$PHRASE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call phrase.phrase_list_projects '{"page":1,"per_page":1}' --json

Discovery Before Execution

Agents and scripts can inspect Phrase docs and schemas 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

Useful Phrase CLI Functions

FunctionTypeParametersDescription
phrase.phrase_list_projects Read page, per_page List all Phrase projects the authenticated user has access to. Returns project IDs, names, main formats, and locale counts.
phrase.phrase_get_project Read project_id Get details of a single Phrase project including name, slug, main format, default locale, and shares.
phrase.phrase_list_keys Read project_id, page, per_page, q 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.
phrase.phrase_get_key Read project_id, key_id Get a single translation key by ID, including its name, description, tags, and plural settings.
phrase.phrase_list_translations Read project_id, page, per_page, key_id, locale_id, q 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.
phrase.phrase_list_locales Read project_id, page, per_page List locales in a Phrase project. Returns locale IDs, codes, names, and default status.
phrase.phrase_get_current_user Read none Get the current authenticated Phrase user's profile, including username, name, email, and account details.

Automation Notes

Related Phrase CLI Pages