Repository navigation
Commit a38c83c
feat(cli): rebuild doctor with fix guidance, --fix, --offline and json output (#313)
`shelltime doctor` now checks the whole setup and, for every problem, says
what it breaks and the exact command or config change that fixes it:
- system: shelltime on PATH, newer release available
- storage: ~/.shelltime exists and is writable, log size vs logCleanup
- configuration: which file is used, shadowed and unparseable local
files, apiEndpoint, invalid exclude regexes, proxy URL, enableMetrics
- account: token present and accepted by the server (401/403 vs unreachable)
- privacy: data masking, encryption without a running daemon, legacy
tokens without an encryption key
- daemon: binary, service, socket, CLI/daemon version mismatch
- shell hooks: rc lines, hook script, bash-preexec
- Claude Code / Codex: OTEL config, legacy shell OTEL blocks, statusline,
Codex sign-in
- AI usage receiver: aiCodeOtel disabled, port mismatch, not listening
- sync: queued failed uploads and heartbeats
The report ends with a "How to fix" list grouped by action. `--fix`
applies the safe fixes (hooks, cc/codex install, daemon install, log
cleanup) after confirmation (`--yes` skips it), `--offline` skips the
network checks and `--format json` prints a machine-readable report.
doctor exits 1 when any check fails and no longer aborts on a config
error or on an unsupported OS.
Claude-Session: https://claude.ai/code/session_01KzQHztW9fdhyWDwPmanhLN
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8feb0bc commit a38c83c
18 files changed
Lines changed: 2269 additions & 225 deletions
File tree
- cmd/cli
- commands
- docs
- model
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
120 | 132 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
0 commit comments