1.1 KiB
1.1 KiB
cmd/
CLI command definitions and MCP tool bindings.
Wiring
main.go→cmd.Execute()→root.go- Each
<resource>/dir registers a subcommand + MCP tool Runfunction: binds flags → callspkg/<resource>method
Conventions
resetFlagsinPersistentPreRun: ensures clean state for MCP.- MCP tools registered via
mcp.AddTool. - Flags bound to package-level variables.
BUILD.bazelfiles are auto-generated — do NOT create or edit them manually.
Subcommands
Each subdirectory is a 1:1 mapping to a YouTube API resource:
abuseReport/, activity/, agent/, caption/, channel/, channelBanner/, channelSection/, comment/, commentThread/, i18nLanguage/, i18nRegion/, liveBroadcast/, liveChatBan/, liveChatMessage/, liveChatModerator/, liveStream/, member/, membershipsLevel/, playlist/, playlistImage/, playlistItem/, search/, subscription/, superChatEvent/, thirdPartyLink/, thumbnail/, video/, videoAbuseReportReason/, videoCategory/, watermark/
All follow the same pattern — see Wiring above.