streaming
Twitch CLI for Coding Agents
Use the Twitch CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
8 functions 8 read 0 write Manual OAuth token auth
Twitch CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Twitch CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Twitch CLI for Coding Agents
kosmokrator integrations:configure twitch --set access_token="$TWITCH_ACCESS_TOKEN" --set client_id="$TWITCH_CLIENT_ID" --enable --read allow --write ask --json
kosmo integrations:call twitch.twitch_list_streams '{"game_id":"example_game_id","language":"example_language","user_id":"example_user_id","user_login":"example_user_login","first":1,"after":"example_after","before":"example_before"}' --json Discovery Before Execution
Agents and scripts can inspect Twitch docs and schemas before choosing a function.
kosmo integrations:docs twitch --json
kosmo integrations:docs twitch.twitch_list_streams --json
kosmo integrations:schema twitch.twitch_list_streams --json
kosmo integrations:search "Twitch" --json
kosmo integrations:list --json Useful Twitch CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
twitch.twitch_list_streams | Read | game_id, language, user_id, user_login, first, after, before | List live streams on Twitch. Filter by game, language, or specific users. Returns stream title, viewer count, and broadcaster info. |
twitch.twitch_get_user | Read | id, login | Get information about a Twitch user by user ID or login name. Returns display name, bio, profile image, and account details. |
twitch.twitch_list_games | Read | id, name | Get information about Twitch games/categories by ID or name. Returns game name, box art URL, and IGDB ID. |
twitch.twitch_get_game | Read | id | Get information about a specific Twitch game/category by its ID. Returns game name, box art URL, and IGDB ID. |
twitch.twitch_list_channels | Read | broadcaster_id, first, after | List channel information on Twitch. Filter by broadcaster ID. Returns channel description, game, and broadcast settings. |
twitch.twitch_get_channel | Read | broadcaster_id | Get information about a specific Twitch channel by broadcaster ID. Returns channel title, game, description, and broadcast settings. |
twitch.twitch_search_categories | Read | query, first, after | Search for games/categories on Twitch by name. Returns matching categories with IDs you can use to filter streams. |
twitch.twitch_get_current_user | Read | none | Get information about the currently authenticated Twitch user. Returns display name, bio, profile image, and account type. |
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.