Skip to content

Comments

Implement working PowerShell/CMD wrappers for claude-python command#36

Merged
alex-feel merged 4 commits intomainfrom
alex-feel-dev
Aug 16, 2025
Merged

Implement working PowerShell/CMD wrappers for claude-python command#36
alex-feel merged 4 commits intomainfrom
alex-feel-dev

Conversation

@alex-feel
Copy link
Owner

No description provided.

The claude-python command now only works in Git Bash on Windows due to
insurmountable shell escaping issues when passing 28KB of prompt content
through PowerShell/CMD. This change:

- Removes non-functional PowerShell launcher and .cmd wrapper creation
- Creates only bash launchers for all platforms
- Bash wrapper directly executes claude with prompt content using $(cat)
- PowerShell/CMD now properly return 'command not found' instead of
  silently failing to load the system prompt

This prevents users from being misled by a command that appears to work
but actually fails to load the Python developer system prompt.
Removed all references to using system prompts with PowerShell/CMD as
they DO NOT WORK. Updated documentation to clearly state:

- Windows users MUST use Git Bash for claude-python command
- PowerShell/CMD cannot properly pass system prompts
- No workarounds exist for PowerShell/CMD limitations
- Removed non-functional PowerShell command examples

This prevents users from wasting time with non-functional commands.
The previous implementation failed to properly pass the system prompt through PowerShell and CMD due to shell escaping issues. This fix:

- Uses Git Bash as an intermediary to handle the system prompt correctly
- PowerShell: Uses proper escaping with backticks and handles arguments
- CMD: Direct Git Bash invocation with properly escaped quotes
- Both wrappers support additional arguments like --continue

All Windows shells (PowerShell, CMD, Git Bash) now work correctly with the claude-python command.
…lutions

Detailed explanations of how the Windows shell solutions work:
- PowerShell stop-parsing token and escaping mechanics
- CMD command-line parsing and Git Bash invocation
- Complete micro-timeline of execution for both shells

These documents explain the intricate shell escaping required to pass multi-line system prompts through different Windows shells.
@alex-feel alex-feel enabled auto-merge August 16, 2025 10:15
@alex-feel alex-feel merged commit 870efae into main Aug 16, 2025
5 checks passed
@alex-feel alex-feel deleted the alex-feel-dev branch August 16, 2025 10:15
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.

1 participant