You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6e5bf3e
Browse filesBrowse the repository at this point in the historyBrowse files
| Inspect |`openclaw doctor`/ `openclaw doctor --json`| Advisory checks in human or machine-readable form.|
34
+
| Repair |`openclaw doctor --fix`| Applies supported repairs, using prompts unless non-interactive repair is safe. |
35
+
| Lint |`openclaw doctor --lint [--json]`| Read-only findings with threshold-based exit codes for CI gates. |
36
+
| Shared SQLite maintenance |`openclaw doctor --state-sqlite compact`| Explicitly checkpoints, compacts, and verifies the canonical shared state DB. |
37
+
| Session SQLite migration |`openclaw doctor --session-sqlite <mode>`| Inspects, imports, validates, compacts, recovers, or restores session state. |
38
38
39
-
Use `openclaw doctor --json`as the machine-readable deployment preflight. It runs the same read-only checks, JSON output, and exit codes as `openclaw doctor --lint --json`. Prefer `--fix` when a human operator wants doctor to edit config or state.
39
+
Use `openclaw doctor --json`when an operator or script wants the advisory Doctor report as JSON. It exits successfully after producing a report; inspect `ok`and `findings` for health state. Use explicit `openclaw doctor --lint --json` when CI should exit nonzero for findings at the selected severity threshold. Prefer `--fix` when a human operator wants Doctor to edit config or state.
40
40
41
41
## Examples
42
42
@@ -94,17 +94,19 @@ openclaw channels status --probe
94
94
|`--session-sqlite-agent <id>`| With `--session-sqlite`: select one configured agent. |
95
95
|`--session-sqlite-all-agents`| With `--session-sqlite`: select configured and discovered agent stores. |
96
96
|`--github-issue`| With `--session-sqlite recover`: prepare a sanitized openclaw/openclaw issue report; doctor creates it with `gh` after `--yes` or interactive confirmation. |
97
-
|`--json`|Run lint checks in read-only mode and emit JSON. With another machine mode, emit that mode's existing JSON report.|
97
+
|`--json`|Emit read-only JSON. Bare `--json` is advisory; combine with `--lint` for threshold-based exit codes. With another machine mode, emit that mode's existing JSON report. |
98
98
|`--severity-min <level>`| With `--lint`: drop findings below `info`, `warning`, or `error`. |
99
99
|`--all`| With `--lint`: run all registered checks, including opt-in checks excluded from the default set. |
100
100
|`--skip <id>`| With `--lint`: skip a check id. Repeatable. |
101
101
|`--only <id>`| With `--lint`: run only the given check id(s). Repeatable. |
102
102
103
-
`--severity-min`, `--all`, `--only`, and `--skip` are only accepted together with `--lint`. Bare `--json`implies lint mode. It cannot be combined with `--repair`, `--fix`, or `--force` unless another machine mode owns the command.
103
+
`--severity-min`, `--all`, `--only`, and `--skip` are only accepted together with `--lint`. Bare `--json`uses the default read-only lint check selection but keeps Doctor's advisory exit behavior. It cannot be combined with `--repair`, `--fix`, or `--force` unless another machine mode owns the command.
104
104
105
105
## Lint mode
106
106
107
-
`openclaw doctor --json` is the deployment-preflight form of lint mode. It is read-only and non-interactive: no prompts, repairs, or config/state rewrites. `openclaw doctor --lint --json` remains an equivalent explicit spelling.
107
+
Bare `openclaw doctor --json` is read-only and non-interactive: no prompts, repairs, or config/state rewrites. It emits the same default findings as lint mode, but exits `0` after a report is produced so output formatting does not change ordinary Doctor's advisory success contract. Read the payload's `ok` and `findings` fields to determine health.
108
+
109
+
Explicit `openclaw doctor --lint` is the deployment-preflight posture. Add `--json` for machine-readable output without changing lint's threshold-based exit code.
108
110
109
111
```bash
110
112
openclaw doctor --json
@@ -144,7 +146,7 @@ JSON output is the scripting surface:
`--severity-min` controls both which findings print and the exit threshold: `openclaw doctor --lint --severity-min error` can print nothing and exit `0` even when lower-severity `info`/`warning` findings exist.
156
158
159
+
Bare `openclaw doctor --json` exits `0` once it emits a findings payload, including when `ok` is `false`. Argument errors or runtime failures before a payload can be produced remain nonzero.
160
+
157
161
`--all` controls which checks are selected before severity filtering. The default lint run excludes checks that are deep, historical, or more likely to surface repairable legacy residue; use `--all` for the complete inventory. `--only <id>` is the most precise selector and can run any registered check by id.
158
162
159
163
`core/doctor/local-audio-acceleration` reports the auto-selected local STT command, separate capable/requested/observed backend evidence, and fallback order without loading a speech model. It emits an informational finding, so include `--severity-min info` to display it.
|`openclaw doctor`| yes | no | friendly health report | a human checking status |
90
+
|`openclaw doctor --json`| no | no | JSON advisory report | machine-readable operator checks |
91
+
|`openclaw doctor --fix`| sometimes | yes, with repair policy | friendly repair log | applying approved repairs |
92
+
|`openclaw doctor --lint`| no | no | structured findings | CI, preflight, and review gates |
92
93
93
94
Default `doctor --lint` runs the broad-safe automation profile: checks that are
94
95
static, local, and useful in CI or preflight output. It skips opt-in checks that
@@ -134,13 +135,15 @@ Exit codes:
134
135
|`1`| one or more findings met the selected threshold |
135
136
|`2`| command/runtime failure before findings could be emitted |
136
137
138
+
These threshold-based exit codes belong to explicit `--lint` mode, with or without `--json`. Bare `openclaw doctor --json` preserves ordinary Doctor's advisory exit `0` after producing its payload; machine consumers should read `ok` and `findings`. Fatal errors before output remain nonzero.
139
+
137
140
Flags:
138
141
139
142
-`--severity-min info|warning|error` (default `warning`): controls both what prints and what causes a non-zero exit.
140
143
-`--all`: runs every registered lint check, including opt-in checks excluded from the default automation set.
141
144
-`--only <id>` (repeatable): run only the named check id(s); an unknown id is reported as an error finding.
142
145
-`--skip <id>` (repeatable): exclude a check while keeping the rest of the run active.
143
-
-`--json`, `--severity-min`, `--all`, `--only`, and `--skip` require `--lint`; plain `openclaw doctor` and `--fix`runs reject them.
146
+
-`--severity-min`, `--all`, `--only`, and `--skip` require `--lint`. Bare `--json` is allowed for an advisory machine-readable report; `--fix`rejects it unless another machine mode owns the output.
0 commit comments