Skip to content

Use deepwork CLI for hooks instead of python -m#128

Closed
Copilot wants to merge 5 commits intomainfrom
copilot/fix-python-availability-homebrew
Closed

Use deepwork CLI for hooks instead of python -m#128
Copilot wants to merge 5 commits intomainfrom
copilot/fix-python-availability-homebrew

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Homebrew installations don't expose the python command, causing hooks configured with python -m deepwork.hooks.* to fail.

Changes

Core implementation:

  • Modified HookEntry.get_command() in hooks_syncer.py to generate deepwork hook <module> commands
  • Updated test expectations in test_hooks_syncer.py

Documentation:

  • Updated doc/architecture.md example
  • Updated manual test instructions (6 files)
  • Regenerated .claude/settings.json with new format

Example

Before:

# hooks_syncer.py
def get_command(self, project_path: Path) -> str:
    if self.module:
        return f"python -m {self.module}"  # Fails on Homebrew

After:

# hooks_syncer.py
def get_command(self, project_path: Path) -> str:
    if self.module:
        return f"deepwork hook {self.module}"  # Works with all install methods

The deepwork CLI command is available regardless of installation method (Homebrew, pipx, uv, nix, pip).

Original prompt

When a user is using homebrew, python is not available. The hooks should be using the deepwork hooks cli for hooks


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 23, 2026 02:11
… compatibility

Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Python availability when using Homebrew Use deepwork CLI for hooks instead of python -m Jan 23, 2026
Copilot AI requested a review from ncrmro January 23, 2026 02:17
@ncrmro ncrmro marked this pull request as ready for review January 23, 2026 04:54
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the DCO.
✅ (ncrmro)[https://github.com/ncrmro]
❌ @Copilot
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

@ncrmro ncrmro closed this Jan 27, 2026
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.

2 participants