diff --git a/README.md b/README.md index 41bc140..82bac32 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ Available configuration options: --uds TEXT Bind to a UNIX domain socket. --workers INTEGER Number of worker processes. Defaults to the $WEB_CONCURRENCY environment variable if available, or 1. +--version Show the version and exit. --help Show this message and exit. ``` diff --git a/pssecret_server/cli.py b/pssecret_server/cli.py index ca89451..359fc19 100644 --- a/pssecret_server/cli.py +++ b/pssecret_server/cli.py @@ -1,3 +1,5 @@ +from importlib.metadata import version + import click import uvicorn @@ -21,5 +23,6 @@ import uvicorn ), type=int, ) +@click.version_option(version("pssecret_server")) def cli(**kwargs) -> None: uvicorn.run("pssecret_server.main:app", **kwargs)