clean-worktrees
v0.2.0
Published
Clean up leftover agent worktrees
Readme
clean-worktrees
CLI tool to clean up leftover agent worktrees (Codex, Claude Code, etc.)
AI coding agents like Codex create temporary worktrees that pile up over time, eating disk space (and messing with your git history). This tool finds and removes them.
Usage
# Preview what would be deleted
bunx clean-worktrees --codex --dry-run
# Clean with confirmation prompt
bunx clean-worktrees --codex
# Clean without confirmation
bunx clean-worktrees --codex --forceFlags
| Flag | Description |
|------|-------------|
| --codex | Clean Codex worktrees (~/.codex/worktrees/) |
| --dry-run | Preview what would be deleted without deleting |
| --force, -f | Skip confirmation prompt |
License
MIT
