oclean is a process-cleanup wrapper for opencode sessions.
It runs opencode as usual, tracks child processes created during that session, and cleans up session-owned leftovers when the session exits or is interrupted.
opencode is moving quickly and improving constantly. oclean is a small companion utility for people who want stricter per-session process cleanup today.
Repository: https://github.com/kavhnr/oclean
cargo install ocleanoclean is distributed via a custom tap.
brew tap kavhnr/oclean
brew install ocleanDownload a release artifact for your platform from the repo Releases page and place oclean on your PATH.
Run oclean where you would normally run opencode:
ocleanPass flags/args through as usual:
oclean --model provider/modelalias opencode='oclean'OCLEAN_OPENCODE: absolute path override for the realopencodebinary.OCLEAN_WATCH_PARENT=1: enable parent-watchdog cleanup mode.OCLEAN_DEBUG=1: print lifecycle/debug events to stderr.
oclean includes recursion guards and will fail fast if it detects wrapper recursion.
- Update
Cargo.tomlmetadata and version. - Run checks:
cargo clippy --all-targets --all-features
cargo test- Publish:
cargo publishTag a version (vX.Y.Z) and push. The release workflow builds artifacts and uploads checksums.
- Create/update formula in tap repo (
homebrew-oclean). - Point
urlto GitHub release tarball and setsha256. - Commit formula update and push.
MIT