Skip to content

feat: add hook uninstall and alias init#56

Open
pixincreate wants to merge 6 commits intomasterfrom
feature/hook-uninstall-alias-init
Open

feat: add hook uninstall and alias init#56
pixincreate wants to merge 6 commits intomasterfrom
feature/hook-uninstall-alias-init

Conversation

@pixincreate
Copy link
Copy Markdown
Owner

Summary

  • add first-class hook uninstall support for local and global hook targets
  • add key-watch --init <shell> for keywatch and kw aliases without shipping duplicate binaries
  • simplify install docs to cargo-first/manual-release flows and update changelog

Verification

  • cargo fmt -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test

@pixincreate pixincreate force-pushed the feature/hook-uninstall-alias-init branch from 3a20e30 to 83276a0 Compare May 5, 2026 12:49
@pixincreate pixincreate requested a review from Copilot May 5, 2026 13:01
@pixincreate pixincreate self-assigned this May 5, 2026
@pixincreate pixincreate added the enhancement New feature or request label May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-hook and --global support for managing hooks in repo-local .git/hooks or Git’s global hooks directory.
  • Added --init bash|zsh|fish|posix to print shell alias initialization for keywatch and kw.
  • 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.

Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs
Comment thread src/lib.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants