codedthemes-cli 0.1.2__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codedthemes-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI tool for Code Theme and Integration
5
5
  Author: codedthemes
6
6
  Requires-Python: >=3.10
@@ -304,8 +304,17 @@ def handle_apply(query: str):
304
304
 
305
305
 
306
306
  def main():
307
+ try:
308
+ from importlib.metadata import version
309
+ __version__ = version("codedthemes-cli")
310
+ except Exception:
311
+ __version__ = "unknown"
312
+
307
313
  parser = argparse.ArgumentParser(prog="codedthemes", description="CodedThemes CLI client")
308
- subparsers = parser.add_subparsers(dest="command", required=True)
314
+ parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {__version__}")
315
+
316
+ subparsers = parser.add_subparsers(dest="command", required=False) # Changed to False to allow --version to work alone
317
+
309
318
 
310
319
  login_parser = subparsers.add_parser("login", help="Login to MCP server")
311
320
  login_parser.add_argument("--server", help="MCP server URL")
@@ -317,6 +326,10 @@ def main():
317
326
 
318
327
  args = parser.parse_args()
319
328
 
329
+ if not args.command:
330
+ parser.print_help()
331
+ sys.exit(0)
332
+
320
333
  if args.command == "login":
321
334
  handle_login(args.server)
322
335
  elif args.command == "init":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codedthemes-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI tool for Code Theme and Integration
5
5
  Author: codedthemes
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codedthemes-cli"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  description = "CLI tool for Code Theme and Integration"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"