Upgrading
Updated
This page covers installing a newer HoundWatch™, and moving from CodeHound, its old name.
From a local clone, after git pull, delete the old build output first. It is not tracked by
git, and old modules left in it can end up in the new install:
rm -rf ~/src/houndwatch/build
pipx install --force ~/src/houndwatchIf you installed from GitHub (with access to the repository), run the same
pipx install git+https://github.com/ command with --force. Once
HoundWatch is on PyPI, use pipx upgrade houndwatch.
Then, in each project:
houndwatch hooks install
houndwatch hooks install --agent claude-codeUse only the hooks you have. Add --user to the second command if that is how you installed
it. This points the hooks at the new install and refreshes any that have changed. In a project
with hooks in a global folder, run the first command in a terminal, because it asks before
writing there.
Restart the watcher too, or it keeps running the old version. Run houndwatch off in your
terminal, then houndwatch on. If you use a login agent, run houndwatch on --login so its
file has the current path.
HoundWatch used to be called CodeHound. The package, command and folders now use the new name,
and rule ids that started with codehound- now start with houndwatch-. Nothing is moved
until you ask.
If HoundWatch finds a .codehound/ folder in the project or ~/.codehound/ in your home, and
no set-up new folder in its place, every command says so first:
houndwatch: found /Users/you/Projects/myapp/.codehound from before the rename to HoundWatch, not yet moved to /Users/you/Projects/myapp/.houndwatch; move it with: houndwatch init --upgradePlain houndwatch init stops there, so your old setup isn't left behind:
houndwatch: init stopped so the folder(s) above are not left behind; run: houndwatch init --upgradeStop the old watcher first, if one is running. Run
codehound offfrom your terminal while the old package is still installed. Stop a foregroundcodehound watchwith Ctrl-C. If you used an old login agent, see the note below.Remove the old package with
pipx uninstall codehound, if you installed it with pipx.Install HoundWatch (Install HoundWatch™).
In each project:
houndwatch init --upgrade houndwatch hooks install houndwatch hooks install --agent claude-code houndwatch onUse only the hooks you use, and
--userif you used it before.
What init --upgrade does:
- Moves
.codehound/to.houndwatch/, and~/.codehound/to~/.houndwatch/. Anything in both folders stays in the old one for you to merge by hand, and it tells you so. - Renames the database, the
codehound-rule ids stored in it, andcodehound-set names in your config. - Also sets aside a database from version 0.1, or one HoundWatch can't use, as
houndwatch.v01.dband creates a new one. Only you can agree to this, in your own terminal: it asks first and takes a reason. Stop the watcher first. - Then runs the normal
initsteps. The project was set up before, so this doesn't change the baseline. If its database was set aside, the new one has no baseline. To accept today's problems, runhoundwatch init --baselinein your own terminal.
For example:
houndwatch: moved /Users/you/Projects/myapp/.codehound to /Users/you/Projects/myapp/.houndwatch
houndwatch: renamed rule set(s) codehound-boundaries in /Users/you/Projects/myapp/.houndwatch/config.yaml
houndwatch: moved /Users/you/.codehound to /Users/you/.houndwatch
houndwatch: set up in /Users/you/Projects/myappIf a config still has an old rule set name, such as codehound-boundaries, HoundWatch can't tell
which rules are on. It blocks commits until the name is changed. houndwatch init --upgrade
changes it for you.
It does not change rule ids in your rule files. A rule with a codehound- id is skipped, and
commits are blocked until you change it. The message gives the new id:
rule id 'codehound-example' uses the name from before the rename to HoundWatch; rename it to 'houndwatch-example'Change it in the file, then run houndwatch rules validate.
Hooks installed as CodeHound call the old command. If that package is gone, they skip their
check and let the commit through. Until you reinstall them, hooks status may still show an old
hook as installed. houndwatch hooks install replaces them with HoundWatch hooks and keeps any
hook they wrapped.
To remove them instead, run houndwatch hooks uninstall (and
hooks uninstall --agent claude-code) in your terminal. It recognises hooks from before the
rename.
An old login agent still starts the old command. houndwatch off --login removes the one
recorded for that project and prints the command that unloads it. Then use houndwatch on --login to write a new one, if you want it.