Skip to content

feat: add a docs get command that prints a docs page - #758

Open
mwbrooks wants to merge 3 commits into
mainfrom
mwbrooks-docs-get
Open

mwbrooks wants to merge 3 commits into
mainfrom
mwbrooks-docs-get

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changelog

New slack docs get <page> command prints a Slack developer docs page as markdown, returns it as JSON with --output=json, or opens it with --output=browser.

Summary

This pull request adds slack docs get <page> to increase how much coding agents use the slack docs command. Today an agent can search with slack docs search, but it has to leave the CLI to read the page it found. With get, it can search and read the docs without leaving the CLI.

Reading is most of what agents do with the docs. Over 28 days, coding agents read .md pages about 46,000 times, against about 3,000 searches through the CLI.

$ slack docs search "socket mode" --category=javascript --limit=1
...
Using Socket Mode
   https://docs.slack.dev/tools/bolt-js/concepts/socket-mode.md

$ slack docs get https://docs.slack.dev/tools/bolt-js/concepts/socket-mode.md
---
title: "Using Socket Mode"
...
  • The page can be a path or a full docs.slack.dev URL, with or without .md or an anchor, so a search result link works as-is. Other hosts are refused.
  • --output takes text (the default, raw markdown), json (url, markdown_url, content), or browser, matching docs search.
  • Generated SDK reference pages ending in .html have no markdown version, so they error with a hint to use --output=browser.

Testing

  • Run slack docs get /tools/bolt-js/concepts/socket-mode and confirm it prints the page's markdown.
  • Pass a link from slack docs search to slack docs get, then try --output=json and --output=browser.
  • Run slack docs get /no-such-page and slack docs get https://example.com/x and confirm each error names the problem.

Notes

  • Page reads through the CLI carry its User-Agent, so for the first time we can measure how often agents read the docs through slack docs.
  • buildDocsSearchRequest is renamed to buildDocsRequest, since search and get both use it.

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Nov 6, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Nov 6, 2026
@mwbrooks mwbrooks self-assigned this Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.39623% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.52%. Comparing base (4d8f832) to head (90a4188).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/docs/get.go 95.23% 4 Missing ⚠️
internal/api/docs.go 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
+ Coverage   78.45%   78.52%   +0.06%     
==========================================
  Files         240      241       +1     
  Lines       18193    18302     +109     
==========================================
+ Hits        14274    14372      +98     
- Misses       3919     3930      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
mwbrooks marked this pull request as ready for review November 6, 2026 21:30
@mwbrooks
mwbrooks requested review from a team as code owners November 6, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant