Skip to content

feat(docs): Help Scout Docs API — read commands (0.9) - #5

Merged
wavyx merged 9 commits into
mainfrom
feat/docs-api
Jun 4, 2026
Merged

feat(docs): Help Scout Docs API — read commands (0.9)#5
wavyx merged 9 commits into
mainfrom
feat/docs-api

Conversation

@wavyx

@wavyx wavyx commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Adds the Docs API surface (separate Help Scout product, separate per-user API key).

Commands (read-focused)

  • hscli docs auth — validate (read-only) + store the Docs key in the OS keychain (or HSCLI_DOCS_API_KEY).
  • docs site list/get, docs collection list/get, docs category list.
  • docs article list (--collection/--category, --status), docs article get, docs article search.

Design

  • docs-client: HTTP Basic auth (key:X), host-locked to docsapi.helpscout.net, Docs-envelope pagination, 429 + 5xx backoff.
  • DocsBaseCommand skips the Mailbox OAuth flow; resolve key via flag → env → keychain.
  • Full --output/--jq/--fields, sysexits exit codes.

Quality

  • 100% coverage (statements/branches/functions/lines); 614 tests.
  • Live-verified read-only against a prod Docs account (zero mutations).
  • Docs site updated: generated command reference + a Docs guide; README updated.

Writes (create/update/drafts) are intentionally out of scope here — roadmap.

wavyx added 3 commits June 4, 2026 16:13
Adds the Help Scout Docs API surface (separate product, separate per-user key):
- DocsBaseCommand: skips Mailbox OAuth, builds a Docs client from the resolved key.
- docs-client: HTTP Basic auth (key:X), host-locked to docsapi.helpscout.net, Docs
  envelope pagination, 429 + 5xx backoff.
- docs-auth: resolveDocsKey (flag > HSCLI_DOCS_API_KEY env > keychain) + keychain
  docs-key storage.
- hscli docs collection list (--site/--visibility/--limit + --output/--jq/--fields).
- 100% coverage; live-verified read-only against a prod Docs account.
…s + docs auth

- docs collection get; docs site list/get; docs category list
- docs article list (--collection|--category, --status); docs article get; docs article search
- docs auth: validate (read-only) + store the Docs key in the OS keychain
- per-topic help descriptions; 100% coverage; live-verified read-only against prod
- Generated command reference now includes the docs topic (knowledge-base badge + guide link); 77 commands.
- New guides/docs.mdx walkthrough (auth, sites, collections, categories, articles, search) + sidebar entry.
- README: Docs API is shipped (not 'planned') — intro, commands table row, quick-start example.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

wavyx added 6 commits June 4, 2026 16:40
- docs article create (POST, reload=true returns the new article), update (PUT, partial
  fields, errors if none), delete (DELETE 204, confirm unless --yes).
- docs-input helper: @file text bodies + comma-separated lists.
- 100% coverage (628 tests). Live-verified a full create -> update -> delete cycle against a
  prod Docs account using a throwaway notpublished article, then removed it; existing content
  untouched.
- Docs site guide + generated reference + README updated for the write surface.
Complete the Docs API write surface:

- docs collection create/update/delete
- docs category create/update/delete
- docs article save-draft/delete-draft

Create/update use reload=true to return the resulting object; the Docs
API requires --name on every collection/category update. Deletes prompt
for confirmation unless --yes is passed. Drafts stage changes without
affecting the published article.

Regenerate the command reference (88 commands), update the Docs guide
and README. 100% coverage retained.
Docs was only documented in its own guide + the generated reference. Wire
it into the cross-cutting surfaces so the feature is discoverable:

- overview: add the knowledge base to the capability list and Where-to-next
- authentication: document the separate per-user Docs API key
  (hscli docs auth / HSCLI_DOCS_API_KEY) and add it to the env-var table
- home: include `docs` in the search hint
Add a full-width featured recipe to the recipes band: an agent reads last
week's inbox, spots the most-asked question, and publishes the answer to
the Docs knowledge base — version-controlled and shipped from CI. Keeps
the approved 3-up layout intact (the featured card spans the full row via
grid-column 1/-1, copy left / terminal right, stacking under 760px).

Verified light + dark.
Help Scout Docs API support — the hscli docs command group (auth, sites,
collections, categories, articles incl. drafts) with full CRUD, plus docs
site coverage and a home-page recipe. Regenerate the reference (88 cmds).
@wavyx
wavyx merged commit 8acb7e9 into main Jun 4, 2026
11 checks passed
@wavyx
wavyx deleted the feat/docs-api branch June 4, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants