Skip to content

Windows: Manual settings.json hook works without WSL #2503

Description

@vbadonskidev-gif

Hey, just wanted to share a finding that might help
improve the Windows docs.

Your installer correctly falls back to CLAUDE.md mode
on native Windows since it can't run the .sh hook script.

However, I found that manually adding the PreToolUse hook
directly to ~/.claude/settings.json works perfectly on
native Windows (PowerShell 7.6.3) without WSL:

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Bash",
      "hooks": [{ 
        "type": "command",
        "command": "rtk hook claude"
      }]
    }]
  }
}

Tested and confirmed working. Maybe worth adding to the
Windows installation docs as an alternative to WSL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions