aboutsummaryrefslogtreecommitdiff
path: root/docs/next
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:58:18 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:58:34 +0300
commit6703413fc7ef864f102aa2de5840bf874b589101 (patch)
treedc4314024f4627e41fd009efb22fb013e0836de6 /docs/next
parent09bac7f274a2944ca5a5ed83d11845ca6b0ce960 (diff)
feat: expose api schema from cli
Diffstat (limited to 'docs/next')
-rw-r--r--docs/next/CHANGELOG.md1
-rw-r--r--docs/next/website/src/content/docs/cli-reference.mdx12
-rw-r--r--docs/next/website/src/content/docs/socket-api.mdx16
3 files changed, 29 insertions, 0 deletions
diff --git a/docs/next/CHANGELOG.md b/docs/next/CHANGELOG.md
index b05a2618..4a1470f0 100644
--- a/docs/next/CHANGELOG.md
+++ b/docs/next/CHANGELOG.md
@@ -4,6 +4,7 @@
### Added
- Added `session.snapshot` to bootstrap client runtime state in one socket API response before subscribing to events.
+- Added `herdr api schema` to inspect the bundled socket API schema, with `--json` for the full JSON Schema document and `--output PATH` for file output.
### Changed
- Bumped the client/server protocol version to 15 for socket API placement mutation event and response compatibility.
diff --git a/docs/next/website/src/content/docs/cli-reference.mdx b/docs/next/website/src/content/docs/cli-reference.mdx
index d841e564..361d09ac 100644
--- a/docs/next/website/src/content/docs/cli-reference.mdx
+++ b/docs/next/website/src/content/docs/cli-reference.mdx
@@ -33,6 +33,18 @@ herdr status server
herdr status client
```
+API schema commands:
+
+```bash
+herdr api schema
+herdr api schema --json
+herdr api schema --output herdr-api.schema.json
+```
+
+`herdr api schema` prints a short summary of the socket protocol schema bundled
+with the installed binary. Use `--json` for the full JSON Schema document, or
+`--output PATH` to write that document to a file.
+
## Server
```bash
diff --git a/docs/next/website/src/content/docs/socket-api.mdx b/docs/next/website/src/content/docs/socket-api.mdx
index 08cd2107..f84bd5e6 100644
--- a/docs/next/website/src/content/docs/socket-api.mdx
+++ b/docs/next/website/src/content/docs/socket-api.mdx
@@ -17,6 +17,22 @@ Most automation should start with the CLI wrappers. Use the raw socket API only
The layers share the same control surface.
+## Schema
+
+The installed CLI can print the socket protocol schema bundled with that Herdr
+binary:
+
+```bash
+herdr api schema
+herdr api schema --json
+herdr api schema --output herdr-api.schema.json
+```
+
+Plain `herdr api schema` prints a short summary. `--json` prints the full JSON
+Schema document for tools, and `--output PATH` writes that document to a file.
+The schema covers raw requests, success responses, error responses, emitted
+events, and subscription events.
+
## What you can control
The socket API can: