KosmoKrator

media

Mux CLI for Shell Scripts

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

7 functions 5 read 2 write Bearer token auth

Mux 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 Mux CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mux CLI for Shell Scripts
kosmokrator integrations:configure mux --set access_token="$MUX_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call mux.mux_list_assets '{"limit":1,"page":1}' --json

Discovery Before Execution

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

Useful Mux CLI Functions

FunctionTypeParametersDescription
mux.mux_list_assets Read limit, page List video assets stored in Mux. Returns a paginated list of assets with their IDs, status, duration, and playback information.
mux.mux_get_asset Read asset_id Retrieve details of a specific video asset by its ID, including status, playback IDs, duration, and tracks.
mux.mux_create_asset Write input, playback_policy 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).
mux.mux_list_live_streams Read limit, page List live streams in Mux. Returns a paginated list of live streams with their IDs, status, stream key, and playback information.
mux.mux_get_live_stream Read live_stream_id Retrieve details of a specific live stream by its ID, including status, stream key, playback IDs, and reconnect window.
mux.mux_create_live_stream Write playback_policy, new_asset_settings Create a new live stream in Mux. Returns the stream key and playback information. Optionally set playback policy and asset creation settings.
mux.mux_get_current_user Read none Get realtime viewer data from Mux Data, including current viewer counts across all properties and views.

Automation Notes

Related Mux CLI Pages