@xerg/cli 0.1.4 → 0.1.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 CHANGED
@@ -20,6 +20,12 @@ xerg doctor
20
20
  xerg audit
21
21
  ```
22
22
 
23
+ ## Supported runtime
24
+
25
+ `@xerg/cli` supports Node `20`, `22`, and `24`.
26
+
27
+ If you are developing in this repo, `.nvmrc` still pins the default local toolchain to Node `24.14.0`.
28
+
23
29
  ## Sample output
24
30
 
25
31
  ```text
@@ -71,6 +77,11 @@ xerg audit --since 24h --compare
71
77
  - If OpenClaw runs remotely, SSH into the machine where the logs live and run Xerg there
72
78
  - Or point Xerg at exported files directly with flags
73
79
 
80
+ Remote prerequisites:
81
+
82
+ - SSH audits require `ssh` and `rsync` on your `PATH`
83
+ - Railway audits require the `railway` CLI on your `PATH`
84
+
74
85
  ## Default paths
75
86
 
76
87
  By default, Xerg checks:
@@ -85,6 +96,30 @@ xerg audit --log-file /path/to/openclaw.log
85
96
  xerg audit --sessions-dir /path/to/sessions
86
97
  ```
87
98
 
99
+ ## Authentication and config
100
+
101
+ Push commands resolve credentials in this order:
102
+
103
+ 1. `XERG_API_KEY`
104
+ 2. `~/.xerg/config.json`
105
+ 3. `xerg login` browser credentials stored at `~/.config/xerg/credentials.json`
106
+
107
+ Optional API URL overrides:
108
+
109
+ - `XERG_API_URL`
110
+ - `apiUrl` in `~/.xerg/config.json`
111
+
112
+ Example `~/.xerg/config.json`:
113
+
114
+ ```json
115
+ {
116
+ "apiKey": "sk_live_or_test_key",
117
+ "apiUrl": "https://api.xerg.ai"
118
+ }
119
+ ```
120
+
121
+ `xerg login` stores a browser-issued token in `~/.config/xerg/credentials.json`. That token store is separate from `~/.xerg/config.json`.
122
+
88
123
  ## What the audit shows
89
124
 
90
125
  - Total spend by workflow and model, in dollars
@@ -97,6 +132,19 @@ xerg audit --sessions-dir /path/to/sessions
97
132
 
98
133
  Xerg v0 stores economic metadata and audit summaries locally. It does not store prompt or response content.
99
134
 
135
+ ## Exit codes
136
+
137
+ - `0`: success
138
+ - `1`: general failure
139
+ - `2`: no OpenClaw data was found
140
+ - `3`: a `--fail-above-waste-rate` or `--fail-above-waste-usd` threshold was exceeded
141
+
142
+ ## Troubleshooting
143
+
144
+ - `better-sqlite3` is a native dependency. If install fails, retry on a supported Node version and make sure standard native build tooling is available for your platform.
145
+ - If `xerg audit --remote ...` fails before pulling files, verify that both `ssh` and `rsync` are installed and reachable on your `PATH`.
146
+ - If `xerg audit --railway` fails immediately, verify that the `railway` CLI is installed, authenticated, and can access the target project.
147
+
100
148
  ## Pilot and support
101
149
 
102
150
  - Pilot: [xerg.ai/pilot](https://xerg.ai/pilot)