keeper

Keeps an Arch machine clean, with your agent doing the deciding.

Coding agents leave worktrees, build output, caches and transcripts behind. keeper finds what is safe to remove, proves it, and moves it to a trash you can undo.

Install

paru -S keeper-bin       # standalone binary
paru -S keeper           # Bun source package
npm i -g @cillianb/keeper # same binary from npm, x64 and arm64

The AUR has both packages, and npm ships the same binary for x64 and arm64. To run it once without installing, use npx @cillianb/keeper scan. Install it before keeper timer install, so the schedule points at a path that stays put.

keeper needs git and pacman-contrib. gh adds pull request proof, expac sizes orphans, notify-send delivers notifications and uv prunes its cache. keeper status lists any that are missing. Removing packages and running paccache use sudo -n, so they need passwordless sudo for those commands.

Set up with your agent

npx skills add cjber/keeper # skill for any agent that reads Agent Skills

The skill is at skills/keeper/SKILL.md. The source package also installs it to /usr/lib/keeper/skills, and the binary package to /usr/share/doc/keeper-bin/skills. In Claude Code, the plugin works too: /plugin marketplace add cjber/keeper, then /plugin install keeper@keeper. Then ask your agent:

Run keeper status, then keeper scan. Show me what is eligible and what is blocked, and why. Plan the low-risk items, then ask me before applying anything else.

Why keeper

How it works

  1. scanRead-only. Every finding, with the blockers that keep it.
  2. agent reviewOptional. Your agent reads PRs and history, then adds holds on unfinished work.
  3. planSaves the eligible findings you chose. Apps and personal files need their id, and medium risk needs --max-risk medium.
  4. applyRescans, then applies the plan. keeper apply PLAN --yes skips anything that changed since the plan.
  5. undoRestores a transaction from the trash.
  6. purgeDeletes trash over 14 days old for good and reports the measured space freed.

To run it yourself, keeper opens a terminal wizard over the same calls. Findings are grouped by category with a count and size. A category with many rows starts folded: h and l fold or expand it, pgup and pgdn page through a long list, and space on a category header selects the eligible findings in the whole section. b shows blocked findings, g switches between the list, space by category and free space history, and r rescans everything. keeper timer install then cleans up low-risk items every night.

Commands

Set KEEPER_ACTOR to name yourself in holds, claims and the log.

What it finds

Each scan category, with its risk. Only low-risk findings can run unattended, and report-only findings are never removed.

Code and system

Personal and application data

Apps, large files, downloads, screenshots and duplicates are personal or application data, so they are only planned when you name their id. keeper plan with no ids never takes them, even with --max-risk medium.

large and duplicates skip application trees: anything under a Wine prefix, a Steam, Lutris, Heroic or GOG library, a ~/Games style library, flatpak data or a VM store, and any directory holding an install marker such as a .exe, .toc or .pak. A duplicate is offered only when the copy keeper keeps is in a different top-level folder of your own documents: Documents, Pictures, Music, Videos, Downloads or Desktop.

These block a worktree whatever its age: uncommitted files, commits on no remote, a running process inside it, an open pull request, a rebase, merge, bisect or cherry-pick in progress, and any hold.

Sizes in scans and plans are uncompressed. Trash sits on the same disk, so nothing is freed until keeper purge, which reports the measured change in free space as freed.