productivity
Codemagic CLI for AI Agents
Use the Codemagic CLI from KosmoKrator to call Codemagic tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Codemagic CLI Setup
Codemagic can be configured headlessly with `kosmokrator integrations:configure codemagic`.
# 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 codemagic --set api_token="$CODEMAGIC_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor codemagic --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 | CODEMAGIC_API_TOKEN | Secret secret | yes | API Token |
url | CODEMAGIC_URL | Text text | no | API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call codemagic.codemagic_list_apps '{}' --json kosmo integrations:codemagic codemagic_list_apps '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs codemagic --json
kosmo integrations:docs codemagic.codemagic_list_apps --json
kosmo integrations:schema codemagic.codemagic_list_apps --json
kosmo integrations:search "Codemagic" --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.
codemagic.codemagic_list_apps
List Codemagic applications.
read - Parameters
- none
kosmo integrations:call codemagic.codemagic_list_apps '{}' --json kosmo integrations:codemagic codemagic_list_apps '{}' --json codemagic.codemagic_get_app
Get one Codemagic application.
read - Parameters
- none
kosmo integrations:call codemagic.codemagic_get_app '{}' --json kosmo integrations:codemagic codemagic_get_app '{}' --json codemagic.codemagic_create_app
Add a repository to Codemagic.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_create_app '{}' --json kosmo integrations:codemagic codemagic_create_app '{}' --json codemagic.codemagic_create_private_app
Add a private repository with SSH key details.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_create_private_app '{}' --json kosmo integrations:codemagic codemagic_create_private_app '{}' --json codemagic.codemagic_start_build
Start a Codemagic build.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_start_build '{}' --json kosmo integrations:codemagic codemagic_start_build '{}' --json codemagic.codemagic_cancel_build
Cancel a Codemagic build.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_cancel_build '{}' --json kosmo integrations:codemagic codemagic_cancel_build '{}' --json codemagic.codemagic_get_artifact
Get an authenticated artifact URL.
read - Parameters
- none
kosmo integrations:call codemagic.codemagic_get_artifact '{}' --json kosmo integrations:codemagic codemagic_get_artifact '{}' --json codemagic.codemagic_create_artifact_public_url
Create a public artifact download URL.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_create_artifact_public_url '{}' --json kosmo integrations:codemagic codemagic_create_artifact_public_url '{}' --json codemagic.codemagic_list_caches
List app caches.
read - Parameters
- none
kosmo integrations:call codemagic.codemagic_list_caches '{}' --json kosmo integrations:codemagic codemagic_list_caches '{}' --json codemagic.codemagic_delete_caches
Delete all app caches.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_delete_caches '{}' --json kosmo integrations:codemagic codemagic_delete_caches '{}' --json codemagic.codemagic_delete_cache
Delete one app cache.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_delete_cache '{}' --json kosmo integrations:codemagic codemagic_delete_cache '{}' --json codemagic.codemagic_api_get
Call a safe relative Codemagic GET path.
read - Parameters
- none
kosmo integrations:call codemagic.codemagic_api_get '{}' --json kosmo integrations:codemagic codemagic_api_get '{}' --json codemagic.codemagic_api_post
Call a safe relative Codemagic POST path.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_api_post '{}' --json kosmo integrations:codemagic codemagic_api_post '{}' --json codemagic.codemagic_api_patch
Call a safe relative Codemagic PATCH path.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_api_patch '{}' --json kosmo integrations:codemagic codemagic_api_patch '{}' --json codemagic.codemagic_api_delete
Call a safe relative Codemagic DELETE path.
write - Parameters
- none
kosmo integrations:call codemagic.codemagic_api_delete '{}' --json kosmo integrations:codemagic codemagic_api_delete '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
codemagic.codemagic_list_apps 0 parameters
kosmo integrations:schema codemagic.codemagic_list_apps --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_get_app 0 parameters
kosmo integrations:schema codemagic.codemagic_get_app --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_create_app 0 parameters
kosmo integrations:schema codemagic.codemagic_create_app --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_create_private_app 0 parameters
kosmo integrations:schema codemagic.codemagic_create_private_app --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_start_build 0 parameters
kosmo integrations:schema codemagic.codemagic_start_build --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_cancel_build 0 parameters
kosmo integrations:schema codemagic.codemagic_cancel_build --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_get_artifact 0 parameters
kosmo integrations:schema codemagic.codemagic_get_artifact --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_create_artifact_public_url 0 parameters
kosmo integrations:schema codemagic.codemagic_create_artifact_public_url --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_list_caches 0 parameters
kosmo integrations:schema codemagic.codemagic_list_caches --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_delete_caches 0 parameters
kosmo integrations:schema codemagic.codemagic_delete_caches --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_delete_cache 0 parameters
kosmo integrations:schema codemagic.codemagic_delete_cache --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_api_get 0 parameters
kosmo integrations:schema codemagic.codemagic_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_api_post 0 parameters
kosmo integrations:schema codemagic.codemagic_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_api_patch 0 parameters
kosmo integrations:schema codemagic.codemagic_api_patch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
codemagic.codemagic_api_delete 0 parameters
kosmo integrations:schema codemagic.codemagic_api_delete --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.