@xerg/cli 0.4.0 → 0.5.1
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 +15 -5
- package/dist/index.js +325 -131
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/xerg/SKILL.md +64 -9
package/package.json
CHANGED
package/skills/xerg/SKILL.md
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: xerg
|
|
3
3
|
description: Audit OpenClaw and Hermes workflows in dollars. Local-first audits with init, compare mode, OpenClaw remote support, CI gates, and optional hosted follow-up.
|
|
4
|
+
homepage: https://xerg.ai
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
homepage: https://xerg.ai
|
|
8
|
+
links:
|
|
9
|
+
repository: https://github.com/xergai/xerg
|
|
10
|
+
documentation: https://xerg.ai/docs
|
|
11
|
+
primaryEnv: XERG_API_KEY
|
|
12
|
+
requires:
|
|
13
|
+
anyBins:
|
|
14
|
+
- xerg
|
|
15
|
+
- npx
|
|
16
|
+
config:
|
|
17
|
+
- ~/.xerg/config.json
|
|
18
|
+
- ~/.config/xerg/credentials.json
|
|
19
|
+
- ~/.xerg/remotes.json
|
|
20
|
+
install:
|
|
21
|
+
- kind: node
|
|
22
|
+
package: "@xerg/cli"
|
|
23
|
+
bins:
|
|
24
|
+
- xerg
|
|
25
|
+
envVars:
|
|
26
|
+
- name: XERG_API_KEY
|
|
27
|
+
required: false
|
|
28
|
+
description: Optional Xerg Cloud workspace API key for explicit push, connect, and hosted MCP setup.
|
|
29
|
+
- name: XERG_API_URL
|
|
30
|
+
required: false
|
|
31
|
+
description: Optional override for the Xerg API endpoint; defaults to https://api.xerg.ai.
|
|
32
|
+
dependencies:
|
|
33
|
+
- name: "@xerg/cli"
|
|
34
|
+
type: npm
|
|
35
|
+
repository: https://github.com/xergai/xerg
|
|
36
|
+
- name: ssh
|
|
37
|
+
type: other
|
|
38
|
+
url: https://www.openssh.com/
|
|
39
|
+
- name: rsync
|
|
40
|
+
type: other
|
|
41
|
+
url: https://rsync.samba.org/
|
|
42
|
+
- name: railway
|
|
43
|
+
type: npm
|
|
44
|
+
repository: https://github.com/railwayapp/cli
|
|
4
45
|
---
|
|
5
46
|
|
|
6
47
|
# Xerg
|
|
@@ -11,6 +52,8 @@ Xerg audits OpenClaw and Hermes workflows in dollars, not tokens. It reads gatew
|
|
|
11
52
|
|
|
12
53
|
Local audits need no account. Hosted sync and hosted MCP are optional paid workspace features. No data leaves your machine unless you explicitly push results to Xerg Cloud.
|
|
13
54
|
|
|
55
|
+
The initial `npx @xerg/cli` path fetches and executes the published npm package. To avoid that runtime fetch, install and review the CLI first with `npm install -g @xerg/cli`, or use a locally built `xerg` binary.
|
|
56
|
+
|
|
14
57
|
## Quick Start
|
|
15
58
|
|
|
16
59
|
```bash
|
|
@@ -49,6 +92,14 @@ Additional requirements:
|
|
|
49
92
|
- SSH audits require `ssh` and `rsync` on your local `PATH` and are OpenClaw-only in this phase
|
|
50
93
|
- Railway audits require the `railway` CLI on your local `PATH` and are OpenClaw-only in this phase
|
|
51
94
|
|
|
95
|
+
## Security And Data Flow
|
|
96
|
+
|
|
97
|
+
Default `doctor`, `init`, `audit`, `--compare`, `--json`, and `--markdown` commands analyze data on the local machine. They read OpenClaw, Hermes, or Cursor usage files, compute economic summaries, print reports, and may write local SQLite snapshots for future comparison.
|
|
98
|
+
|
|
99
|
+
Remote OpenClaw audits over SSH, Railway, or `--remote-config` pull selected gateway logs and session files to local temporary storage, then run the same local audit engine. These flows require the corresponding remote transport credentials already configured on the machine.
|
|
100
|
+
|
|
101
|
+
Hosted sync is opt-in. `connect`, `audit --push`, `push`, and `mcp-setup` use `XERG_API_KEY`, `~/.xerg/config.json`, or browser login credentials only for Xerg Cloud actions. The push payload contains audit totals, daily rollups, findings, recommendations, comparison deltas, and source metadata; it does not include raw prompt or response content, local source file paths, local database paths, or internal finding details.
|
|
102
|
+
|
|
52
103
|
## Default Flow
|
|
53
104
|
|
|
54
105
|
1. Start with the default first-run path when you want the fastest local result:
|
|
@@ -112,7 +163,7 @@ xerg push
|
|
|
112
163
|
```
|
|
113
164
|
|
|
114
165
|
- `connect` is the guided hosted path: it reuses existing auth, prompts before browser login when needed, and offers to push the latest audit
|
|
115
|
-
- `mcp-setup` prints or writes hosted MCP config for Cursor, Claude Code, or another client
|
|
166
|
+
- `mcp-setup` prints or writes hosted MCP config for Cursor, Claude Code, Codex, or another client
|
|
116
167
|
- local audits and compare remain available if you skip hosted setup
|
|
117
168
|
|
|
118
169
|
## Source Selection
|
|
@@ -206,18 +257,22 @@ Automation can branch on those codes instead of scraping terminal output.
|
|
|
206
257
|
|
|
207
258
|
## Recommendations
|
|
208
259
|
|
|
209
|
-
When using `--json`, expect a `recommendations` array alongside the audit summary.
|
|
260
|
+
When using `--json`, expect a `recommendations` array alongside the audit summary. Each recommendation item includes:
|
|
210
261
|
|
|
211
|
-
- `id`, `findingId`, `kind`, `title`, `
|
|
212
|
-
- `
|
|
213
|
-
-
|
|
262
|
+
- `id`, `findingId`, `kind`, `title`, `summary`
|
|
263
|
+
- `priorityBucket`, `recommendedOrder`, `implementationSurface`, `category`
|
|
264
|
+
- `severity`, `confidence`, `effort`
|
|
265
|
+
- `estimatedSavingsUsd`, `estimatedSavingsPct`
|
|
266
|
+
- `scope`, `scopeId`, `scopeLabel`
|
|
267
|
+
- `whereToChange`, `validationPlan`, `actions`
|
|
214
268
|
|
|
215
|
-
Current recommendation kinds
|
|
269
|
+
Current recommendation kinds map into the Action queue buckets:
|
|
216
270
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
271
|
+
- `fix_now`: `retry-waste`, `loop-waste`
|
|
272
|
+
- `test_next`: `context-outlier`, `idle-spend`, `candidate-downgrade`, `cache-carryover`, `max-mode-concentration`
|
|
273
|
+
- `watch`: unknown or uncategorized findings
|
|
219
274
|
|
|
220
|
-
Prefer
|
|
275
|
+
Prefer high-confidence or reversible fixes first. Treat model downgrades, context changes, and Cursor behavior changes as compare-friendly experiments, not guaranteed savings.
|
|
221
276
|
|
|
222
277
|
## Checks
|
|
223
278
|
|