Add Windows support and cross-platform hook system#161
Draft
Conversation
- Add PyInstaller spec for building standalone Windows executable - Create PowerShell and batch installer scripts for Windows PATH setup - Convert bash hook scripts to cross-platform Python modules - Update hooks_syncer to use forward slashes for path compatibility - Add GitHub Actions workflow for automated Windows builds on release - Add Windows installation documentation Cross-platform hooks now use `deepwork hook <name>` command format which works on Windows, macOS, and Linux regardless of installation method.
Remove the old bash-based hook scripts that have been replaced by cross-platform Python modules: - user_prompt_submit.sh -> deepwork.hooks.user_prompt_submit - capture_prompt_work_tree.sh -> deepwork.hooks.capture_prompt Also removes duplicate UserPromptSubmit hook entry from settings.json.
- Update architecture.md to reflect cross-platform Python hooks - Remove references to deprecated bash scripts - Update hook system diagrams and descriptions - Bump version to 0.6.0 for Windows support feature - Add changelog entry documenting all changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds full Windows support to DeepWork and refactors the hook system to be cross-platform. The main changes include:
Windows Installation & Distribution: Added PowerShell-based installer scripts and PyInstaller configuration to build standalone Windows executables that can be distributed without Python.
Cross-Platform Hook System: Migrated from shell script-based hooks to Python module-based hooks that work on Windows, macOS, and Linux without requiring bash.
Documentation: Added comprehensive Windows installation guide and updated README with Windows support information.
Key Changes
Windows Support
scripts/build-windows.ps1: PowerShell script to build standalone Windows executable using PyInstallerscripts/install-windows.ps1: PowerShell installer that downloads/installs DeepWork and adds it to user PATHscripts/install-windows.bat: Batch wrapper for PowerShell installer.github/workflows/build-windows.yml: GitHub Actions workflow to automatically build and release Windows executablesscripts/deepwork.spec: PyInstaller spec file for building the Windows executabledoc/installation/windows.md: Comprehensive Windows installation guide with troubleshootingCross-Platform Hook System
src/deepwork/hooks/user_prompt_submit.py: New Python module hook (replaces shell script) that captures work tree state at prompt submissionsrc/deepwork/hooks/capture_prompt.py: Cross-platform work tree capture utility (replacescapture_prompt_work_tree.sh)src/deepwork/hooks/hook_entry.py: Entry point for invoking hooks viadeepwork hook <name>commanddeepwork hook <name>commands in settings filesCode Updates
src/deepwork/core/hooks_syncer.py: Updated to generate cross-platform commands and use forward slashes in paths (works in bash on all platforms)src/deepwork/core/adapters.py: Removed Windows-specific bash permission requirement for job scripts (no longer needed with Python hooks).claude/settings.json: Updated hook configuration to usedeepwork hookcommands.deepwork/jobs/deepwork_rules/hooks/global_hooks.yml: Migrated to Python module-based hookssrc/deepwork/hooks/__init__.py: Updated documentation to reflect cross-platform approachTests
tests/unit/test_cross_platform_hooks.py: New test suite for cross-platform hook implementationstests/unit/test_adapters.py: Updated permission count assertions (removed job script bash permission)Documentation
README.md: Added Windows platform support note and Windows installation section.gitignore: Added exception to keepscripts/deepwork.specin version controlImplementation Details
Why Python Modules for Hooks?
Path Handling
.deepwork/jobs/test/hooks/script.sh) which work in bash on all platforms including Windows (via Git Bash/WSL)deepwork hook <name>command works everywhere regardless of how DeepWork was installed (pip, pipx, Windows EXE, etc.)Windows Executable Distribution
.exefile