remote-claude 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/remote_claude.py +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remote-claude",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "双端共享 Claude CLI 工具",
5
5
  "bin": {
6
6
  "remote-claude": "bin/remote-claude",
package/remote_claude.py CHANGED
@@ -38,6 +38,13 @@ from utils.session import (
38
38
  # 获取脚本所在目录
39
39
  SCRIPT_DIR = Path(__file__).parent.absolute()
40
40
 
41
+ # 读取版本号(仅 import 时读取一次)
42
+ try:
43
+ import json as _json
44
+ _VERSION = _json.loads((SCRIPT_DIR / "package.json").read_text())["version"]
45
+ except Exception:
46
+ _VERSION = "unknown"
47
+
41
48
 
42
49
  def cmd_start(args):
43
50
  """启动新会话"""
@@ -326,6 +333,7 @@ def cmd_lark_status(args):
326
333
  print("飞书客户端状态")
327
334
  print("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━")
328
335
  print(f"状态: 运行中 ✓")
336
+ print(f"版本: v{_VERSION}")
329
337
  print(f"PID: {status['pid']}")
330
338
  print(f"启动时间: {status['start_time']}")
331
339
  print(f"运行时长: {status['uptime']}")
@@ -429,6 +437,12 @@ def main():
429
437
  """
430
438
  )
431
439
 
440
+ parser.add_argument(
441
+ "--version", "-V",
442
+ action="version",
443
+ version=f"remote-claude v{_VERSION}",
444
+ )
445
+
432
446
  subparsers = parser.add_subparsers(dest="command", help="命令")
433
447
 
434
448
  # start 命令