Skip to content

ocdbc v0.1.0 — initial release

Choose a tag to compare

@chncaesar chncaesar released this 22 Jul 05:31
· 6 commits to master since this release

What it does

Safely analyze and vacuum OpenCode's SQLite database to reclaim freelist bloat.

Commands

  • ocdbc analyze — read-only health report (DB size, freelist, table stats, session ages, largest objects)
  • ocdbc vacuum — safe VACUUM sequence: fuser check, WAL checkpoint, integrity, verified backup, auto_vacuum=INCREMENTAL, VACUUM with progress, re-enable WAL, verify

Safety

  • Refuses to run if OpenCode has the DB open (fuser)
  • Refuses to run if fuser is not installed (override with --skip-fuser)
  • Creates a verified timestamped backup before every VACUUM
  • Integrity check before and after — aborts on failure
  • Atomic VACUUM (rename on success, old file untouched on failure)

Install

pip install git+https://github.com/chncaesar/opencode-db-clean.git

or

git clone https://github.com/chncaesar/opencode-db-clean.git
cd opencode-db-clean && pip install .