From 6262eb89d7a75fd894fc29268cac64df150ec352 Mon Sep 17 00:00:00 2001 From: OpenWaygate <27287694+OpenWaygate@users.noreply.github.com> Date: Mon, 2 Mar 2026 23:49:31 +0800 Subject: [PATCH] :speech_balloon: Add comment for each example --- cmd/activity/activity.go | 4 ++-- cmd/activity/list.go | 5 ++++- cmd/agent/agent.go | 8 ++++---- cmd/caption/caption.go | 4 ++-- cmd/caption/delete.go | 4 +++- cmd/caption/download.go | 5 ++++- cmd/caption/insert.go | 5 ++++- cmd/caption/list.go | 5 ++++- cmd/caption/update.go | 5 ++++- cmd/channel/list.go | 6 +++++- cmd/channel/update.go | 5 ++++- cmd/channelBanner/insert.go | 8 +++++--- cmd/channelSection/delete.go | 4 +++- cmd/channelSection/list.go | 5 ++++- cmd/comment/delete.go | 4 +++- cmd/comment/insert.go | 4 +++- cmd/comment/list.go | 5 ++++- cmd/comment/markAsSpam.go | 4 +++- cmd/comment/setModerationStatus.go | 5 ++++- cmd/comment/update.go | 5 ++++- cmd/commentThread/insert.go | 4 +++- cmd/commentThread/list.go | 5 ++++- cmd/member/list.go | 4 +++- cmd/membershipsLevel/list.go | 3 ++- cmd/playlist/delete.go | 4 +++- cmd/playlist/insert.go | 5 ++++- cmd/playlist/list.go | 5 ++++- cmd/playlist/update.go | 5 ++++- cmd/playlistImage/delete.go | 4 +++- cmd/playlistImage/insert.go | 9 ++++++--- cmd/playlistImage/list.go | 4 +++- cmd/playlistImage/update.go | 3 ++- cmd/playlistItem/delete.go | 4 +++- cmd/playlistItem/insert.go | 4 +++- cmd/playlistItem/list.go | 5 ++++- cmd/playlistItem/update.go | 5 ++++- cmd/search/list.go | 6 +++++- cmd/subscription/delete.go | 4 +++- cmd/subscription/insert.go | 8 +++++--- cmd/subscription/list.go | 6 +++++- cmd/superChatEvent/list.go | 3 ++- cmd/thumbnail/set.go | 4 +++- cmd/video/delete.go | 4 +++- cmd/video/getRating.go | 4 +++- cmd/video/insert.go | 7 +++++-- cmd/video/list.go | 6 +++++- cmd/video/rate.go | 5 ++++- cmd/video/reportAbuse.go | 5 ++++- cmd/video/update.go | 5 ++++- cmd/videoAbuseReportReason/list.go | 3 ++- cmd/watermark/set.go | 5 ++++- cmd/watermark/unset.go | 3 ++- 52 files changed, 187 insertions(+), 64 deletions(-) diff --git a/cmd/activity/activity.go b/cmd/activity/activity.go index 3a85ff1..3c50575 100644 --- a/cmd/activity/activity.go +++ b/cmd/activity/activity.go @@ -10,8 +10,8 @@ import ( ) const ( - short = "Manage YouTube activities" - long = "Manage YouTube activities. Use this tool to list channel activities." + short = "Manage activities on YouTube" + long = "Manage activities on YouTube. Use this tool to list channel activities." ciUsage = "ID of the channel" homeUsage = "true|false|null" mineUsage = "true|false|null" diff --git a/cmd/activity/list.go b/cmd/activity/list.go index f0974d2..f7af01a 100644 --- a/cmd/activity/list.go +++ b/cmd/activity/list.go @@ -21,8 +21,11 @@ const ( listTool = "activity-list" listShort = "List activities" listLong = "List activities. Use this tool when you need to list activities such as uploads, likes, and favorites." - listExample = `yutu activity list --mine + listExample = `# List my activities +yutu activity list --mine +# List activities by channel ID with limit yutu activity list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --maxResults 10 +# List activities after a date in JSON format yutu activity list --publishedAfter 2024-01-01T00:00:00Z --output json` ) diff --git a/cmd/agent/agent.go b/cmd/agent/agent.go index 6ce9977..10de613 100644 --- a/cmd/agent/agent.go +++ b/cmd/agent/agent.go @@ -24,8 +24,8 @@ import ( ) const ( - agentShort = "Start an agent to automate YouTube workflows" - agentLong = `Start an agent to automate YouTube workflows. + short = "Start an agent to automate YouTube workflows" + long = `Start an agent to automate YouTube workflows. Environment variables: YUTU_ADVANCED_MODEL Model for orchestrator agent (format: provider:modelName, e.g. google:gemini-3.1-pro-preview) @@ -49,8 +49,8 @@ var launcherArgs string var agentCmd = &cobra.Command{ Use: "agent", - Short: agentShort, - Long: agentLong, + Short: short, + Long: long, Example: example, Run: func(cmd *cobra.Command, args []string) { if launcherArgs == "" { diff --git a/cmd/caption/caption.go b/cmd/caption/caption.go index bb9e2b1..2a2f769 100644 --- a/cmd/caption/caption.go +++ b/cmd/caption/caption.go @@ -11,8 +11,8 @@ import ( ) const ( - short = "Manage YouTube captions" - long = "Manage YouTube captions. Use this tool to list, insert, update, download, or delete video captions." + short = "Manage YouTube video captions" + long = "Manage YouTube video captions. Use this tool to list, insert, update, download, or delete video captions." fileUsage = "Path to save the caption file" attUsage = "unknown|primary|commentary|descriptive" iasUsage = "Whether YouTube synchronized the caption track to the audio track in the video" diff --git a/cmd/caption/delete.go b/cmd/caption/delete.go index 5c19119..4d1e81d 100644 --- a/cmd/caption/delete.go +++ b/cmd/caption/delete.go @@ -21,7 +21,9 @@ const ( deleteIdsUsage = "IDs of the captions to delete" deleteShort = "Delete captions" deleteLong = "Delete captions. Use this tool when you need to delete captions of a video by IDs." - deleteExample = `yutu caption delete --ids abc123 + deleteExample = `# Delete a caption by ID +yutu caption delete --ids abc123 +# Delete multiple captions yutu caption delete --ids abc123,def456` ) diff --git a/cmd/caption/download.go b/cmd/caption/download.go index 840e313..53f2544 100644 --- a/cmd/caption/download.go +++ b/cmd/caption/download.go @@ -21,8 +21,11 @@ const ( downloadIdUsage = "ID of the caption to download" downloadShort = "Download a caption" downloadLong = "Download a caption. Use this tool when you need to download a caption from a video." - downloadExample = `yutu caption download --id abc123 --file subtitle.srt + downloadExample = `# Download a caption as SRT +yutu caption download --id abc123 --file subtitle.srt +# Download a caption as VTT yutu caption download --id abc123 --file subtitle.vtt --tfmt vtt +# Download a caption translated to French yutu caption download --id abc123 --file subtitle.srt --tlang fr` ) diff --git a/cmd/caption/insert.go b/cmd/caption/insert.go index 2eeef28..4086c73 100644 --- a/cmd/caption/insert.go +++ b/cmd/caption/insert.go @@ -21,8 +21,11 @@ const ( insertTool = "caption-insert" insertShort = "Insert a caption" insertLong = "Insert a caption. Use this tool when you need to insert a caption to a video." - insertExample = `yutu caption insert --file subtitle.srt --videoId dQw4w9WgXcQ + insertExample = `# Insert a caption to a video +yutu caption insert --file subtitle.srt --videoId dQw4w9WgXcQ +# Insert a caption with language and name yutu caption insert --file subtitle.srt --videoId dQw4w9WgXcQ --language en --name English +# Insert a standard caption and publish immediately yutu caption insert --file subtitle.srt --videoId dQw4w9WgXcQ --trackKind standard --isDraft=false` ) diff --git a/cmd/caption/list.go b/cmd/caption/list.go index 0ea0ead..7981c48 100644 --- a/cmd/caption/list.go +++ b/cmd/caption/list.go @@ -22,8 +22,11 @@ const ( listIdsUsage = "IDs of the captions to list" listShort = "List captions" listLong = "List captions. Use this tool when you need to list captions of a video." - listExample = `yutu caption list --videoId dQw4w9WgXcQ + listExample = `# List captions of a video +yutu caption list --videoId dQw4w9WgXcQ +# List captions in JSON format yutu caption list --videoId dQw4w9WgXcQ --output json +# List specific captions by IDs yutu caption list --ids abc123,def456 --videoId dQw4w9WgXcQ` ) diff --git a/cmd/caption/update.go b/cmd/caption/update.go index ecb57b7..edd37da 100644 --- a/cmd/caption/update.go +++ b/cmd/caption/update.go @@ -21,8 +21,11 @@ const ( updateTool = "caption-update" updateShort = "Update a video caption" updateLong = "Update a video caption. Use this tool when you need to update a video caption." - updateExample = `yutu caption update --videoId dQw4w9WgXcQ --isDraft=false + updateExample = `# Publish a draft caption +yutu caption update --videoId dQw4w9WgXcQ --isDraft=false +# Update caption language and name yutu caption update --videoId dQw4w9WgXcQ --language en --name English +# Update caption file yutu caption update --videoId dQw4w9WgXcQ --file updated.srt` ) diff --git a/cmd/channel/list.go b/cmd/channel/list.go index f4e7f00..4d2660b 100644 --- a/cmd/channel/list.go +++ b/cmd/channel/list.go @@ -22,9 +22,13 @@ const ( listIdsUsage = "Return the channels with the specified Ids" listShort = "List channel information" listLong = "List channel information. Use this tool when you need to list channel information." - listExample = `yutu channel list --mine + listExample = `# List my channel info +yutu channel list --mine +# List channel by handle yutu channel list --forHandle @GoogleDevelopers +# List channel by ID in JSON format yutu channel list --ids UC_x5XG1OV2P6uZZ5FSM9Ttw --output json +# List channels in table format yutu channel list --maxResults 10 --output table` ) diff --git a/cmd/channel/update.go b/cmd/channel/update.go index f6bbc85..f0ff086 100644 --- a/cmd/channel/update.go +++ b/cmd/channel/update.go @@ -22,8 +22,11 @@ const ( updateIdUsage = "ID of the channel to update" updateShort = "Update channel information" updateLong = "Update channel information. Use this tool when you need to update channel information." - updateExample = `yutu channel update --id UC_x5XG1OV2P6uZZ5FSM9Ttw --description 'New description' + updateExample = `# Update channel description +yutu channel update --id UC_x5XG1OV2P6uZZ5FSM9Ttw --description 'New description' +# Update channel title and country yutu channel update --id UC_x5XG1OV2P6uZZ5FSM9Ttw --title 'New Title' --country US +# Update channel default language yutu channel update --id UC_x5XG1OV2P6uZZ5FSM9Ttw --defaultLanguage en` ) diff --git a/cmd/channelBanner/insert.go b/cmd/channelBanner/insert.go index f96a4e9..8405600 100644 --- a/cmd/channelBanner/insert.go +++ b/cmd/channelBanner/insert.go @@ -19,9 +19,11 @@ import ( const ( insertTool = "channelBanner-insert" - insertShort = "Insert a YouTube channel banner" - insertLong = "Insert a YouTube channel banner. Use this tool when you need to insert or upload a channel banner." - insertExample = `yutu channelBanner insert --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --file banner.jpg + insertShort = "Insert a channel banner" + insertLong = "Insert a channel banner. Use this tool when you need to upload a channel banner." + insertExample = `# Upload a channel banner +yutu channelBanner insert --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --file banner.jpg +# Upload a channel banner with JSON output yutu channelBanner insert --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --file banner.png --output json` ) diff --git a/cmd/channelSection/delete.go b/cmd/channelSection/delete.go index 988e6b5..247b2bd 100644 --- a/cmd/channelSection/delete.go +++ b/cmd/channelSection/delete.go @@ -21,7 +21,9 @@ const ( deleteIdsUsage = "Delete the channel sections with the given ids" deleteShort = "Delete channel sections" deleteLong = "Delete channel sections. Use this tool when you need to delete channel sections by IDs." - deleteExample = `yutu channelSection delete --ids abc123 + deleteExample = `# Delete a channel section by ID +yutu channelSection delete --ids abc123 +# Delete multiple channel sections yutu channelSection delete --ids abc123,def456` ) diff --git a/cmd/channelSection/list.go b/cmd/channelSection/list.go index a03f526..e122014 100644 --- a/cmd/channelSection/list.go +++ b/cmd/channelSection/list.go @@ -22,8 +22,11 @@ const ( listIdsUsage = "Return the channel sections with the given ids" listShort = "List channel sections" listLong = "List channel sections. Use this tool when you need to list channel sections." - listExample = `yutu channelSection list --mine + listExample = `# List my channel sections +yutu channelSection list --mine +# List channel sections by channel ID yutu channelSection list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw +# List specific channel sections in JSON format yutu channelSection list --ids abc123,def456 --output json` ) diff --git a/cmd/comment/delete.go b/cmd/comment/delete.go index 91486a8..93b2f8e 100644 --- a/cmd/comment/delete.go +++ b/cmd/comment/delete.go @@ -19,7 +19,9 @@ const ( deleteTool = "comment-delete" deleteShort = "Delete comments" deleteLong = "Delete comments. Use this tool when you need to delete comments by IDs." - deleteExample = `yutu comment delete --ids abc123 + deleteExample = `# Delete a comment by ID +yutu comment delete --ids abc123 +# Delete multiple comments yutu comment delete --ids abc123,def456` ) diff --git a/cmd/comment/insert.go b/cmd/comment/insert.go index ac4fdb3..721bd7a 100644 --- a/cmd/comment/insert.go +++ b/cmd/comment/insert.go @@ -22,7 +22,9 @@ const ( insertPidUsage = "ID of the parent comment" insertShort = "Create a comment" insertLong = "Create a comment. Use this tool when you need to create a comment on a video." - insertExample = `yutu comment insert --channelId UC_x5X --videoId dQw4w9 --authorChannelId UA_x5X --parentId UgyXXX --textOriginal 'Hello' + insertExample = `# Reply to a comment +yutu comment insert --channelId UC_x5X --videoId dQw4w9 --authorChannelId UA_x5X --parentId UgyXXX --textOriginal 'Hello' +# Reply with rating enabled yutu comment insert --channelId UC_x5X --videoId dQw4w9 --authorChannelId UA_x5X --parentId UgyXXX --textOriginal 'Reply' --canRate` ) diff --git a/cmd/comment/list.go b/cmd/comment/list.go index bf72427..7468d27 100644 --- a/cmd/comment/list.go +++ b/cmd/comment/list.go @@ -22,8 +22,11 @@ const ( listPidUsage = "Returns replies to the specified comment" listShort = "List comments" listLong = "List comments. Use this tool when you need to list comments by IDs." - listExample = `yutu comment list --parentId UgyXXXXXXXX --maxResults 10 + listExample = `# List replies to a comment +yutu comment list --parentId UgyXXXXXXXX --maxResults 10 +# List specific comments in JSON format yutu comment list --ids abc123,def456 --output json +# List a comment in plain text yutu comment list --ids abc123 --textFormat plainText` ) diff --git a/cmd/comment/markAsSpam.go b/cmd/comment/markAsSpam.go index 2c5e03d..0f3f126 100644 --- a/cmd/comment/markAsSpam.go +++ b/cmd/comment/markAsSpam.go @@ -21,7 +21,9 @@ const ( masTool = "comment-markAsSpam" masShort = "Mark comments as spam" masLong = "Mark comments as spam. Use this tool when you need to mark comments as spam." - masExample = `yutu comment markAsSpam --ids abc123 + masExample = `# Mark a comment as spam +yutu comment markAsSpam --ids abc123 +# Mark multiple comments as spam yutu comment markAsSpam --ids abc123,def456` ) diff --git a/cmd/comment/setModerationStatus.go b/cmd/comment/setModerationStatus.go index 0e50cfd..4ba2514 100644 --- a/cmd/comment/setModerationStatus.go +++ b/cmd/comment/setModerationStatus.go @@ -21,8 +21,11 @@ const ( smsTool = "comment-setModerationStatus" smsShort = "Set comment moderation status" smsLong = "Set comment moderation status. Use this tool when you need to set comment moderation status." - smsExample = `yutu comment setModerationStatus --ids abc123 --moderationStatus published + smsExample = `# Publish a held comment +yutu comment setModerationStatus --ids abc123 --moderationStatus published +# Hold multiple comments for review yutu comment setModerationStatus --ids abc123,def456 --moderationStatus heldForReview +# Reject a comment and ban author yutu comment setModerationStatus --ids abc123 --moderationStatus rejected --banAuthor` ) diff --git a/cmd/comment/update.go b/cmd/comment/update.go index a1080f1..bdef7b1 100644 --- a/cmd/comment/update.go +++ b/cmd/comment/update.go @@ -22,8 +22,11 @@ const ( updateIdUsage = "ID of the comment" updateShort = "Update a comment on a video" updateLong = "Update a comment on a video. Use this tool when you need to update a comment on a video." - updateExample = `yutu comment update --id abc123 --textOriginal 'Updated comment' + updateExample = `# Update comment text +yutu comment update --id abc123 --textOriginal 'Updated comment' +# Like a comment yutu comment update --id abc123 --viewerRating like +# Update comment text with rating enabled yutu comment update --id abc123 --textOriginal 'New text' --canRate` ) diff --git a/cmd/commentThread/insert.go b/cmd/commentThread/insert.go index 3752682..e1a6828 100644 --- a/cmd/commentThread/insert.go +++ b/cmd/commentThread/insert.go @@ -22,7 +22,9 @@ const ( insertVidUsage = "ID of the video" insertShort = "Insert a new comment thread" insertLong = "Insert a new comment thread. Use this tool when you need to insert a new comment thread." - insertExample = `yutu commentThread insert --channelId UC_x5X --videoId dQw4w9WgXcQ --authorChannelId UA_x5X --textOriginal 'Great video!' + insertExample = `# Post a comment on a video +yutu commentThread insert --channelId UC_x5X --videoId dQw4w9WgXcQ --authorChannelId UA_x5X --textOriginal 'Great video!' +# Post a comment with JSON output yutu commentThread insert --channelId UC_x5X --videoId dQw4w9WgXcQ --authorChannelId UA_x5X --textOriginal 'Nice work!' --output json` ) diff --git a/cmd/commentThread/list.go b/cmd/commentThread/list.go index 1d03da2..3d1ee69 100644 --- a/cmd/commentThread/list.go +++ b/cmd/commentThread/list.go @@ -22,8 +22,11 @@ const ( listVidUsage = "Returns the comment threads of the specified video" listShort = "List comment threads" listLong = "List comment threads. Use this tool when you need to list comment threads." - listExample = `yutu commentThread list --videoId dQw4w9WgXcQ --maxResults 10 + listExample = `# List comment threads on a video +yutu commentThread list --videoId dQw4w9WgXcQ --maxResults 10 +# Search comment threads by terms yutu commentThread list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --searchTerms 'hello' +# List specific comment threads in JSON format yutu commentThread list --ids abc123,def456 --output json` ) diff --git a/cmd/member/list.go b/cmd/member/list.go index 3b6e18c..0a332d0 100644 --- a/cmd/member/list.go +++ b/cmd/member/list.go @@ -21,7 +21,9 @@ const ( listTool = "member-list" listShort = "List channel members" listLong = "List channel members. Use this tool when you need to list information about channel members." - listExample = `yutu member list --mode all_current + listExample = `# List all current members +yutu member list --mode all_current +# List members with limit yutu member list --maxResults 10` ) diff --git a/cmd/membershipsLevel/list.go b/cmd/membershipsLevel/list.go index 20f01fc..11dc3e2 100644 --- a/cmd/membershipsLevel/list.go +++ b/cmd/membershipsLevel/list.go @@ -21,7 +21,8 @@ const ( listTool = "membershipsLevel-list" listShort = "List memberships levels" listLong = "List memberships levels. Use this tool when you need to list information about channel membership levels." - listExample = "yutu membershipsLevel list --output json" + listExample = `# List membership levels in JSON format +yutu membershipsLevel list --output json` ) var listInSchema = &jsonschema.Schema{ diff --git a/cmd/playlist/delete.go b/cmd/playlist/delete.go index 4e969a8..627b1fc 100644 --- a/cmd/playlist/delete.go +++ b/cmd/playlist/delete.go @@ -21,7 +21,9 @@ const ( deleteIdsUsage = "IDs of the playlists to delete" deleteShort = "Delete playlists" deleteLong = "Delete playlists. Use this tool when you need to delete playlists by IDs." - deleteExample = `yutu playlist delete --ids PLxxxx + deleteExample = `# Delete a playlist by ID +yutu playlist delete --ids PLxxxx +# Delete multiple playlists yutu playlist delete --ids PLxxx1,PLxxx2` ) diff --git a/cmd/playlist/insert.go b/cmd/playlist/insert.go index d60cf08..5664db8 100644 --- a/cmd/playlist/insert.go +++ b/cmd/playlist/insert.go @@ -22,8 +22,11 @@ const ( insertCidUsage = "Channel id of the playlist" insertShort = "Create a new playlist" insertLong = "Create a new playlist. Use this tool when you need to create a new playlist." - insertExample = `yutu playlist insert --title 'My Playlist' --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --privacy public + insertExample = `# Create a public playlist +yutu playlist insert --title 'My Playlist' --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --privacy public +# Create a private playlist with description yutu playlist insert --title 'Tutorial Series' --channelId UC_x5X --privacy private --description 'My tutorials' +# Create an unlisted playlist with tags yutu playlist insert --title 'Music' --channelId UC_x5X --privacy unlisted --tags 'music,pop'` ) diff --git a/cmd/playlist/list.go b/cmd/playlist/list.go index 2057a66..1bf9f67 100644 --- a/cmd/playlist/list.go +++ b/cmd/playlist/list.go @@ -23,8 +23,11 @@ const ( listCidUsage = "Return the playlists owned by the specified channel id" listShort = "List playlist information" listLong = "List playlist information. Use this tool when you need to list playlist information." - listExample = `yutu playlist list --mine + listExample = `# List my playlists +yutu playlist list --mine +# List playlists by channel ID with limit yutu playlist list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --maxResults 10 +# List specific playlists in JSON format yutu playlist list --ids PLxxx1,PLxxx2 --output json` ) diff --git a/cmd/playlist/update.go b/cmd/playlist/update.go index f9eb4a2..02f763e 100644 --- a/cmd/playlist/update.go +++ b/cmd/playlist/update.go @@ -22,8 +22,11 @@ const ( updateIdUsage = "ID of the playlist to update" updateShort = "Update a playlist" updateLong = "Update a playlist. Use this tool when you need to update a playlist." - updateExample = `yutu playlist update --id PLxxx --title 'Updated Title' + updateExample = `# Update playlist title +yutu playlist update --id PLxxx --title 'Updated Title' +# Update playlist description and privacy yutu playlist update --id PLxxx --description 'New description' --privacy public +# Update playlist tags yutu playlist update --id PLxxx --tags 'music,pop,2024'` ) diff --git a/cmd/playlistImage/delete.go b/cmd/playlistImage/delete.go index d75b33b..97e4db2 100644 --- a/cmd/playlistImage/delete.go +++ b/cmd/playlistImage/delete.go @@ -20,7 +20,9 @@ const ( deleteTool = "playlistImage-delete" deleteShort = "Delete playlist images" deleteLong = "Delete playlist images. Use this tool when you need to delete playlist images by IDs." - deleteExample = `yutu playlistImage delete --ids abc123 + deleteExample = `# Delete a playlist image by ID +yutu playlistImage delete --ids abc123 +# Delete multiple playlist images yutu playlistImage delete --ids abc123,def456` ) diff --git a/cmd/playlistImage/insert.go b/cmd/playlistImage/insert.go index 3cbf725..d8fa04e 100644 --- a/cmd/playlistImage/insert.go +++ b/cmd/playlistImage/insert.go @@ -19,10 +19,13 @@ import ( const ( insertTool = "playlistImage-insert" - insertShort = "Insert a YouTube playlist image" - insertLong = "Insert a YouTube playlist image. Use this tool when you need to insert a YouTube playlist image for a given playlist ID." - insertExample = `yutu playlistImage insert --file cover.jpg --playlistId PLxxx + insertShort = "Insert a playlist image" + insertLong = "Insert a playlist image. Use this tool when you need to insert a YouTube playlist image for a given playlist ID." + insertExample = `# Insert a playlist cover image +yutu playlistImage insert --file cover.jpg --playlistId PLxxx +# Insert a hero image yutu playlistImage insert --file cover.png --playlistId PLxxx --type hero +# Insert an image with custom dimensions yutu playlistImage insert --file cover.jpg --playlistId PLxxx --width 2048 --height 1152` ) diff --git a/cmd/playlistImage/list.go b/cmd/playlistImage/list.go index df45776..430758e 100644 --- a/cmd/playlistImage/list.go +++ b/cmd/playlistImage/list.go @@ -21,7 +21,9 @@ const ( listTool = "playlistImage-list" listShort = "List playlist images" listLong = "List playlist images. Use this tool when you need to list playlist images." - listExample = `yutu playlistImage list --parent PLxxx + listExample = `# List images of a playlist +yutu playlistImage list --parent PLxxx +# List playlist images with limit in JSON format yutu playlistImage list --parent PLxxx --maxResults 10 --output json` ) diff --git a/cmd/playlistImage/update.go b/cmd/playlistImage/update.go index 10db4b7..89cbd4d 100644 --- a/cmd/playlistImage/update.go +++ b/cmd/playlistImage/update.go @@ -21,7 +21,8 @@ const ( updateTool = "playlistImage-update" updateShort = "Update a playlist image" updateLong = "Update a playlist image. Use this tool when you need to update a playlist image." - updateExample = "yutu playlistImage update --playlistId PLxxx --type hero --width 2048 --height 1152" + updateExample = `# Update a playlist image +yutu playlistImage update --playlistId PLxxx --type hero --width 2048 --height 1152` ) var updateInSchema = &jsonschema.Schema{ diff --git a/cmd/playlistItem/delete.go b/cmd/playlistItem/delete.go index 2c59eef..1f2140f 100644 --- a/cmd/playlistItem/delete.go +++ b/cmd/playlistItem/delete.go @@ -21,7 +21,9 @@ const ( deleteIdsUsage = "IDs of the playlist items to delete" deleteShort = "Delete items from a playlist" deleteLong = "Delete items from a playlist. Use this tool when you need to delete items from a playlist by IDs." - deleteExample = `yutu playlistItem delete --ids abc123 + deleteExample = `# Delete a playlist item by ID +yutu playlistItem delete --ids abc123 +# Delete multiple playlist items yutu playlistItem delete --ids abc123,def456` ) diff --git a/cmd/playlistItem/insert.go b/cmd/playlistItem/insert.go index 375456a..45340b8 100644 --- a/cmd/playlistItem/insert.go +++ b/cmd/playlistItem/insert.go @@ -22,7 +22,9 @@ const ( insertPidUsage = "The id that YouTube uses to uniquely identify the playlist that the item is in" insertShort = "Insert a playlist item into a playlist" insertLong = "Insert a playlist item into a playlist. Use this tool when you need to insert a playlist item into a playlist." - insertExample = `yutu playlistItem insert --kind video --playlistId PLxxx --channelId UC_x5X --kVideoId dQw4w9WgXcQ + insertExample = `# Add a video to a playlist +yutu playlistItem insert --kind video --playlistId PLxxx --channelId UC_x5X --kVideoId dQw4w9WgXcQ +# Add a video to a playlist with privacy setting yutu playlistItem insert --kind video --playlistId PLxxx --channelId UC_x5X --kVideoId dQw4w9 --privacy public` ) diff --git a/cmd/playlistItem/list.go b/cmd/playlistItem/list.go index 4e4e8c3..ca9bbf5 100644 --- a/cmd/playlistItem/list.go +++ b/cmd/playlistItem/list.go @@ -23,8 +23,11 @@ const ( listPidUsage = "Return the playlist items within the given playlist" listShort = "List playlist items" listLong = "List playlist items. Use this tool when you need to list playlist items." - listExample = `yutu playlistItem list --playlistId PLxxx + listExample = `# List items in a playlist +yutu playlistItem list --playlistId PLxxx +# List playlist items with limit in JSON format yutu playlistItem list --playlistId PLxxx --maxResults 20 --output json +# List specific playlist items by IDs yutu playlistItem list --ids abc123,def456` ) diff --git a/cmd/playlistItem/update.go b/cmd/playlistItem/update.go index f0cb43c..7463aef 100644 --- a/cmd/playlistItem/update.go +++ b/cmd/playlistItem/update.go @@ -22,8 +22,11 @@ const ( updateIdUsage = "ID of the playlist item to update" updateShort = "Update a playlist item" updateLong = "Update a playlist item. Use this tool when you need to update a playlist item." - updateExample = `yutu playlistItem update --id abc123 --title 'Updated Title' + updateExample = `# Update playlist item title +yutu playlistItem update --id abc123 --title 'Updated Title' +# Update playlist item description and privacy yutu playlistItem update --id abc123 --description 'New description' --privacy public +# Update playlist item privacy with JSON output yutu playlistItem update --id abc123 --privacy private --output json` ) diff --git a/cmd/search/list.go b/cmd/search/list.go index b1bc877..0b20c62 100644 --- a/cmd/search/list.go +++ b/cmd/search/list.go @@ -21,9 +21,13 @@ const ( listTool = "search-list" listShort = "Search resources" listLong = "Search resources. Use this tool when you need to search for videos, channels, playlists, and other resources." - listExample = `yutu search list --q 'golang tutorial' --maxResults 10 + listExample = `# Search for videos by keyword +yutu search list --q 'golang tutorial' --maxResults 10 +# Search videos by duration in JSON format yutu search list --q 'music' --types video --videoDuration medium --output json +# List latest videos from a channel yutu search list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --order date --maxResults 5 +# Search for live streams yutu search list --q 'live coding' --eventType live --types video` ) diff --git a/cmd/subscription/delete.go b/cmd/subscription/delete.go index e4ad17d..411df5e 100644 --- a/cmd/subscription/delete.go +++ b/cmd/subscription/delete.go @@ -20,7 +20,9 @@ const ( deleteIdsUsage = "IDs of the subscriptions to delete" deleteShort = "Delete subscriptions" deleteLong = "Delete subscriptions. Use this tool when you need to delete subscriptions by IDs." - deleteExample = `yutu subscription delete --ids abc123 + deleteExample = `# Delete a subscription by ID +yutu subscription delete --ids abc123 +# Delete multiple subscriptions yutu subscription delete --ids abc123,def456` ) diff --git a/cmd/subscription/insert.go b/cmd/subscription/insert.go index 1c1619b..c091190 100644 --- a/cmd/subscription/insert.go +++ b/cmd/subscription/insert.go @@ -20,9 +20,11 @@ import ( const ( insertTool = "subscription-insert" insertCidUsage = "ID of the channel to be subscribed" - insertShort = "Insert a YouTube subscription" - insertLong = "Insert a YouTube subscription. Use this tool when you need to insert a YouTube subscription." - insertExample = `yutu subscription insert --subscriberChannelId UC_abc --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw + insertShort = "Insert a new subscription" + insertLong = "Insert a new subscription. Use this tool when you need to insert a new subscription." + insertExample = `# Subscribe to a channel +yutu subscription insert --subscriberChannelId UC_abc --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw +# Subscribe with a title yutu subscription insert --subscriberChannelId UC_abc --channelId UC_x5X --title 'Google Developers'` ) diff --git a/cmd/subscription/list.go b/cmd/subscription/list.go index af96daf..72ab204 100644 --- a/cmd/subscription/list.go +++ b/cmd/subscription/list.go @@ -23,9 +23,13 @@ const ( listCidUsage = "Return the subscriptions of the given channel owner" listShort = "List subscription information" listLong = "List subscription information. Use this tool when you need to list subscription information." - listExample = `yutu subscription list --mine + listExample = `# List my subscriptions +yutu subscription list --mine +# List subscriptions by channel ID with limit yutu subscription list --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --maxResults 10 +# List specific subscriptions in JSON format yutu subscription list --ids abc123,def456 --output json +# List subscriptions for a channel alphabetically yutu subscription list --forChannelId UC_x5XG1OV2P6uZZ5FSM9Ttw --order alphabetical` ) diff --git a/cmd/superChatEvent/list.go b/cmd/superChatEvent/list.go index ad8c2c1..c3f1c00 100644 --- a/cmd/superChatEvent/list.go +++ b/cmd/superChatEvent/list.go @@ -21,7 +21,8 @@ const ( listTool = "superChatEvent-list" listShort = "List Super Chat events" listLong = "List Super Chat events. Use this tool when you need to list Super Chat events." - listExample = "yutu superChatEvent list --maxResults 10" + listExample = `# List Super Chat events +yutu superChatEvent list --maxResults 10` ) var listInSchema = &jsonschema.Schema{ diff --git a/cmd/thumbnail/set.go b/cmd/thumbnail/set.go index 0dc775e..bc8eee2 100644 --- a/cmd/thumbnail/set.go +++ b/cmd/thumbnail/set.go @@ -21,7 +21,9 @@ const ( setTool = "thumbnail-set" setShort = "Set a thumbnail for a video" setLong = "Set a thumbnail for a video. Use this tool when you need to set a thumbnail for a video." - setExample = `yutu thumbnail set --file image.jpg --videoId dQw4w9WgXcQ + setExample = `# Set a thumbnail for a video +yutu thumbnail set --file image.jpg --videoId dQw4w9WgXcQ +# Set a thumbnail with JSON output yutu thumbnail set --file image.png --videoId dQw4w9WgXcQ --output json` ) diff --git a/cmd/video/delete.go b/cmd/video/delete.go index 8e5345f..0854809 100644 --- a/cmd/video/delete.go +++ b/cmd/video/delete.go @@ -20,7 +20,9 @@ const ( deleteIdsUsage = "IDs of the videos to delete" deleteShort = "Delete videos" deleteLong = "Delete videos. Use this tool when you need to delete videos by IDs." - deleteExample = `yutu video delete --ids dQw4w9WgXcQ + deleteExample = `# Delete a video by ID +yutu video delete --ids dQw4w9WgXcQ +# Delete multiple videos yutu video delete --ids dQw4w9WgXcQ,abc123` ) diff --git a/cmd/video/getRating.go b/cmd/video/getRating.go index 6af05bb..0b67e69 100644 --- a/cmd/video/getRating.go +++ b/cmd/video/getRating.go @@ -22,7 +22,9 @@ const ( grIdsUsage = "IDs of the videos to get the rating for" getRatingShort = "Get video ratings" getRatingLong = "Get video ratings. Use this tool when you need to get video ratings by IDs." - getRatingExample = `yutu video getRating --ids dQw4w9WgXcQ + getRatingExample = `# Get rating of a video +yutu video getRating --ids dQw4w9WgXcQ +# Get ratings of multiple videos in JSON format yutu video getRating --ids dQw4w9WgXcQ,abc123 --output json` ) diff --git a/cmd/video/insert.go b/cmd/video/insert.go index e3a6367..f40ff01 100644 --- a/cmd/video/insert.go +++ b/cmd/video/insert.go @@ -21,9 +21,12 @@ const ( insertTool = "video-insert" insertLangUsage = "Language of the video" insertShort = "Upload a video" - insertLong = "Upload a video. Use this tool when you need to upload a video to YouTube." - insertExample = `yutu video insert --file video.mp4 --title 'My Video' --categoryId 22 --privacy public + insertLong = "Upload a video. Use this tool when you need to upload a video." + insertExample = `# Upload a public video +yutu video insert --file video.mp4 --title 'My Video' --categoryId 22 --privacy public +# Upload a private video with tags yutu video insert --file video.mp4 --title 'Tutorial' --categoryId 27 --privacy private --tags 'go,tutorial' +# Upload an unlisted video with custom thumbnail yutu video insert --file video.mp4 --title 'Music Video' --categoryId 10 --privacy unlisted --thumbnail cover.jpg` ) diff --git a/cmd/video/list.go b/cmd/video/list.go index 3639d2c..6a7df85 100644 --- a/cmd/video/list.go +++ b/cmd/video/list.go @@ -23,9 +23,13 @@ const ( listMrUsage = "Return videos liked/disliked by the authenticated user" listShort = "List video information" listLong = "List video information. Use this tool when you need to list video information." - listExample = `yutu video list --ids dQw4w9WgXcQ + listExample = `# List a video by ID +yutu video list --ids dQw4w9WgXcQ +# List multiple videos in JSON format yutu video list --ids dQw4w9WgXcQ,abc123 --output json +# List most popular videos by region yutu video list --chart mostPopular --regionCode US --maxResults 10 +# List my liked videos yutu video list --myRating like --output yaml` ) diff --git a/cmd/video/rate.go b/cmd/video/rate.go index 7ffa918..36a12b5 100644 --- a/cmd/video/rate.go +++ b/cmd/video/rate.go @@ -21,8 +21,11 @@ const ( rateRUsage = "like|dislike|none" rateShort = "Rate a video" rateLong = "Rate a video. Use this tool when you need to rate a video." - rateExample = `yutu video rate --ids dQw4w9WgXcQ --rating like + rateExample = `# Like a video +yutu video rate --ids dQw4w9WgXcQ --rating like +# Dislike multiple videos yutu video rate --ids dQw4w9WgXcQ,abc123 --rating dislike +# Remove rating from a video yutu video rate --ids dQw4w9WgXcQ --rating none` ) diff --git a/cmd/video/reportAbuse.go b/cmd/video/reportAbuse.go index 6b26246..7593675 100644 --- a/cmd/video/reportAbuse.go +++ b/cmd/video/reportAbuse.go @@ -22,8 +22,11 @@ const ( raLangUsage = "Language that the content was viewed in" reportAbuseShort = "Report abuse on a video" reportAbuseLong = "Report abuse on a video. Use this tool when you need to report abuse on a video." - reportAbuseExample = `yutu video reportAbuse --ids dQw4w9WgXcQ --reasonId V + reportAbuseExample = `# Report abuse on a video +yutu video reportAbuse --ids dQw4w9WgXcQ --reasonId V +# Report abuse with secondary reason and language yutu video reportAbuse --ids dQw4w9WgXcQ --reasonId V --secondaryReasonId V1 --language en +# Report abuse with comments yutu video reportAbuse --ids dQw4w9WgXcQ --reasonId N --comments 'Spam content'` ) diff --git a/cmd/video/update.go b/cmd/video/update.go index 768622e..ff02855 100644 --- a/cmd/video/update.go +++ b/cmd/video/update.go @@ -23,8 +23,11 @@ const ( updateLangUsage = "Language of the video" updateShort = "Update a video" updateLong = "Update a video. Use this tool when you need to update a video." - updateExample = `yutu video update --id dQw4w9WgXcQ --title 'New Title' + updateExample = `# Update video title +yutu video update --id dQw4w9WgXcQ --title 'New Title' +# Update video description and privacy yutu video update --id dQw4w9WgXcQ --description 'Updated description' --privacy public +# Update video tags and category yutu video update --id dQw4w9WgXcQ --tags 'music,pop,2024' --categoryId 10` ) diff --git a/cmd/videoAbuseReportReason/list.go b/cmd/videoAbuseReportReason/list.go index b6d09eb..05ce0ed 100644 --- a/cmd/videoAbuseReportReason/list.go +++ b/cmd/videoAbuseReportReason/list.go @@ -21,7 +21,8 @@ const ( listTool = "videoAbuseReportReason-list" listShort = "List video abuse report reasons" listLong = "List video abuse report reasons. Use this tool when you need to list available abuse report reasons." - listExample = "yutu videoAbuseReportReason list --hl en" + listExample = `# List video abuse report reasons +yutu videoAbuseReportReason list --hl en` ) var listInSchema = &jsonschema.Schema{ diff --git a/cmd/watermark/set.go b/cmd/watermark/set.go index 685bd70..035525e 100644 --- a/cmd/watermark/set.go +++ b/cmd/watermark/set.go @@ -20,8 +20,11 @@ const ( setTool = "watermark-set" setShort = "Set a watermark for channel's videos" setLong = "Set a watermark for channel's videos. Use this tool when you need to set a watermark for channel's videos." - setExample = `yutu watermark set --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --file watermark.png + setExample = `# Set a watermark for a channel +yutu watermark set --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw --file watermark.png +# Set a watermark with position and offset yutu watermark set --channelId UC_x5X --file logo.png --inVideoPosition bottomRight --offsetType offsetFromEnd --offsetMs 1000 +# Set a watermark with duration yutu watermark set --channelId UC_x5X --file logo.png --durationMs 5000 --offsetMs 2000` ) diff --git a/cmd/watermark/unset.go b/cmd/watermark/unset.go index 678e50d..5536454 100644 --- a/cmd/watermark/unset.go +++ b/cmd/watermark/unset.go @@ -19,7 +19,8 @@ const ( unsetTool = "watermark-unset" unsetShort = "Unset a watermark for channel's videos" unsetLong = "Unset a watermark for channel's videos. Use this tool when you need to unset a watermark for a channel's videos." - unsetExample = "yutu watermark unset --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw" + unsetExample = `# Unset watermark for a channel +yutu watermark unset --channelId UC_x5XG1OV2P6uZZ5FSM9Ttw` ) var unsetInSchema = &jsonschema.Schema{