media
Mux CLI for CI
Use the Mux CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 5 read 2 write Bearer token auth
Mux CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. 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 CI
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
| Function | Type | Parameters | Description |
|---|---|---|---|
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
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.