You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds `gog youtube search list` / `gog yt search ls` for YouTube Data API search across videos, channels, and playlists, with table/JSON output and generated command docs.
Maintainer fixups: rebased onto current main, reused the shared YouTube read-service selector so `--account`/`--account auto` use OAuth while public reads can still use API keys, added `videoCount` ordering support per YouTube `search.list`, added focused unit coverage, and updated the changelog.
Proof:
- `go test ./internal/cmd -run 'TestYouTube'`
- `make ci`
- Autoreview clean: no accepted/actionable findings after fixups
- Live OAuth proof with `clawdbot@gmail.com`: `GOG_YOUTUBE_API_KEY=definitely-invalid ./bin/gog --account clawdbot@gmail.com --json youtube search list "openclaw" --type video --order relevance --max 2` returned 2 items, proving account OAuth won over the invalid API key
- GitHub CI green: ci/test, ci/worker, ci/windows, ci/darwin-cgo-build, docker/image
Co-authored-by: Siddhartha Varma <39856034+BRO3886@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
- Docs: add `docs cell-update` for non-destructive table-cell content replacement by table, row, and column. (#646)
15
15
- Gmail: pause watch push Gmail API fetches per account while a 429 Retry-After circuit is open. (#643)
16
16
- YouTube: let `videos list` and `comments list` use OAuth when `--account` is supplied, preserving the API-key fallback for unauthenticated public reads. (#664)
17
+
- YouTube: add `youtube search list` / `yt search ls` for YouTube Data API search across videos, channels, and playlists. (#650, #651) — thanks @BRO3886.
17
18
- Docs: update the bundled `gog` agent skill to preserve broad user OAuth scopes during reauth and rely on command guards for scoped execution.
Copy file name to clipboardExpand all lines: docs/commands.generated.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -561,7 +561,7 @@ Generated from `gog schema --json`.
561
561
-[`gog upload (up,put) <localPath> [flags]`](commands/gog-upload.md) - Upload a file to Drive (alias for 'drive upload')
562
562
-[`gog version [flags]`](commands/gog-version.md) - Print version
563
563
-[`gog whoami (who-am-i) [flags]`](commands/gog-whoami.md) - Show your profile (alias for 'people me')
564
-
-[`gog youtube (yt) <command> [flags]`](commands/gog-youtube.md) - YouTube Data API (activities, videos, playlists, comments, channels)
564
+
-[`gog youtube (yt) <command> [flags]`](commands/gog-youtube.md) - YouTube Data API (search, activities, videos, playlists, comments, channels)
565
565
-[`gog youtube (yt) activities (activity) <command>`](commands/gog-youtube-activities.md) - List channel activities
566
566
-[`gog youtube (yt) activities (activity) list (ls) [flags]`](commands/gog-youtube-activities-list.md) - List activities for a channel (or authenticated user)
567
567
-[`gog youtube (yt) channels (channel) <command>`](commands/gog-youtube-channels.md) - List channels
@@ -570,6 +570,8 @@ Generated from `gog schema --json`.
570
570
-[`gog youtube (yt) comments (comment) list (ls) [flags]`](commands/gog-youtube-comments-list.md) - List comment threads for a video or channel
571
571
-[`gog youtube (yt) playlists (playlist) <command>`](commands/gog-youtube-playlists.md) - List playlists
572
572
-[`gog youtube (yt) playlists (playlist) list (ls) [flags]`](commands/gog-youtube-playlists-list.md) - List playlists by channel or authenticated user
573
+
-[`gog youtube (yt) search (find) <command>`](commands/gog-youtube-search.md) - Search YouTube for videos, channels, or playlists
574
+
-[`gog youtube (yt) search (find) list (ls) <query> [flags]`](commands/gog-youtube-search-list.md) - Search for videos, channels, or playlists
573
575
-[`gog youtube (yt) videos (video) <command>`](commands/gog-youtube-videos.md) - List or get videos
574
576
-[`gog youtube (yt) videos (video) list (ls) [flags]`](commands/gog-youtube-videos-list.md) - List videos by ID or chart
Copy file name to clipboardExpand all lines: docs/commands/README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Every `gog` command has a generated docs page. The source of truth is the live CLI schema; run `make docs-commands` after changing command names, flags, help text, aliases, or arguments.
4
4
5
-
Generated pages: 574.
5
+
Generated pages: 576.
6
6
7
7
## Top-level Commands
8
8
@@ -48,7 +48,7 @@ Generated pages: 574.
48
48
-[gog upload](gog-upload.md) - Upload a file to Drive (alias for 'drive upload')
49
49
-[gog version](gog-version.md) - Print version
50
50
-[gog whoami](gog-whoami.md) - Show your profile (alias for 'people me')
51
-
-[gog youtube](gog-youtube.md) - YouTube Data API (activities, videos, playlists, comments, channels)
51
+
-[gog youtube](gog-youtube.md) - YouTube Data API (search, activities, videos, playlists, comments, channels)
52
52
-[gog zoom](gog-zoom.md) - Zoom
53
53
54
54
## All Commands
@@ -612,7 +612,7 @@ Generated pages: 574.
612
612
-[gog upload](gog-upload.md) - Upload a file to Drive (alias for 'drive upload')
613
613
-[gog version](gog-version.md) - Print version
614
614
-[gog whoami](gog-whoami.md) - Show your profile (alias for 'people me')
615
-
-[gog youtube](gog-youtube.md) - YouTube Data API (activities, videos, playlists, comments, channels)
615
+
-[gog youtube](gog-youtube.md) - YouTube Data API (search, activities, videos, playlists, comments, channels)
616
616
-[gog youtube activities](gog-youtube-activities.md) - List channel activities
617
617
-[gog youtube activities list](gog-youtube-activities-list.md) - List activities for a channel (or authenticated user)
618
618
-[gog youtube channels](gog-youtube-channels.md) - List channels
@@ -621,6 +621,8 @@ Generated pages: 574.
621
621
-[gog youtube comments list](gog-youtube-comments-list.md) - List comment threads for a video or channel
622
622
-[gog youtube playlists](gog-youtube-playlists.md) - List playlists
623
623
-[gog youtube playlists list](gog-youtube-playlists-list.md) - List playlists by channel or authenticated user
624
+
-[gog youtube search](gog-youtube-search.md) - Search YouTube for videos, channels, or playlists
625
+
-[gog youtube search list](gog-youtube-search-list.md) - Search for videos, channels, or playlists
624
626
-[gog youtube videos](gog-youtube-videos.md) - List or get videos
625
627
-[gog youtube videos list](gog-youtube-videos-list.md) - List videos by ID or chart
> Generated from `gog schema --json`. Do not edit this page by hand; run `make docs-commands`.
4
+
5
+
Search for videos, channels, or playlists
6
+
7
+
## Usage
8
+
9
+
```bash
10
+
gog youtube (yt) search (find) list (ls) <query> [flags]
11
+
```
12
+
13
+
## Parent
14
+
15
+
-[gog youtube search](gog-youtube-search.md)
16
+
17
+
## Flags
18
+
19
+
| Flag | Type | Default | Help |
20
+
| --- | --- | --- | --- |
21
+
|`--access-token`|`string`|| Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) |
22
+
|`-a`<br>`--account`<br>`--acct`|`string`|| Account email for API commands (gmail/calendar/chat/classroom/drive/drivelabels/docs/slides/contacts/tasks/people/sheets/forms/sites/appscript/analytics/searchconsole/ads/photos) |
23
+
|`--channel-id`|`string`|| Restrict results to a specific channel |
|`-p`<br>`--plain`<br>`--tsv`|`bool`| false | Output stable, parseable text to stdout (TSV; no colors) |
40
+
|`--results-only`|`bool`|| In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
41
+
|`--select`<br>`--pick`<br>`--project`|`string`|| In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
42
+
|`--type`|`string`| video | Resource type: video, channel, playlist (comma-separated) |
> Generated from `gog schema --json`. Do not edit this page by hand; run `make docs-commands`.
4
+
5
+
Search YouTube for videos, channels, or playlists
6
+
7
+
## Usage
8
+
9
+
```bash
10
+
gog youtube (yt) search (find) <command>
11
+
```
12
+
13
+
## Parent
14
+
15
+
-[gog youtube](gog-youtube.md)
16
+
17
+
## Subcommands
18
+
19
+
-[gog youtube search list](gog-youtube-search-list.md) - Search for videos, channels, or playlists
20
+
21
+
## Flags
22
+
23
+
| Flag | Type | Default | Help |
24
+
| --- | --- | --- | --- |
25
+
|`--access-token`|`string`|| Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) |
26
+
|`-a`<br>`--account`<br>`--acct`|`string`|| Account email for API commands (gmail/calendar/chat/classroom/drive/drivelabels/docs/slides/contacts/tasks/people/sheets/forms/sites/appscript/analytics/searchconsole/ads/photos) |
|`-h`<br>`--help`|`kong.helpFlag`|| Show context-sensitive help. |
36
+
|`--home`|`string`|| Override gogcli config/data/state/cache root (equivalent to GOG_HOME) |
37
+
|`-j`<br>`--json`<br>`--machine`|`bool`| false | Output JSON to stdout (best for scripting) |
38
+
|`--no-input`<br>`--non-interactive`<br>`--noninteractive`|`bool`|| Never prompt; fail instead (useful for CI) |
39
+
|`-p`<br>`--plain`<br>`--tsv`|`bool`| false | Output stable, parseable text to stdout (TSV; no colors) |
40
+
|`--results-only`|`bool`|| In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
41
+
|`--select`<br>`--pick`<br>`--project`|`string`|| In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
0 commit comments