Skip to content

feat: add hook uninstall, alias init, and CLI subcommands#56

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

feat: add hook uninstall, alias init, and CLI subcommands#56
pixincreate wants to merge 15 commits intomasterfrom
feature/hook-uninstall-alias-init

Conversation

@pixincreate
Copy link
Copy Markdown
Owner

@pixincreate pixincreate commented May 5, 2026

Summary

  • add first-class hook uninstall support for local and global hook targets
  • add key-watch init <shell> for keywatch and kw aliases while removing duplicate wrapper binaries and simplifying installation guidance
  • redesign the CLI around scan, hook install|uninstall, init, and verify-integrity, including updated hook templates, docs, and test coverage

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 Outdated
Comment thread src/lib.rs Outdated
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
@pixincreate pixincreate requested a review from Copilot May 6, 2026 17:32
@pixincreate pixincreate changed the title feat: add hook uninstall and alias init feat: add hook uninstall, alias init, and CLI subcommands May 7, 2026
@pixincreate pixincreate force-pushed the feature/hook-uninstall-alias-init branch from 9a06069 to 9b82eeb Compare May 7, 2026 16:32
@pixincreate pixincreate force-pushed the feature/hook-uninstall-alias-init branch from 9b82eeb to c867712 Compare May 7, 2026 16:33
@pixincreate pixincreate requested review from Copilot and removed request for Copilot May 7, 2026 16:34
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

Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.

Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/cli.rs
Comment thread src/lib.rs
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

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Comment thread src/scanner.rs
Comment thread src/lib.rs Outdated
Comment thread CHANGELOG.md Outdated
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