feat: add docs search to the cloud provider CLIs

All three providers render their own docs search client-side, so
distilling the search page yields only nav chrome. Microsoft Learn is
the exception underneath: its public RSS search endpoint serves real
results as a feed, which the engine already renders (same route as
Stack Overflow). AWS and Google Cloud expose search only as JSON (#3),
so until the engine renders JSON their search goes through DuckDuckGo
HTML with a baked-in site: filter, the same endpoint the duckduckgo.com
CLI already relies on. Bing was tried first for that job and rejected:
it silently drops the site: operator on some queries.

Verified live: the Learn RSS endpoint returns titled results for
"app service deploy"; the DuckDuckGo route returns real
docs.aws.amazon.com pages for "lambda timeout" (it can answer with a
rate-limit challenge under rapid-fire automated use, noted in README).
This commit is contained in:
only-cli
2026-08-22 12:29:56 -04:00
parent 5e7f54c4bb
commit e8f2b6172d
4 changed files with 10 additions and 7 deletions
+4 -4
View File
@@ -87,11 +87,11 @@ Works on any mostly-static site with no per-site setup: news sites, blogs, docum
| Stack Overflow | stackoverflow.com (via Atom feeds) | `question <id>`, `tag <name>`, `user <id>`, `recent` |
| Yahoo Finance | finance.yahoo.com | `quote <symbol>`, `news <symbol>`, `history <symbol>`, `lookup <query>`, `markets`, `gainers`, `losers`, `trending` |
| YouTube | youtube.com | `video <id>`, `channel <name>` |
| AWS docs | docs.aws.amazon.com | `guide <service> <page>`, `page <service> <guide> <page>`, `cli <command>` |
| Google Cloud docs | cloud.google.com (via docs.cloud.google.com) | `docs <product>`, `page <product> <page>`, `gcloud <command>` |
| Microsoft Learn | learn.microsoft.com | `azure <page>`, `doc <path>`, `cli <command>` |
| AWS docs | docs.aws.amazon.com (search via DuckDuckGo) | `guide <service> <page>`, `page <service> <guide> <page>`, `cli <command>`, `search <query>` |
| Google Cloud docs | cloud.google.com (via docs.cloud.google.com, search via DuckDuckGo) | `docs <product>`, `page <product> <page>`, `gcloud <command>`, `search <query>` |
| Microsoft Learn | learn.microsoft.com (search via its RSS API) | `azure <page>`, `doc <path>`, `cli <command>`, `search <query>` |
A few of these (X, Stack Overflow, YouTube) read pages that look login-gated or JS-only from the outside, by finding the server-rendered HTML, feed, or inline data the page already ships without a login. Not supported yet: pages that only render with JavaScript, sites behind logins, and sites with hard bot challenges that expose no feed.
A few of these (X, Stack Overflow, YouTube, Microsoft Learn search) read pages that look login-gated or JS-only from the outside, by finding the server-rendered HTML, feed, or inline data the page already ships without a login. AWS and Google Cloud render docs search purely client-side with no feed, so their `search` goes through DuckDuckGo with a baked-in `site:` filter instead. Not supported yet: pages that only render with JavaScript, sites behind logins, and sites with hard bot challenges that expose no feed.
Want a website on that list? Open a pull request, or an issue naming the site — see [CONTRIBUTING.md](CONTRIBUTING.md).
+2 -1
View File
@@ -3,6 +3,7 @@
"commands": {
"docs": { "open": "https://docs.cloud.google.com/{product}/docs", "args": ["product"] },
"page": { "open": "https://docs.cloud.google.com/{product}/docs/{page}", "args": ["product", "page"] },
"gcloud": { "open": "https://docs.cloud.google.com/sdk/gcloud/reference/{command}", "args": ["command"] }
"gcloud": { "open": "https://docs.cloud.google.com/sdk/gcloud/reference/{command}", "args": ["command"] },
"search": { "open": "https://html.duckduckgo.com/html/?q=site%3Acloud.google.com+{query}", "args": ["query"] }
}
}
+2 -1
View File
@@ -3,6 +3,7 @@
"commands": {
"guide": { "open": "https://docs.aws.amazon.com/{service}/latest/userguide/{page}.html", "args": ["service", "page"] },
"page": { "open": "https://docs.aws.amazon.com/{service}/latest/{guide}/{page}.html", "args": ["service", "guide", "page"] },
"cli": { "open": "https://docs.aws.amazon.com/cli/latest/reference/{command}/", "args": ["command"] }
"cli": { "open": "https://docs.aws.amazon.com/cli/latest/reference/{command}/", "args": ["command"] },
"search": { "open": "https://html.duckduckgo.com/html/?q=site%3Adocs.aws.amazon.com+{query}", "args": ["query"] }
}
}
+2 -1
View File
@@ -3,6 +3,7 @@
"commands": {
"azure": { "open": "https://learn.microsoft.com/en-us/azure/{page}", "args": ["page"] },
"doc": { "open": "https://learn.microsoft.com/en-us/{path}", "args": ["path"] },
"cli": { "open": "https://learn.microsoft.com/en-us/cli/azure/{command}", "args": ["command"] }
"cli": { "open": "https://learn.microsoft.com/en-us/cli/azure/{command}", "args": ["command"] },
"search": { "open": "https://learn.microsoft.com/api/search/rss?search={query}&locale=en-us", "args": ["query"] }
}
}