Skip to content
/ oclean Public

Process-cleanup wrapper for opencode sessions.

License

Notifications You must be signed in to change notification settings

kavhnr/oclean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oclean

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.

Why this exists

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

Install

Cargo

cargo install oclean

Homebrew

oclean is distributed via a custom tap.

brew tap kavhnr/oclean
brew install oclean

GitHub Releases

Download a release artifact for your platform from the repo Releases page and place oclean on your PATH.

Usage

Run oclean where you would normally run opencode:

oclean

Pass flags/args through as usual:

oclean --model provider/model

Optional shell alias

alias opencode='oclean'

Behavior and environment variables

  • OCLEAN_OPENCODE: absolute path override for the real opencode binary.
  • 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.

Publishing

Crates.io

  1. Update Cargo.toml metadata and version.
  2. Run checks:
cargo clippy --all-targets --all-features
cargo test
  1. Publish:
cargo publish

GitHub Releases

Tag a version (vX.Y.Z) and push. The release workflow builds artifacts and uploads checksums.

Homebrew tap

  1. Create/update formula in tap repo (homebrew-oclean).
  2. Point url to GitHub release tarball and set sha256.
  3. Commit formula update and push.

License

MIT

About

Process-cleanup wrapper for opencode sessions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published