@henryqw/pi-herdr 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# `@henryqw/pi-herdr`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run Herdr CLI commands from Node through one thin client. Callers keep orchestration and command-specific checks.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @henryqw/pi-herdr
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Use
|
|
6
12
|
|
|
7
13
|
```ts
|
|
8
14
|
import { createHerdrClient } from "@henryqw/pi-herdr";
|
|
@@ -12,9 +18,9 @@ const herdr = createHerdrClient((command, args, options) =>
|
|
|
12
18
|
const response = await herdr.json(["agent", "list"], { cwd: ctx.cwd });
|
|
13
19
|
```
|
|
14
20
|
|
|
15
|
-
`exec` validates string argv and returns raw process result
|
|
21
|
+
`exec` validates string argv and returns the raw process result. `run` requires a successful exit and returns stdout. `json` also parses a JSON object. `hasHerdrErrorCode` detects structured CLI errors in stdout or stderr.
|
|
16
22
|
|
|
17
|
-
Client does not mirror Herdr command catalog
|
|
23
|
+
Client does not mirror the Herdr command catalog. Herdr remains the source of truth for supported commands and response shapes.
|
|
18
24
|
|
|
19
25
|
## Development
|
|
20
26
|
|