Repository navigation
Commit 143af6a
committed
feat(cli): add --json output to doctor
`doctor` is one of the first commands users and agents run when something
is off — remote bug reports (e.g. heygen-com#294, heygen-com#316, heygen-com#317) typically include a
doctor screenshot, which is painful to parse programmatically.
Every other CLI command that reports state already supports `--json`
(info, lint, compositions, catalog, benchmark, validate, capture). This
brings `doctor` in line with that convention so:
- CI pipelines can gate on `hyperframes doctor --json` (exit 1 on
failure) without scraping terminal output
- AI agents consuming telemetry / diagnostic data get structured input
- Bug report tooling can attach machine-readable doctor output
Schema:
{
"ok": boolean,
"platform": "darwin" | "linux" | "win32",
"arch": "arm64" | "x64" | ...,
"checks": [
{ "name": "FFmpeg", "ok": true, "detail": "ffmpeg version 8.1 …" },
{ "name": "Docker", "ok": false, "detail": "Not found",
"hint": "https://docs.docker.com/get-docker/" }
],
"_meta": { "version", "latestVersion", "updateAvailable" }
}
Uses the existing `withMeta()` helper so the `_meta` envelope matches
other `--json` commands. Human output format is unchanged.1 parent 0f4fcbe commit 143af6a
1 file changed
Lines changed: 54 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
181 | 191 | | |
182 | 192 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
189 | 197 | | |
190 | 198 | | |
191 | 199 | | |
| |||
208 | 216 | | |
209 | 217 | | |
210 | 218 | | |
211 | | - | |
212 | | - | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | | - | |
216 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
217 | 256 | | |
218 | | - | |
| 257 | + | |
219 | 258 | | |
220 | | - | |
221 | | - | |
| 259 | + | |
| 260 | + | |
222 | 261 | | |
223 | | - | |
224 | 262 | | |
225 | 263 | | |
226 | 264 | | |
| |||
0 commit comments