diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f93ecb0..b1b7bfc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ All versions prior to 0.0.9 are untracked. when `pip-audit` is invoked in environment mode ([#148](https://github.com/trailofbits/pip-audit/pull/148)) +* CLI: The `pip-audit` CLI can now be accessed through `python -m pip_audit`. + All functionality is identical to the functionality provided by the + `pip-audit` entrypoint + ([#173](https://github.com/trailofbits/pip-audit/pull/173)) + ### Changed ### Fixed diff --git a/README.md b/README.md index df9207da..4a0a6128 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,13 @@ python -m pip install pip-audit ## Usage +You can run `pip-audit` as a standalone program, or via `python -m`: + +```bash +pip-audit --help +python -m pip_audit --help +``` + ``` usage: pip-audit [-h] [-V] [-l] [-r REQUIREMENTS] [-f FORMAT] [-s SERVICE] diff --git a/pip_audit/__main__.py b/pip_audit/__main__.py new file mode 100644 index 00000000..1feb0dad --- /dev/null +++ b/pip_audit/__main__.py @@ -0,0 +1,8 @@ +""" +The `python -m pip_audit` entrypoint. +""" + +if __name__ == "__main__": # pragma: no cover + from pip_audit._cli import audit + + audit()