KosmoKrator

productivity

DeepL CLI for AI Agents

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

7 functions 5 read 2 write API key auth

DeepL CLI Setup

DeepL can be configured headlessly with `kosmokrator integrations:configure deepl`.

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

Credentials

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

KeyEnv varTypeRequiredLabel
api_key DEEPL_API_KEY Secret secret yes API Key
base_url DEEPL_BASE_URL URL url no API Base URL

Call DeepL Headlessly

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

kosmo integrations:call deepl.deepl_translate_text '{
  "text": "example_text",
  "target_lang": "example_target_lang",
  "source_lang": "example_source_lang"
}' --json

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

kosmo integrations:deepl deepl_translate_text '{
  "text": "example_text",
  "target_lang": "example_target_lang",
  "source_lang": "example_source_lang"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs deepl --json
kosmo integrations:docs deepl.deepl_translate_text --json
kosmo integrations:schema deepl.deepl_translate_text --json
kosmo integrations:search "DeepL" --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 DeepL.

deepl.deepl_translate_text

Write write

Translate text using DeepL. Supports automatic source language detection or explicit source language specification. Returns translated text with detected source language.

Parameters
text, target_lang, source_lang

Generic CLI call

kosmo integrations:call deepl.deepl_translate_text '{"text":"example_text","target_lang":"example_target_lang","source_lang":"example_source_lang"}' --json

Provider shortcut

kosmo integrations:deepl deepl_translate_text '{"text":"example_text","target_lang":"example_target_lang","source_lang":"example_source_lang"}' --json

deepl.deepl_list_languages

Read read

List languages supported by DeepL. Returns language codes and names. Filter by type to get only source or target languages.

Parameters
type

Generic CLI call

kosmo integrations:call deepl.deepl_list_languages '{"type":"example_type"}' --json

Provider shortcut

kosmo integrations:deepl deepl_list_languages '{"type":"example_type"}' --json

deepl.deepl_get_usage

Read read

Get current DeepL API usage. Returns the number of characters translated and the character limit for the current billing period.

Parameters
none

Generic CLI call

kosmo integrations:call deepl.deepl_get_usage '{}' --json

Provider shortcut

kosmo integrations:deepl deepl_get_usage '{}' --json

deepl.deepl_list_glossaries

Read read

List all glossaries in your DeepL account. Returns glossary IDs, names, language pairs, and entry counts.

Parameters
none

Generic CLI call

kosmo integrations:call deepl.deepl_list_glossaries '{}' --json

Provider shortcut

kosmo integrations:deepl deepl_list_glossaries '{}' --json

deepl.deepl_get_glossary

Read read

Get details of a specific DeepL glossary by ID. Returns glossary name, source/target languages, entry count, and creation timestamp.

Parameters
id

Generic CLI call

kosmo integrations:call deepl.deepl_get_glossary '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:deepl deepl_get_glossary '{"id":"example_id"}' --json

deepl.deepl_create_glossary

Write write

Create a new DeepL glossary. Glossaries define custom translations for specific terms. Entries are tab-separated pairs (source\ttarget), one per line.

Parameters
name, source_lang, target_lang, entries

Generic CLI call

kosmo integrations:call deepl.deepl_create_glossary '{"name":"example_name","source_lang":"example_source_lang","target_lang":"example_target_lang","entries":"example_entries"}' --json

Provider shortcut

kosmo integrations:deepl deepl_create_glossary '{"name":"example_name","source_lang":"example_source_lang","target_lang":"example_target_lang","entries":"example_entries"}' --json

deepl.deepl_get_current_user

Read read

Get current DeepL account information. Returns usage statistics and account details.

Parameters
none

Generic CLI call

kosmo integrations:call deepl.deepl_get_current_user '{}' --json

Provider shortcut

kosmo integrations:deepl deepl_get_current_user '{}' --json

Function Schemas

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

deepl.deepl_translate_text

Translate text using DeepL. Supports automatic source language detection or explicit source language specification. Returns translated text with detected source language.

Operation
Write write
Schema command
kosmo integrations:schema deepl.deepl_translate_text --json
ParameterTypeRequiredDescription
text string yes The text to translate. For multiple texts, pass an array.
target_lang string yes The target language code (e.g., "EN", "DE", "FR", "ES", "JA", "ZH"). Use "EN-US" for American English, "EN-GB" for British English, "PT-BR" for Brazilian Portuguese.
source_lang string no The source language code (e.g., "EN", "DE"). If omitted, DeepL auto-detects the source language.

deepl.deepl_list_languages

List languages supported by DeepL. Returns language codes and names. Filter by type to get only source or target languages.

Operation
Read read
Schema command
kosmo integrations:schema deepl.deepl_list_languages --json
ParameterTypeRequiredDescription
type string no Filter by type: "source" for source languages, "target" for target languages. Returns all if omitted.

deepl.deepl_get_usage

Get current DeepL API usage. Returns the number of characters translated and the character limit for the current billing period.

Operation
Read read
Schema command
kosmo integrations:schema deepl.deepl_get_usage --json
ParameterTypeRequiredDescription
No parameters.

deepl.deepl_list_glossaries

List all glossaries in your DeepL account. Returns glossary IDs, names, language pairs, and entry counts.

Operation
Read read
Schema command
kosmo integrations:schema deepl.deepl_list_glossaries --json
ParameterTypeRequiredDescription
No parameters.

deepl.deepl_get_glossary

Get details of a specific DeepL glossary by ID. Returns glossary name, source/target languages, entry count, and creation timestamp.

Operation
Read read
Schema command
kosmo integrations:schema deepl.deepl_get_glossary --json
ParameterTypeRequiredDescription
id string yes The glossary ID (e.g., "a1b2c3d4-e5f6-7890-abcd-ef1234567890").

deepl.deepl_create_glossary

Create a new DeepL glossary. Glossaries define custom translations for specific terms. Entries are tab-separated pairs (source\ttarget), one per line.

Operation
Write write
Schema command
kosmo integrations:schema deepl.deepl_create_glossary --json
ParameterTypeRequiredDescription
name string yes A name for the glossary (e.g., "Marketing Terms EN-DE").
source_lang string yes The source language code (e.g., "EN", "DE"). Must match the glossary entries.
target_lang string yes The target language code (e.g., "DE", "FR"). Must match the glossary entries.
entries string yes Glossary entries as tab-separated values. Each line: source_term<tab>target_term. Multiple lines for multiple entries.

deepl.deepl_get_current_user

Get current DeepL account information. Returns usage statistics and account details.

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