Expose CLI via runpy (python -m)
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Today, I wanted to invoke chalice CLI from an environment without entry points, but when I did, I encountered an error.
```
draft $ pip-run -q chalice -- -m chalice new-project helloworld
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3: No module named chalice.__main__; 'chalice' is a package and cannot be directly executed
```
It would be nice if the chalice command line interface were exposed via [runpy](https://docs.python.org/3/library/runpy.html) (i.e. `python -m`), offering the same interface as the CLI script.
Contributor guide
Research direction
Start from the existing Chalice CLI entry point and compare its behavior with Python's runpy (`python -m`) invocation. Done means `python -m chalice new-project helloworld` works in an environment without installed entry points and offers the same interface as the CLI script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100