Skip to content

Loading the guide…

    Upgrading

    Updated

    This page covers installing a newer HoundWatch™, and moving from CodeHound, its old name.

    Install a newer version

    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/houndwatch

    If you installed from GitHub (with access to the repository), run the same pipx install git+https://github.com/open8arms/houndwatch command with --force. Once HoundWatch is on PyPI, use pipx upgrade houndwatch.

    Then, in each project:

    houndwatch hooks install
    houndwatch hooks install --agent claude-code

    Use 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.

    From CodeHound to HoundWatch™

    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.

    The old-folder notice

    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:

    text
    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 --upgrade

    Plain houndwatch init stops there, so your old setup isn't left behind:

    text
    houndwatch: init stopped so the folder(s) above are not left behind; run: houndwatch init --upgrade

    Steps

    1. Stop the old watcher first, if one is running. Run codehound off from your terminal while the old package is still installed. Stop a foreground codehound watch with Ctrl-C. If you used an old login agent, see the note below.

    2. Remove the old package with pipx uninstall codehound, if you installed it with pipx.

    3. Install HoundWatch (Install HoundWatch™).

    4. In each project:

      houndwatch init --upgrade
      houndwatch hooks install
      houndwatch hooks install --agent claude-code
      houndwatch on

      Use only the hooks you use, and --user if 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, and codehound- set names in your config.
    • Also sets aside a database from version 0.1, or one HoundWatch can't use, as houndwatch.v01.db and 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 init steps. 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, run houndwatch init --baseline in your own terminal.

    For example:

    text
    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/myapp

    If 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:

    text
    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.

    Old hooks

    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.