feat: add hook uninstall, init aliases, and CLI subcommands#56
Merged
pixincreate merged 18 commits intomasterfrom May 8, 2026
Merged
feat: add hook uninstall, init aliases, and CLI subcommands#56pixincreate merged 18 commits intomasterfrom
pixincreate merged 18 commits intomasterfrom
Conversation
3a20e30 to
83276a0
Compare
There 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. |
9a06069 to
9b82eeb
Compare
9b82eeb to
c867712
Compare
876ac25 to
32f443b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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