Open source, for anyone who builds with AI

Know your git work is safe.

Housekeep checks every repo you've worked on: what's committed, what's pushed, whether main is up to date, and what's left to clean up. In git's own words, with each one explained.

shop-app~/code/shop-app · on feat/checkout-redesign
Could lose work
Red means work could be lost
Why

Your assistant moves faster than you can keep track.

A normal week of building with an AI assistant. None of it raises an error. Git knows about all of it, but only tells you if you ask the right question, in the right folder.

Mon 10:12
Your assistant starts a branch in a new worktreeThe folder lands in a temporary directory that the system empties on its own.
Temporary folder
Tue 18:40
You close the laptopThree commits on feat/checkout were never pushed. This Mac holds the only copy.
3 unpushed
Wed 09:05
GitHub squash-merges pull request #14Locally, git still calls the branch unmerged, so you don't dare delete it.
Squash-merged
Thu 14:30
An agent commits on a detached HEADTesting a fix, it checked out a commit instead of a branch. Switch away and those commits are gone.
2 commits on no branch
Thu 16:10
A .env gets committedOne git add . and your keys are in the history, a push away from GitHub.
Secret committed
Fri 17:00
Twelve repos, thirty branchesWhich are merged, which are safe to delete, which hold the only copy of something? No single git command can say.
No one place to look

Housekeep asks those questions for you, in every repo you've worked on, all day, and turns the answers into one light: red when work could be lost, amber when something needs a look, green when you're clear.

If you build with AI

Claude Code, Cursor, Codex

They make branches, worktrees and commits for you. Housekeep keeps count of all of it, so you don't have to.

If git's words feel foreign

Learn them as you go

Every word is git's own, explained where you see it, so what you pick up works everywhere else too.

If you have too many repos

One command, one light

Every repo you've touched in 45 days, checked at once, with the one thing to do first.

The whole map

Five made-up projects, the real map

Running on scripted repos. Every fix copies a request for your AI assistant, as it does on your own projects.

Housekeep

What you see after npx git-housekeep, then o
~/code $ npx git-housekeep

  housekeep  ·  5 repos  ·  fetched 4 min ago

   portfolio    Could lose work
     Remove a committed secret: .env
      secret committed  ·  1 unpushed  ·  1 ahead of origin/main

   shop-app     Could lose work
     Push 3 unpushed commits
      3 uncommitted  ·  3 unpushed  ·  1 merged branch on origin

   api          Needs attention
     Pull main (fast-forward)
      4 behind origin/main  ·  2 merged branches (2 local, 2 on origin)

   mobile-app   Needs attention
     Review 1 stash
      1 stashed  ·  1 prunable worktree (folder deleted)

   blog         All clear

  2 could lose work  ·  2 need attention  ·  1 all clear

  Each fix is a request for your AI assistant: housekeep <repo> shows it, housekeep copy <repo> copies it.

  o open the map   q quit 

The map is made for a bigger screen. Open the full demo

How it works

Four checks, on every repo

Each uses git's own word, so what you learn here is what GitHub and your AI assistant say too. The beside a word explains it.

Working tree ?
3uncommitted changes

Normal while you work. Commit once something works, so you can always get back to it.

Push ?
3unpushed commits

They exist only on this Mac. Push them so they're safe if this Mac is lost.

Sync ?
0commits apart

This Mac and GitHub agree.

Cleanup ?
1to clean up

Its work is already in origin/main. Safe to delete.

What it catches

The things that are easy to miss

Especially when an AI assistant is making branches and worktrees for you.

Merged, even when git says it isn'tGitHub squash-merged the branch, so its commits never reached main. Housekeep checks the changes, not the commits.
Squash-merged
Commits on no branch at allAn agent committed on a detached HEAD. They count as unpushed, and the request has your assistant give them a branch first.
2 commits on no branch
The .env.local only one worktree hasRemoving a worktree deletes its ignored files too, so one holding anything found nowhere else is never removed.
Has .env.local
A key committed, or already pushedFlagged red, with the order to fix it in: rotate the keys first, then take the file out of git.
Secret pushed: .env
Work on a branch someone deletedWhen a branch with unmerged work disappears from GitHub, Housekeep notes its last commit, so your assistant can bring it back while git still has it.
Recreate 1 deleted branch
Backups that aren'tA remote that's just another folder on the same disk isn't a backup, so it doesn't show green.
Same disk
Careful by design

It never touches your repos

You saw it above: Housekeep only looks. Every fix is a request you hand your AI assistant, which does the work where you can see it.

Only readsIt never commits, pushes, merges or deletes. The one thing it runs is git fetch, which updates git's record of the remote and nothing of yours.
Requests with the checks built inEach tells your assistant what to check first: only delete what's provably in main, never force-push, never push main, because that can put a site live.
Stays on your computerNo account, no telemetry, no server of ours. The only traffic is git's own, and GitHub's when you've set it up.
For AI assistants

Your assistant can check before it says “done”

Claude Code, Cursor or Codex can run it and read the answer, with a request written for them for every fix. npx skills add Dammyjay93/housekeep teaches Claude Code, Cursor, Codex and others to check before they say it's done.

npx git-housekeep . --json

exit 2 · could lose work
{
  "tier": "at-risk",
  "next": {
    "title": "Push 3 unpushed commits",
    "why": "They exist only on this Mac. Pushing copies them to GitHub; origin/main itself isn't changed.",
    "ask": "In /Users/you/code/shop-app, some commits exist only on this computer. Push them to origin so they're backed up, each branch under its own name. Don't change origin/main, and don't force-push. Show me the plan before you start."
  }
}
Get started

One command, nothing to set up

Needs Node 20 and git. For protected branches and pull requests, add the GitHub CLI.

1
npx git-housekeepChecks every repo you've worked on in the last 45 days, and tells you what to do first.
2
Press oOpens the map in your browser, with a request to copy for each fix.
3
housekeep installOn a Mac, keeps it running from login, with the light in your menu bar.
All clear

Get every repo to green.

New to git's words? The glossary draws each one the way the map does.

Read the source