diff --git a/src/pycookiecheat/__main__.py b/src/pycookiecheat/__main__.py index 63869e3..d1e8beb 100644 --- a/src/pycookiecheat/__main__.py +++ b/src/pycookiecheat/__main__.py @@ -4,6 +4,7 @@ import json import logging +from importlib.metadata import version from .chrome import chrome_cookies from .common import BrowserType from .firefox import firefox_cookies @@ -25,8 +26,8 @@ def main() -> None: help="Output to this file in netscape cookie file format", ) parser.add_argument( - "--verbose", "-v", + "--verbose", action="count", default=0, help=( @@ -34,6 +35,12 @@ def main() -> None: "`logging.ERROR`" ), ) + parser.add_argument( + "-V", + "--version", + action='version', + version=version(parser.prog), + ) args = parser.parse_args() logging.basicConfig(level=max(logging.ERROR - 10 * args.verbose, 0))