Skip to content

docs: add README#15

Merged
caballeto merged 2 commits into
mainfrom
docs/add-readme
May 5, 2026
Merged

docs: add README#15
caballeto merged 2 commits into
mainfrom
docs/add-readme

Conversation

@caballeto
Copy link
Copy Markdown
Member

Summary

The npm registry page for `@devhelm/sdk` has been blank since publication (`npm view @devhelm/sdk readme` → `No README data found`). Customers landing on https://www.npmjs.com/package/@devhelm/sdk see only the package metadata — no quickstart, no API surface, no error model, no TypeScript notes.

This PR adds a README that mirrors the structure of the sdk-python README (which already ships to PyPI and renders correctly):

  • Installation
  • Quick Start (matches sdk-python's create / get / pause / resume / delete flow)
  • Configuration (constructor + env-var fallbacks)
  • Resources table (one row per `client.` module)
  • Pagination (auto vs manual page vs cursor)
  • Error Handling (`DevhelmAuthError` / `NotFoundError` / `ConflictError` / `RateLimitError` / `ServerError` / `ValidationError` / `TransportError`)
  • TypeScript section calling out re-exported DTO types
  • Compatibility (Node 18+, browser bundlers, Cloudflare Workers)
  • License

Notes the surface telemetry headers (`X-DevHelm-Surface: sdk-js` + `X-DevHelm-Surface-Version`) so users understand version-EOL behavior.

A note on the `managedBy` field in the example

The Quick Start example uses `managedBy: 'DASHBOARD'` with a short inline comment. This is the more honest default for SDK callers: an SDK call from a script is morally an imperative API call (no reconciliation), just from code instead of from the dashboard UI. Users who script reconciliation can override with `'CLI'` or `'TERRAFORM'`.

Test plan

  • Renders correctly in markdown preview
  • All code samples are valid TypeScript
  • Quickstart sample matches the actual SDK API (verified against published v0.6.0 in a fresh `pnpm dlx` install)
  • Will appear on https://www.npmjs.com/package/@devhelm/sdk after the next `npm publish`

Made with Cursor

caballeto and others added 2 commits May 5, 2026 19:13
The npm registry page for @devhelm/sdk has been blank since publication
(`npm view @devhelm/sdk readme` → "No README data found"). Customers
landing on https://www.npmjs.com/package/@devhelm/sdk see only the
package metadata, with no quickstart, API surface, error model, or
TypeScript usage notes — a poor first impression for a developer
artifact.

Mirrors the structure of sdk-python's README (which does ship to PyPI
and renders correctly):

- Installation
- Quick Start (matches sdk-python's create/get/pause/resume/delete flow)
- Configuration (constructor + env-var fallbacks)
- Resources table (one row per `client.<resource>` module)
- Pagination (auto vs manual page vs cursor)
- Error Handling (DevhelmAuthError / NotFound / Conflict / RateLimit /
  Server / Validation / Transport)
- TypeScript section calling out the re-exported DTO types
- Compatibility (Node 18+, browser bundlers, CF Workers)
- License

Notes the surface telemetry headers (X-DevHelm-Surface: sdk-js +
X-DevHelm-Surface-Version) so users understand version-EOL behavior.

The Quick Start example uses `managedBy: 'CLI'` — which matches the
field's IaC-drift semantic for SDK callers who script reconciliation.
A non-`managedBy` value would also work for one-off imperative scripts;
this is the safer default for example code that gets copy-pasted into
CI/automation.

Co-authored-by: Cursor <cursoragent@cursor.com>
DASHBOARD is the more honest default for SDK callers: an SDK call from
a one-off script is morally an imperative API call (no reconciliation),
just from code instead of from the dashboard UI. The previous CLI value
would lie about IaC ownership and trigger a misleading 'managed by CLI,
edit in code' banner in the dashboard for monitors that have no actual
reconciliation loop.

Adds a short inline comment so users understand the field's semantic
and can override it for their use case.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto caballeto merged commit 8f448a0 into main May 5, 2026
3 checks passed
@caballeto caballeto deleted the docs/add-readme branch May 5, 2026 17:16
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.

1 participant