Skip to content

Conversation

@Higangssh
Copy link
Contributor

@Higangssh Higangssh commented Oct 24, 2025

Problem

I was trying to use the context-monitor statusline on Windows and it just wouldn't work. After digging into it, I
found that all the downloaded configs use python3 commands, but Windows doesn't have python3 - it only has
python.

This affects any statusline or hook that needs to run Python scripts.

Fixes #119

Changes

Added platform-aware Python command detection:

Windows:

  • Tries py (Windows Python launcher) first
  • Falls back to python
  • Then python3 as last resort

Linux/Mac:

  • Keeps using python3 (no change)

Modified files:

  • cli-tool/src/index.js

What it does:

  • Detects OS platform
  • Automatically replaces python3 with python in JSON configs on Windows
  • Updates E2B sandbox Python detection to try multiple commands

Testing

Tested on Windows 11 with Python 3.13.5:

  • python and py commands work
  • ✓ Config replacement works correctly
  • ✓ Statusline and hooks now execute properly
  • ✓ Verified Linux/Mac behavior stays the same

- Replace python3 with python in JSON configs on Windows
- Add cross-platform Python detection (py/python/python3)
- Update E2B sandbox to try multiple Python commands
- Follows PEP 397 Python launcher best practices
@vercel
Copy link

vercel bot commented Oct 24, 2025

@Higangssh is attempting to deploy a commit to the Daniel Avila's projects Team on Vercel.

A member of the Team first needs to authorize it.

@davila7 davila7 merged commit edb5bbe into davila7:main Nov 15, 2025
1 of 2 checks passed
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.

[Bug] Windows compatibility: python3 command not found in statusline and hooks

2 participants