KosmoKrator

media

Mux CLI for AI Agents

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

7 functions 5 read 2 write Bearer token auth

Mux CLI Setup

Mux can be configured headlessly with `kosmokrator integrations:configure mux`.

# 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 mux --set access_token="$MUX_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor mux --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 MUX_ACCESS_TOKEN Secret secret yes Access Token
url MUX_URL URL url no Mux API URL

Call Mux Headlessly

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

kosmo integrations:call mux.mux_list_assets '{
  "limit": 1,
  "page": 1
}' --json

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

kosmo integrations:mux mux_list_assets '{
  "limit": 1,
  "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 mux --json
kosmo integrations:docs mux.mux_list_assets --json
kosmo integrations:schema mux.mux_list_assets --json
kosmo integrations:search "Mux" --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 Mux.

mux.mux_list_assets

Read read

List video assets stored in Mux. Returns a paginated list of assets with their IDs, status, duration, and playback information.

Parameters
limit, page

Generic CLI call

kosmo integrations:call mux.mux_list_assets '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:mux mux_list_assets '{"limit":1,"page":1}' --json

mux.mux_get_asset

Read read

Retrieve details of a specific video asset by its ID, including status, playback IDs, duration, and tracks.

Parameters
asset_id

Generic CLI call

kosmo integrations:call mux.mux_get_asset '{"asset_id":"example_asset_id"}' --json

Provider shortcut

kosmo integrations:mux mux_get_asset '{"asset_id":"example_asset_id"}' --json

mux.mux_create_asset

Write write

Create a new video asset in Mux from an input URL. The asset is ingested and encoded asynchronously. Optionally set a playback policy (public or signed).

Parameters
input, playback_policy

Generic CLI call

kosmo integrations:call mux.mux_create_asset '{"input":"example_input","playback_policy":"example_playback_policy"}' --json

Provider shortcut

kosmo integrations:mux mux_create_asset '{"input":"example_input","playback_policy":"example_playback_policy"}' --json

mux.mux_list_live_streams

Read read

List live streams in Mux. Returns a paginated list of live streams with their IDs, status, stream key, and playback information.

Parameters
limit, page

Generic CLI call

kosmo integrations:call mux.mux_list_live_streams '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:mux mux_list_live_streams '{"limit":1,"page":1}' --json

mux.mux_get_live_stream

Read read

Retrieve details of a specific live stream by its ID, including status, stream key, playback IDs, and reconnect window.

Parameters
live_stream_id

Generic CLI call

kosmo integrations:call mux.mux_get_live_stream '{"live_stream_id":"example_live_stream_id"}' --json

Provider shortcut

kosmo integrations:mux mux_get_live_stream '{"live_stream_id":"example_live_stream_id"}' --json

mux.mux_create_live_stream

Write write

Create a new live stream in Mux. Returns the stream key and playback information. Optionally set playback policy and asset creation settings.

Parameters
playback_policy, new_asset_settings

Generic CLI call

kosmo integrations:call mux.mux_create_live_stream '{"playback_policy":"example_playback_policy","new_asset_settings":"example_new_asset_settings"}' --json

Provider shortcut

kosmo integrations:mux mux_create_live_stream '{"playback_policy":"example_playback_policy","new_asset_settings":"example_new_asset_settings"}' --json

mux.mux_get_current_user

Read read

Get realtime viewer data from Mux Data, including current viewer counts across all properties and views.

Parameters
none

Generic CLI call

kosmo integrations:call mux.mux_get_current_user '{}' --json

Provider shortcut

kosmo integrations:mux mux_get_current_user '{}' --json

Function Schemas

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

mux.mux_list_assets

List video assets stored in Mux. Returns a paginated list of assets with their IDs, status, duration, and playback information.

Operation
Read read
Schema command
kosmo integrations:schema mux.mux_list_assets --json
ParameterTypeRequiredDescription
limit integer no Maximum number of assets to return (1–100, default: 25).
page integer no Page offset for pagination (0-indexed, default: 0).

mux.mux_get_asset

Retrieve details of a specific video asset by its ID, including status, playback IDs, duration, and tracks.

Operation
Read read
Schema command
kosmo integrations:schema mux.mux_get_asset --json
ParameterTypeRequiredDescription
asset_id string yes The ID of the asset to retrieve.

mux.mux_create_asset

Create a new video asset in Mux from an input URL. The asset is ingested and encoded asynchronously. Optionally set a playback policy (public or signed).

Operation
Write write
Schema command
kosmo integrations:schema mux.mux_create_asset --json
ParameterTypeRequiredDescription
input string yes The URL of the video file to ingest (e.g., "https://storage.example.com/video.mp4").
playback_policy array no Playback policy for the asset. Use ["public"] for unrestricted access or ["signed"] for signed URLs. Defaults to the workspace default.

mux.mux_list_live_streams

List live streams in Mux. Returns a paginated list of live streams with their IDs, status, stream key, and playback information.

Operation
Read read
Schema command
kosmo integrations:schema mux.mux_list_live_streams --json
ParameterTypeRequiredDescription
limit integer no Maximum number of live streams to return (1–100, default: 25).
page integer no Page offset for pagination (0-indexed, default: 0).

mux.mux_get_live_stream

Retrieve details of a specific live stream by its ID, including status, stream key, playback IDs, and reconnect window.

Operation
Read read
Schema command
kosmo integrations:schema mux.mux_get_live_stream --json
ParameterTypeRequiredDescription
live_stream_id string yes The ID of the live stream to retrieve.

mux.mux_create_live_stream

Create a new live stream in Mux. Returns the stream key and playback information. Optionally set playback policy and asset creation settings.

Operation
Write write
Schema command
kosmo integrations:schema mux.mux_create_live_stream --json
ParameterTypeRequiredDescription
playback_policy array no Playback policy for the live stream. Use ["public"] for unrestricted access or ["signed"] for signed URLs. Defaults to the workspace default.
new_asset_settings object no Settings applied to assets created from this live stream. Supports any Mux asset creation parameters (e.g., {"playback_policy": ["public"], "mp4_support": "standard"}).

mux.mux_get_current_user

Get realtime viewer data from Mux Data, including current viewer counts across all properties and views.

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