Skip to content

feat: enable hook-based mode on Windows#809

Open
MauroDeryckere wants to merge 1 commit intortk-ai:developfrom
MauroDeryckere:feat/windows-hook-support-v2
Open

feat: enable hook-based mode on Windows#809
MauroDeryckere wants to merge 1 commit intortk-ai:developfrom
MauroDeryckere:feat/windows-hook-support-v2

Conversation

@MauroDeryckere
Copy link

@MauroDeryckere MauroDeryckere commented Mar 25, 2026

Summary

  • Remove #[cfg(not(unix))] fallbacks in run_default_mode and run_hook_only_mode that forced Windows into legacy CLAUDE.md injection mode
  • Make ensure_hook_installed cross-platform by wrapping only the chmod call in #[cfg(unix)]
  • Windows users can now run rtk init -g and get the same hook-based setup as macOS/Linux (zero context cost, deterministic rewriting)

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk init -g hook script written and settings.json patched on Windows 11
  • Manual testing: PreToolUse hook fires and rewrites commands in a live Claude Code session on Windows (Git Bash)
  • Manual testing: rtk rewrite "git status" returns rtk git status on Windows

@CLAassistant
Copy link

CLAassistant commented Mar 25, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants