@agentunion/kite 1.6.0 → 1.6.1

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,3 +1,11 @@
1
1
  """Kite CLI - 模块安装管理工具"""
2
+ import json
3
+ from pathlib import Path
2
4
 
3
- __version__ = "1.0.0"
5
+ # package.json 读取版本号
6
+ _package_json = Path(__file__).parent.parent / "package.json"
7
+ try:
8
+ with open(_package_json, "r", encoding="utf-8") as f:
9
+ __version__ = json.load(f)["version"]
10
+ except Exception:
11
+ __version__ = "unknown"
package/kite_cli/main.py CHANGED
@@ -172,7 +172,7 @@ def main():
172
172
  return 0
173
173
 
174
174
  if len(sys.argv) > 1 and sys.argv[1] in ("-V", "-v", "--version", "version"):
175
- print(f"kite-cli {__version__}")
175
+ print(f"kite {__version__}")
176
176
  return 0
177
177
 
178
178
  # 处理命令别名(在 argparse 解析之前)
@@ -354,7 +354,7 @@ def main():
354
354
  print_help()
355
355
  return 0
356
356
  if args.version:
357
- print(f"kite-cli {__version__}")
357
+ print(f"kite {__version__}")
358
358
  return 0
359
359
 
360
360
  # 没有命令 → 显示帮助
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentunion/kite",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Kite framework launcher — start Kite from anywhere",
5
5
  "bin": {
6
6
  "kite": "./cli.js"