area:clieffort-largeenhancementhelp wantedplatform:windowspriority:medium
Repository metrics
- Stars
- (48,085 stars)
- PR merge metrics
- (Avg merge 11d 1h) (45 merged PRs in 30d)
Description
Summary
Add first-class Claude Code PowerShell compatibility when CLAUDE_CODE_USE_POWERSHELL_TOOL=1 is enabled.
Problem
RTK already supports Claude's Bash hook flow, but Claude Code on Windows can route shell calls through the PowerShell tool instead. In that mode RTK currently misses several integration points:
rtk init -gon Windows falls back to--claude-mdinstead of installing a compatible hooksettings.jsoncannot be patched with a matcher entry that covers bothBashandPowerShelltool names on Windowsrtk session/rtk discoveronly account for Bash tool-use extraction- hook diagnostics and status reporting do not surface a PowerShell hook path
Proposed solution
- add an embedded
hooks/claude/rtk-rewrite.ps1hook script - support
rtk init -g --shell powershell - auto-detect
CLAUDE_CODE_USE_POWERSHELL_TOOL=1on Windows during global init - patch and remove
settings.jsonentries with aBash|PowerShellmatcher for the.ps1hook - include PowerShell hooks in hook status and config reporting
- extract
PowerShelltool calls in session/discover analytics the same way as Bash - cover the new behavior with focused unit tests
Acceptance criteria
rtk init -g --shell powershellinstalls a.ps1hook and patches Claude settings- Windows global init can route to the PowerShell hook flow when the Claude env var is set
- hook health checks recognize either Bash or PowerShell Claude hooks
- discover/session analytics count both
BashandPowerShellClaude tool calls - the PowerShell path is covered by unit tests for parsing, settings mutation, and embedded hook content
Related issues
- Related: #1248