KosmoKrator

data

YouTube CLI for CI

Use the YouTube CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 7 read 0 write API key auth

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

Command Shape

# YouTube CLI for CI
kosmokrator integrations:configure youtube --set api_key="$YOUTUBE_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call youtube.youtube_search_videos '{"query":"example_query","type":"example_type","max_results":1,"page_token":"example_page_token","order":"example_order","published_after":"example_published_after","published_before":"example_published_before","region_code":"example_region_code"}' --json

Discovery Before Execution

Agents and scripts can inspect YouTube docs and schemas before choosing a function.

kosmo integrations:docs youtube --json
kosmo integrations:docs youtube.youtube_search_videos --json
kosmo integrations:schema youtube.youtube_search_videos --json
kosmo integrations:search "YouTube" --json
kosmo integrations:list --json

Useful YouTube CLI Functions

FunctionTypeParametersDescription
youtube.youtube_search_videos Read query, type, max_results, page_token, order, published_after, published_before, region_code, channel_id, video_duration, safe_search Search for videos, channels, or playlists on YouTube using keywords, filters, and sorting options. Returns matching results with snippet metadata.
youtube.youtube_get_video_details Read video_ids, part Get detailed information about one or more YouTube videos by ID, including title, description, thumbnails, duration, view count, likes, and channel info.
youtube.youtube_list_channels Read for_username, channel_ids, category_id, mine, max_results, page_token, hl List YouTube channels by username, channel ID, or category. Returns channel snippets, statistics, and content details.
youtube.youtube_get_channel Read channel_id, part Get detailed information about a specific YouTube channel by ID, including snippet, statistics (subscribers, views, videos), content details, and branding settings.
youtube.youtube_list_playlists Read channel_id, playlist_ids, mine, max_results, page_token List playlists for a YouTube channel or by playlist IDs. Returns playlist snippets and content details.
youtube.youtube_get_playlist Read playlist_id, max_results, page_token Get details about a specific YouTube playlist by ID, including its metadata and up to 50 playlist items (videos).
youtube.youtube_get_current_user Read none Get the authenticated user's YouTube channel information, including channel title, description, subscriber count, total views, and video count.

Automation Notes

Related YouTube CLI Pages