codex-healthkit 0.4.1__tar.gz

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.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ishikawa Hidekazu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.4
2
+ Name: codex-healthkit
3
+ Version: 0.4.1
4
+ Summary: Metadata-only local health reports for daily OpenAI Codex CLI operators.
5
+ Author: Ishikawa Hidekazu
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Ishikawa-Hidekazu/codex-healthkit
8
+ Project-URL: Documentation, https://github.com/Ishikawa-Hidekazu/codex-healthkit#readme
9
+ Project-URL: Issues, https://github.com/Ishikawa-Hidekazu/codex-healthkit/issues
10
+ Project-URL: Changelog, https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/CHANGELOG.md
11
+ Keywords: codex,cli,diagnostics,health-check,local-first
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Unix Shell
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Classifier: Topic :: System :: Monitoring
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # codex-healthkit
25
+
26
+ `codex-healthkit` is an on-demand, metadata-only Bash CLI health report for
27
+ people who use OpenAI Codex every day. It reports local session counts and
28
+ sizes, archived-session metadata, quarantine size, and SQLite/WAL file sizes.
29
+
30
+ By default, it does **not** execute `codex`, make a network request, or read
31
+ credentials, tokens, cookies, SQLite contents, or session transcript contents.
32
+ It is not a daemon, dashboard, cleanup tool, or session recorder. Not affiliated
33
+ with or endorsed by OpenAI.
34
+
35
+ ## Try It
36
+
37
+ Run the exact release without a persistent install:
38
+
39
+ ```bash
40
+ uvx --from codex-healthkit==0.4.1 codex-healthkit check
41
+ ```
42
+
43
+ Install with `uv`:
44
+
45
+ ```bash
46
+ uv tool install codex-healthkit==0.4.1
47
+ codex-healthkit --version
48
+ codex-healthkit check
49
+ ```
50
+
51
+ Or install with `pipx`:
52
+
53
+ ```bash
54
+ pipx install codex-healthkit==0.4.1
55
+ ```
56
+
57
+ Package retrieval uses PyPI. The installed command is the reviewed Bash
58
+ executable from the public repository and has no runtime package dependencies.
59
+ The default check remains local after startup.
60
+
61
+ ## Modes
62
+
63
+ - `codex-healthkit check`: local metadata-only health report
64
+ - `codex-healthkit check --json`: machine-readable report
65
+ - `codex-healthkit check --compare before.json`: explicit before/after metadata comparison
66
+ - `codex-healthkit check --with-codex-version`: opt-in installed Codex version
67
+ - `codex-healthkit check --with-codex-doctor`: opt-in official Codex doctor summary
68
+
69
+ Start with the default check. Optional modes have separate execution and network
70
+ boundaries documented in the repository.
71
+
72
+ ## Compatibility
73
+
74
+ - macOS and Linux
75
+ - Bash and standard Unix tools
76
+ - `jq` for comparison and official doctor modes
77
+ - Windows is not supported by this Bash implementation
78
+
79
+ ## Project Links
80
+
81
+ - [Source and full documentation](https://github.com/Ishikawa-Hidekazu/codex-healthkit)
82
+ - [Safety boundary](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/docs/safety-boundary.md)
83
+ - [Usage guide](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/docs/usage.md)
84
+ - [Changelog](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/CHANGELOG.md)
85
+ - [Issue tracker](https://github.com/Ishikawa-Hidekazu/codex-healthkit/issues)
86
+ - [Security policy](https://github.com/Ishikawa-Hidekazu/codex-healthkit/security/policy)
87
+ - [Japanese README](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/README.ja.md)
@@ -0,0 +1,521 @@
1
+ # codex-healthkit
2
+
3
+ [![CI](https://github.com/Ishikawa-Hidekazu/codex-healthkit/actions/workflows/ci.yml/badge.svg)](https://github.com/Ishikawa-Hidekazu/codex-healthkit/actions/workflows/ci.yml)
4
+ [![License](https://img.shields.io/github/license/Ishikawa-Hidekazu/codex-healthkit)](LICENSE)
5
+ [![Release](https://img.shields.io/github/v/release/Ishikawa-Hidekazu/codex-healthkit?include_prereleases)](https://github.com/Ishikawa-Hidekazu/codex-healthkit/releases)
6
+
7
+ Codex can keep working while local sessions and SQLite WAL quietly grow; `codex-healthkit` shows that growth without opening credentials, databases, or transcript contents.
8
+
9
+ [日本語版](README.ja.md)
10
+
11
+ `codex-healthkit` is an on-demand CLI health report for daily Codex users. It checks local session and SQLite WAL metadata before debugging, opening an issue, or asking for help.
12
+
13
+ By default, it does **not** execute `codex` or read credentials, token files, cookies, SQLite contents, or session transcript contents. It is not a daemon, dashboard, live monitor, or session recorder, and it does not require a background service or web UI. Not affiliated with OpenAI.
14
+
15
+ ## 30-Second Quick Start
16
+
17
+ With `uv`, run the published package without installing it permanently:
18
+
19
+ ```bash
20
+ uvx --from codex-healthkit==0.4.1 codex-healthkit check
21
+ ```
22
+
23
+ Package retrieval uses PyPI. After startup, the default check needs only Bash
24
+ and standard Unix tools and does not execute `codex` or make a network request.
25
+
26
+ Without Python packaging tools, run the same pinned release from source:
27
+
28
+ ```bash
29
+ git clone --branch v0.4.1 --depth 1 https://github.com/Ishikawa-Hidekazu/codex-healthkit.git && \
30
+ ./codex-healthkit/bin/codex-healthkit check
31
+ ```
32
+
33
+ This pins the latest published release instead of running the development branch.
34
+ The command prints a reviewable Markdown health report to stdout. It does not
35
+ install a daemon, modify Codex state, or upload the report.
36
+
37
+ Did the first check work? Share a public-safe
38
+ [first-run report](https://github.com/Ishikawa-Hidekazu/codex-healthkit/issues/new?template=04-first-run-report.yml)
39
+ with only your OS, `codex-healthkit --version`, run method, and result. Do not
40
+ attach the health report or include private paths or contents.
41
+
42
+ ## 24-Second Terminal Demo
43
+
44
+ ![A 24-second fixture-only terminal demo showing a default health report, an explicit before-and-after comparison, and the data codex-healthkit does not read.](assets/terminal-demo.gif)
45
+
46
+ The demo uses synthetic fixture values. It does not contain a real Codex home,
47
+ account, path, report, database, or transcript.
48
+
49
+ ## What You Get
50
+
51
+ <picture>
52
+ <source media="(max-width: 600px)" srcset="assets/source/health-report-mobile.svg">
53
+ <img src="assets/source/health-report-overview.svg" alt="Fixture-only codex-healthkit output showing a default metadata-only health report and an explicit before-and-after comparison without credentials, SQLite contents, transcript contents, or uploads.">
54
+ </picture>
55
+
56
+ [View the public-safe text sample](examples/report.redacted.md) ·
57
+ [View the reproducible visual sources](assets/source/README.md)
58
+
59
+ ## Choose The Narrowest Mode
60
+
61
+ | Mode | Use it for | Boundary |
62
+ | --- | --- | --- |
63
+ | Health report | `./bin/codex-healthkit check` | Local metadata only; does not execute `codex` |
64
+ | Before / after | `./bin/codex-healthkit check --compare before.json` | Compares one explicit health report; no automatic history |
65
+ | Optional doctor | `./bin/codex-healthkit check --with-codex-doctor` | Explicitly runs official `codex doctor --json`; may perform provider reachability checks |
66
+ | JSON output | Add `--json` to a health report or comparison | Same data in a machine-readable format |
67
+
68
+ Start with the default check. It is the narrowest mode and does not execute `codex`.
69
+
70
+ ## Why This Exists
71
+
72
+ Heavy Codex users often need to answer simple operational questions:
73
+
74
+ - Is my local Codex state unusually large?
75
+ - Are active or archived session directories growing?
76
+ - Is the SQLite WAL file large enough to deserve attention?
77
+ - What can I safely share when asking someone else to help debug my setup?
78
+
79
+ `codex-healthkit` focuses on that narrow problem. It is not a usage dashboard, account switcher, cleanup tool, or transcript parser.
80
+
81
+ ## Status
82
+
83
+ Latest release: `v0.4.1`. The existing Bash executable is distributed through
84
+ [PyPI](https://pypi.org/project/codex-healthkit/) without a Python wrapper or
85
+ runtime dependency.
86
+
87
+ The release remains intentionally narrow and read-only. For a stable daily
88
+ command, install an explicit tag rather than linking to a development checkout.
89
+
90
+ Tested on macOS and Linux. Windows is not supported by this Bash implementation.
91
+
92
+ ## Who It Is For
93
+
94
+ `codex-healthkit` is for people who:
95
+
96
+ - use Codex frequently
97
+ - want a quick local operational check
98
+ - need a report they can review before sharing
99
+ - care about avoiding credential, transcript, or account-data exposure
100
+
101
+ It is especially useful before opening an issue, comparing local state over time, or asking another developer to help debug a local setup.
102
+
103
+ ## Three Real-World Uses
104
+
105
+ 1. **Before and after a Codex CLI update:** save one JSON report, update normally, then compare WAL and session metadata without automatic history.
106
+ 2. **Daily operational review:** notice whether active sessions, archived sessions, quarantine, or SQLite files are growing before deciding whether deeper investigation is needed.
107
+ 3. **Preparing a support request:** generate a small report, review it yourself, and share only the redacted metadata that is relevant to the issue.
108
+
109
+ ## From Report To Decision
110
+
111
+ The report is evidence for the next check, not an instruction to delete local
112
+ state.
113
+
114
+ | What you see | What it means | Safe next step |
115
+ | --- | --- | --- |
116
+ | `session_file_count` is higher than `jsonl_count` | Recognized compressed `.jsonl.zst` session files are present in addition to uncompressed `.jsonl` files | Use the directory byte size and an explicit before/after comparison; do not infer lost or duplicate sessions from the count alone |
117
+ | Session bytes or file counts increased | Local session storage changed since the previous report | Compare against one report you deliberately saved and decide whether the growth matches normal work |
118
+ | `logs_2.sqlite-wal` grew or the summary says `watch` | A size-only threshold deserves another look | Save the report, finish or restart Codex normally if appropriate, and check again; never delete a live SQLite sidecar based only on this report |
119
+ | You need help from another person | The metadata can describe scale without exposing contents | Review the report yourself and share only the fields relevant to the issue |
120
+
121
+ `codex-healthkit` does not determine which session to archive or delete. It does
122
+ not checkpoint SQLite, clean directories, or diagnose content-level causes.
123
+
124
+ ## Common Commands
125
+
126
+ JSON health report:
127
+
128
+ ```bash
129
+ ./bin/codex-healthkit check --json
130
+ ```
131
+
132
+ Save a report:
133
+
134
+ ```bash
135
+ ./bin/codex-healthkit check > codex-health-report.md
136
+ ./bin/codex-healthkit check --json > codex-health-report.json
137
+ ```
138
+
139
+ Compare with an explicit previous report:
140
+
141
+ ```bash
142
+ ./bin/codex-healthkit check --json > before.json
143
+ # update Codex CLI, wait a day, or run normal work
144
+ ./bin/codex-healthkit check --json --compare before.json
145
+ ```
146
+
147
+ Omit `--json` on the second command when you want a Markdown comparison table.
148
+
149
+ ## Install From PyPI
150
+
151
+ Install the exact release with `uv`:
152
+
153
+ ```bash
154
+ uv tool install codex-healthkit==0.4.1
155
+ codex-healthkit --version
156
+ codex-healthkit check
157
+ ```
158
+
159
+ Or use `pipx`:
160
+
161
+ ```bash
162
+ pipx install codex-healthkit==0.4.1
163
+ ```
164
+
165
+ Uninstall only the packaged command with the same tool that installed it:
166
+
167
+ ```bash
168
+ uv tool uninstall codex-healthkit
169
+ # or: pipx uninstall codex-healthkit
170
+ ```
171
+
172
+ The package installer downloads from PyPI. The installed command is the same
173
+ Bash executable from this repository; default checks remain local and
174
+ metadata-only.
175
+
176
+ ## Tag-Pinned Source Install
177
+
178
+ For a stable daily command, keep each released tag in a versioned directory and
179
+ point a `current` symlink at the selected release. This keeps normal use separate
180
+ from development branches and makes rollback a symlink change.
181
+
182
+ ```bash
183
+ VERSION=v0.4.1
184
+ INSTALL_ROOT="$HOME/.local/opt/codex-healthkit"
185
+
186
+ mkdir -p "$INSTALL_ROOT"
187
+ git clone --branch "$VERSION" --depth 1 \
188
+ https://github.com/Ishikawa-Hidekazu/codex-healthkit.git \
189
+ "$INSTALL_ROOT/$VERSION"
190
+
191
+ ln -sfn "$INSTALL_ROOT/$VERSION" "$INSTALL_ROOT/current"
192
+ mkdir -p ~/.local/bin
193
+ ln -sfn "$INSTALL_ROOT/current/bin/codex-healthkit" \
194
+ ~/.local/bin/codex-healthkit
195
+ ```
196
+
197
+ Verify the selected version and run the default metadata-only check before
198
+ relying on the new target:
199
+
200
+ ```bash
201
+ codex-healthkit --version
202
+ codex-healthkit check --json | jq -e '.safety | all(.[]; . == false)'
203
+ git -C "$INSTALL_ROOT/$VERSION" rev-parse HEAD
204
+ ```
205
+
206
+ The default check does not execute `codex`, read credentials, open SQLite or
207
+ transcript contents, clean up sessions, or upload telemetry. The `jq` expression
208
+ only verifies the safety fields already emitted by the health report.
209
+
210
+ To roll back, point `current` at a previously installed tag. The command symlink
211
+ does not need to change:
212
+
213
+ ```bash
214
+ PREVIOUS_VERSION=v0.3.0
215
+ ln -sfn "$INSTALL_ROOT/$PREVIOUS_VERSION" "$INSTALL_ROOT/current"
216
+ codex-healthkit --version
217
+ codex-healthkit check --json | jq -e '.safety | all(.[]; . == false)'
218
+ ```
219
+
220
+ Rollback does not delete reports, sessions, or release directories. Remove a
221
+ versioned directory separately only after confirming that `current` no longer
222
+ points to it.
223
+
224
+ Uninstall the local command without deleting reports you chose to save:
225
+
226
+ ```bash
227
+ rm ~/.local/bin/codex-healthkit
228
+ ```
229
+
230
+ Delete `~/.local/opt/codex-healthkit` separately when you no longer need any
231
+ installed release.
232
+
233
+ ## What It Checks
234
+
235
+ By default, `codex-healthkit check` reports:
236
+
237
+ - whether the `codex` command is available, without executing it
238
+ - active session directory size, uncompressed `.jsonl` count, and recognized `.jsonl` / `.jsonl.zst` session file count
239
+ - archived session directory size, uncompressed `.jsonl` count, and recognized `.jsonl` / `.jsonl.zst` session file count
240
+ - quarantine directory size
241
+ - `logs_2.sqlite`, `logs_2.sqlite-shm`, and `logs_2.sqlite-wal` file sizes
242
+ - a small `ok` / `watch` summary based on size-only checks
243
+
244
+ It does not open SQLite databases or session transcripts.
245
+ It also does not execute the external `codex` command by default.
246
+
247
+ ## Options
248
+
249
+ ```text
250
+ codex-healthkit check [--markdown|--json] [--compare <previous-report.json>] [--sessions-total-advisory-bytes <bytes>] [--sessions-daily-growth-advisory-bytes <bytes>] [--with-codex-version] [--check-latest-codex] [--with-codex-doctor]
251
+ codex-healthkit --version
252
+ codex-healthkit --help
253
+ ```
254
+
255
+ ### `--compare`
256
+
257
+ Reads an explicit previous `codex-healthkit check --json` report and compares metadata-only values with the current check.
258
+
259
+ Use it with the default Markdown output for a readable delta table, or with `--json` for machine-readable deltas.
260
+
261
+ It compares:
262
+
263
+ - `logs_2.sqlite-wal` size
264
+ - `logs_2.sqlite` size
265
+ - active session directory size and `.jsonl` count
266
+ - archived session directory size and `.jsonl` count
267
+ - quarantine directory size
268
+
269
+ This mode requires `jq`. It does not store history, upload telemetry, read SQLite contents, or read session transcript contents.
270
+
271
+ The comparison also reports the validated interval between the previous and current `generated_at` timestamps and the active sessions byte delta normalized to one day. Canonical UTC timestamps such as `2026-08-01T00:00:00Z` are required; invalid, equal, or non-increasing timestamps leave the daily rate unavailable instead of producing a misleading value.
272
+
273
+ Optional sessions advisories are enabled only when you provide an integer byte threshold:
274
+
275
+ ```bash
276
+ codex-healthkit check --json --compare before.json \
277
+ --sessions-total-advisory-bytes 32212254720 \
278
+ --sessions-daily-growth-advisory-bytes 4294967296
279
+ ```
280
+
281
+ - `--sessions-total-advisory-bytes` may add the reason `large_total`.
282
+ - `--sessions-daily-growth-advisory-bytes` may add the reason `rapid_growth`.
283
+ - Thresholds require `--compare`; human-size strings such as `30G` are not accepted.
284
+ - Advisory results do not change summary status or exit code.
285
+ - No threshold is enabled by default, and no cleanup or deletion is performed.
286
+ - The machine-readable comparison contract is documented in [`schemas/comparison-v0.2.schema.json`](schemas/comparison-v0.2.schema.json).
287
+
288
+ ### `--with-codex-version`
289
+
290
+ Runs:
291
+
292
+ ```bash
293
+ codex --version
294
+ ```
295
+
296
+ Use this only when you want the report to include the installed Codex CLI version.
297
+
298
+ ### `--check-latest-codex`
299
+
300
+ Checks the installed Codex CLI version against the official stable npm `latest` dist-tag:
301
+
302
+ ```bash
303
+ codex-healthkit check --json --check-latest-codex
304
+ ```
305
+
306
+ This option implies `--with-codex-version`. It sends one HTTPS GET request to the public `@openai/codex` metadata endpoint and reports the resolved `executable_path`, `current_version`, `latest_version`, and `update_available`. The executable path makes PATH precedence differences visible without reading any file contents.
307
+
308
+ - disabled by default; the default check remains local-only
309
+ - requires `curl` and `jq`
310
+ - disables `.curlrc` loading and sends no authorization, cookie, or token header
311
+ - uses a five-second timeout and no retry
312
+ - never installs or updates Codex
313
+ - a failed check does not change summary status or exit code
314
+ - no version-check fields are added to default JSON output
315
+
316
+ ### `--with-codex-doctor`
317
+
318
+ The default check does not execute `codex`. Use this option only when you also
319
+ want a summary from the official Codex CLI doctor command.
320
+
321
+ When explicitly requested, it runs:
322
+
323
+ ```bash
324
+ codex doctor --json
325
+ ```
326
+
327
+ Important:
328
+
329
+ - this mode requires `jq`
330
+ - Codex CLI may perform provider reachability checks through your existing Codex configuration
331
+ - this mode is not fully offline
332
+ - `codex-healthkit` reports only redacted summary fields: `status`, `ok`, `warn`, `fail`, and a note
333
+ - raw `codex doctor` output is not included in the report
334
+ - session transcript contents and SQLite contents are not read
335
+ - this option does not add cleanup, delete, or usage-dashboard behavior
336
+
337
+ ## Example Output
338
+
339
+ See [examples/report.redacted.md](examples/report.redacted.md).
340
+
341
+ Short example:
342
+
343
+ ```text
344
+ # codex-healthkit report
345
+
346
+ - summary: ok
347
+ - codex command found: yes
348
+ - codex version: not requested
349
+ - sessions: 40 JSONL / 42 recognized session files, 18M
350
+ - archived sessions: 3 JSONL / 7 recognized session files, 2.1M
351
+ - SQLite WAL: 0B
352
+ - auth files read: no
353
+ - session transcript contents read: no
354
+ ```
355
+
356
+ ## How To Read The Result
357
+
358
+ The report summary is intentionally simple:
359
+
360
+ - `ok`: no large local SQLite/WAL spike was detected by the size-only check
361
+ - `watch`: one of the local metadata values is large enough to review
362
+ - `fail`: optional official doctor mode was requested and official `codex doctor` reported failures
363
+
364
+ `watch` does not mean credentials were exposed. It also does not mean SQLite contents were read.
365
+
366
+ For more examples, see [docs/usage.md](docs/usage.md) and [docs/faq.md](docs/faq.md).
367
+
368
+ ## Safety Boundary
369
+
370
+ `codex-healthkit` never reads:
371
+
372
+ - `~/.codex/auth.json`
373
+ - token files
374
+ - cookies
375
+ - localStorage
376
+ - OS credential stores
377
+ - SQLite contents
378
+ - session transcript contents
379
+ - account IDs or email addresses
380
+
381
+ `codex-healthkit` preserves the existing `.jsonl` count and separately counts recognized `.jsonl` and `.jsonl.zst` session files. It uses suffix metadata only; raw file names and transcript contents are not reported.
382
+
383
+ Reports are intended to be safe to paste into an issue after review, but users should still check them before sharing.
384
+
385
+ See [docs/safety-boundary.md](docs/safety-boundary.md).
386
+
387
+ ## Documentation
388
+
389
+ - [Usage guide](docs/usage.md)
390
+ - [FAQ](docs/faq.md)
391
+ - [Safety boundary](docs/safety-boundary.md)
392
+ - [Release checklist](docs/release-checklist.md)
393
+ - [Japanese README](README.ja.md)
394
+
395
+ ## Non-Goals
396
+
397
+ `codex-healthkit` does not:
398
+
399
+ - switch Codex accounts
400
+ - parse auth files
401
+ - estimate usage or quota from transcripts
402
+ - delete, archive, or clean up sessions
403
+ - read browser profiles
404
+ - upload reports
405
+ - run background telemetry
406
+
407
+ ## Known Limitations
408
+
409
+ - It does not explain the cause of growth or repair Codex state.
410
+ - It does not delete, archive, compact, or clean up files.
411
+ - It does not estimate account usage, quota, or rate limits.
412
+ - It does not keep automatic history; comparisons require an explicit previous JSON report.
413
+ - Default checks are size/count observations, not SQLite integrity checks.
414
+ - Windows is not supported by this Bash implementation.
415
+ - Optional official doctor behavior can change with the installed Codex CLI.
416
+
417
+ ## Requirements
418
+
419
+ Default mode:
420
+
421
+ - macOS or Linux; Windows is not supported by this Bash implementation
422
+ - Bash
423
+ - standard Unix tools: `find`, `du`, `stat`, `awk`, `wc`, `tr`
424
+
425
+ Comparison mode:
426
+
427
+ - `jq`
428
+
429
+ Optional doctor mode:
430
+
431
+ - Codex CLI
432
+ - `jq`
433
+
434
+ ## Development
435
+
436
+ Run checks:
437
+
438
+ ```bash
439
+ bash -n bin/codex-healthkit scripts/render-visuals.sh tests/run.sh tests/fixtures/fake-bin/codex
440
+ shellcheck bin/codex-healthkit scripts/render-visuals.sh tests/run.sh tests/fixtures/fake-bin/codex
441
+ tests/run.sh
442
+ ```
443
+
444
+ ## Getting Help
445
+
446
+ If something looks wrong:
447
+
448
+ 1. Run the default check first.
449
+ 2. Review and redact the report.
450
+ 3. Open an issue using the closest issue template.
451
+
452
+ Quick troubleshooting:
453
+
454
+ ```bash
455
+ ./bin/codex-healthkit --help
456
+ bash --version
457
+ command -v find du stat awk wc tr
458
+ ```
459
+
460
+ If `--compare` or `--with-codex-doctor` is unavailable, also check
461
+ `command -v jq`. Doctor mode additionally requires the official `codex` CLI.
462
+
463
+ Please do not paste credentials, tokens, cookies, private paths, raw session transcripts, or raw `codex doctor` output into public issues.
464
+
465
+ See [SUPPORT.md](SUPPORT.md).
466
+
467
+ ## Opening Issues Safely
468
+
469
+ When opening an issue:
470
+
471
+ - use the closest issue template
472
+ - include the command you ran
473
+ - include your OS
474
+ - include reviewed and redacted output only
475
+ - explain what you expected and what happened instead
476
+
477
+ Do not include raw reports that you have not reviewed.
478
+
479
+ ## Contributing
480
+
481
+ Small, focused contributions are welcome, especially:
482
+
483
+ - documentation improvements
484
+ - safer examples
485
+ - fixture-based tests
486
+ - Linux compatibility checks
487
+ - shell portability fixes
488
+
489
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before opening a pull request.
490
+
491
+ ## Security
492
+
493
+ Please do not include credentials, tokens, cookies, private paths, raw session transcripts, or raw `codex doctor` output in public issues.
494
+
495
+ See [SECURITY.md](SECURITY.md).
496
+
497
+ ## Changelog
498
+
499
+ See [CHANGELOG.md](CHANGELOG.md).
500
+
501
+ ## Roadmap
502
+
503
+ Near-term:
504
+
505
+ - continue daily use of the source-only release
506
+ - more fixture-based tests
507
+ - clearer report examples
508
+ - decide the next release only after practical improvements accumulate
509
+
510
+ Out of scope until a new safety review:
511
+
512
+ - account switching
513
+ - transcript parsing
514
+ - usage estimation
515
+ - automatic cleanup
516
+ - background monitoring
517
+ - npm package distribution
518
+
519
+ ## License
520
+
521
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,64 @@
1
+ # codex-healthkit
2
+
3
+ `codex-healthkit` is an on-demand, metadata-only Bash CLI health report for
4
+ people who use OpenAI Codex every day. It reports local session counts and
5
+ sizes, archived-session metadata, quarantine size, and SQLite/WAL file sizes.
6
+
7
+ By default, it does **not** execute `codex`, make a network request, or read
8
+ credentials, tokens, cookies, SQLite contents, or session transcript contents.
9
+ It is not a daemon, dashboard, cleanup tool, or session recorder. Not affiliated
10
+ with or endorsed by OpenAI.
11
+
12
+ ## Try It
13
+
14
+ Run the exact release without a persistent install:
15
+
16
+ ```bash
17
+ uvx --from codex-healthkit==0.4.1 codex-healthkit check
18
+ ```
19
+
20
+ Install with `uv`:
21
+
22
+ ```bash
23
+ uv tool install codex-healthkit==0.4.1
24
+ codex-healthkit --version
25
+ codex-healthkit check
26
+ ```
27
+
28
+ Or install with `pipx`:
29
+
30
+ ```bash
31
+ pipx install codex-healthkit==0.4.1
32
+ ```
33
+
34
+ Package retrieval uses PyPI. The installed command is the reviewed Bash
35
+ executable from the public repository and has no runtime package dependencies.
36
+ The default check remains local after startup.
37
+
38
+ ## Modes
39
+
40
+ - `codex-healthkit check`: local metadata-only health report
41
+ - `codex-healthkit check --json`: machine-readable report
42
+ - `codex-healthkit check --compare before.json`: explicit before/after metadata comparison
43
+ - `codex-healthkit check --with-codex-version`: opt-in installed Codex version
44
+ - `codex-healthkit check --with-codex-doctor`: opt-in official Codex doctor summary
45
+
46
+ Start with the default check. Optional modes have separate execution and network
47
+ boundaries documented in the repository.
48
+
49
+ ## Compatibility
50
+
51
+ - macOS and Linux
52
+ - Bash and standard Unix tools
53
+ - `jq` for comparison and official doctor modes
54
+ - Windows is not supported by this Bash implementation
55
+
56
+ ## Project Links
57
+
58
+ - [Source and full documentation](https://github.com/Ishikawa-Hidekazu/codex-healthkit)
59
+ - [Safety boundary](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/docs/safety-boundary.md)
60
+ - [Usage guide](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/docs/usage.md)
61
+ - [Changelog](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/CHANGELOG.md)
62
+ - [Issue tracker](https://github.com/Ishikawa-Hidekazu/codex-healthkit/issues)
63
+ - [Security policy](https://github.com/Ishikawa-Hidekazu/codex-healthkit/security/policy)
64
+ - [Japanese README](https://github.com/Ishikawa-Hidekazu/codex-healthkit/blob/main/README.ja.md)