feat: add hook uninstall, init aliases, and CLI subcommands - #56
Conversation
3a20e30 to
83276a0CompareThere was a problem hiding this comment.
Pull request overview
This PR extends KeyWatch’s CLI to support uninstalling git hooks (local and global via core.hooksPath) and introduces key-watch --init <shell> to provide keywatch/kw aliases without shipping extra binaries, alongside updated distribution docs/changelog.
Changes:
- Added
--uninstall-hookand--globalsupport for managing hooks in repo-local.git/hooksor Git’s global hooks directory. - Added
--init bash|zsh|fish|posixto print shell alias initialization forkeywatchandkw. - Removed duplicate wrapper binaries and the install script; updated README + changelog to reflect the new install/uninstall flows.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs | Implements global/local hook install target resolution, hook uninstall, and shell init output; adds unit tests for hooks-path resolution/safety. |
src/cli.rs | Extends CLI options and argument grouping for --uninstall-hook, --global, and --init. |
tests/hooks_tests.rs | Updates option construction and adds clap parsing tests for --global/--init interactions. |
tests/scanner_tests.rs | Updates option construction to include new CLI fields. |
README.md | Updates installation/uninstallation docs; documents global hooks and alias init flow. |
CHANGELOG.md | Records the new hook uninstall/global hooks/init changes; notes removal of wrapper binaries/install script. |
Cargo.toml | Removes explicit [[bin]] entries for wrapper binaries (relying on default src/main.rs). |
src/bin/watch.rs | Removed wrapper binary. |
src/bin/keywatch.rs | Removed wrapper binary. |
scripts/install.sh | Removed install/uninstall script in favor of documented flows. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9a06069 to
9b82eebCompare9b82eeb to
c867712CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
876ac25 to
32f443bCompareUh oh!
There was an error while loading. Please reload this page.
Summary
key-watch hook uninstallsupport for local and global Git hooks with safety checks (refuses to remove non-KeyWatch hooks)key-watch init <shell>to print shell aliases forkeywatchandkw, removing duplicate wrapper binariesscan,hook install|uninstall,init, andverify-integrityChanges
git rev-parse --git-path hooksfor worktree/submodule compatibilityscansubcommandVerification