From ba5b841a64a83ee9255dea5b480e5ab1d6828444 Mon Sep 17 00:00:00 2001 From: Aditya Date: Sat, 8 Aug 2026 21:02:43 +0530 Subject: [PATCH] Add --version flag Added version argument to command line parser. --- pythonclaw/main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pythonclaw/main.py b/pythonclaw/main.py index d43691c..0922a43 100644 --- a/pythonclaw/main.py +++ b/pythonclaw/main.py @@ -15,7 +15,7 @@ import asyncio import logging -from . import config +from . import config, __version__ from .core.persistent_agent import PersistentAgent from .core.session_store import SessionStore @@ -406,6 +406,16 @@ def _build_parser() -> argparse.ArgumentParser: "Docs: https://github.com/ericwang915/PythonClaw" ), ) + + # version + parser.add_argument( + "-V", + "--version", + action="version", + version=f"pythonclaw {__version__}", + ) + + # config parser.add_argument( "--config", metavar="PATH",