@henryqw/pi-herdr 0.4.3 → 0.4.5
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 +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# `@henryqw/pi-herdr`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Call the Herdr CLI from Node through one thin client. Extension authors share process handling without copying Herdr's command catalog, while each extension keeps its orchestration.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Created for**: Call Herdr CLI commands from Node without duplicating wrapper logic across extensions.
|
|
8
|
-
- **Advantage**: One thin client keeps orchestration local. The Herdr CLI remains the source of truth for commands and response shapes.
|
|
5
|
+
This package is an extension-author library. Pi users normally install a Herdr companion extension instead.
|
|
9
6
|
|
|
10
7
|
## Install
|
|
11
8
|
|
|
@@ -13,6 +10,10 @@ Run Herdr CLI commands from Node through one thin client. Callers keep orchestra
|
|
|
13
10
|
npm install @henryqw/pi-herdr
|
|
14
11
|
```
|
|
15
12
|
|
|
13
|
+
Install the Herdr CLI and make `herdr` available on the calling process's `PATH`.
|
|
14
|
+
|
|
15
|
+
For a ready-to-use Pi workflow, see [`@henryqw/pi-herdr-clone`](https://pi.henry.wang/extensions/pi-herdr-clone).
|
|
16
|
+
|
|
16
17
|
## Use
|
|
17
18
|
|
|
18
19
|
```ts
|
|
@@ -22,6 +23,8 @@ const herdr = createHerdrClient(pi.exec.bind(pi));
|
|
|
22
23
|
const response = await herdr.json(["agent", "list"], { cwd: ctx.cwd });
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
## API
|
|
27
|
+
|
|
25
28
|
| API | Result |
|
|
26
29
|
| --- | --- |
|
|
27
30
|
| `exec` | Validates string argv and returns the raw process result. |
|