Skip to content

feat: add __main__.py for cross-platform CLI invocation#513

Merged
werk24 merged 1 commit into
mainfrom
feature/add-main-module
Mar 26, 2026
Merged

feat: add __main__.py for cross-platform CLI invocation#513
werk24 merged 1 commit into
mainfrom
feature/add-main-module

Conversation

@jmtts
Copy link
Copy Markdown
Collaborator

@jmtts jmtts commented Mar 26, 2026

Problem

On Windows, pip install werk24 places the werk24 CLI script in a Scripts/ directory that is often not on the system PATH. This causes werk24 init to fail with CommandNotFoundException.

Users also tried python -m werk24.cli.werk24 init which fails because there's no __main__.py wiring.

Solution

Adds werk24/__main__.py so that python -m werk24 works as a reliable, PATH-independent alternative:

python -m werk24 init       # always works
python -m werk24 --help     # always works
werk24 init                 # still works if Scripts/bin is on PATH

Changes

  • Added werk24/__main__.py that delegates to the existing typer app

Adds __main__.py to the werk24 package so users can run
'python -m werk24' as a reliable alternative to the 'werk24'
console_scripts entry point.

On Windows, pip installs CLI scripts to a Scripts/ directory
that is often not on the system PATH, causing 'werk24 init'
to fail with CommandNotFoundException. This module provides
a PATH-independent fallback via 'python -m werk24 init'.
@werk24 werk24 merged commit e80292c into main Mar 26, 2026
7 checks passed
@jmtts jmtts mentioned this pull request Mar 26, 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.

3 participants