o2-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.
Files changed (39) hide show
  1. {o2_cli-0.1.2 → o2_cli-0.1.3}/PKG-INFO +1 -1
  2. o2_cli-0.1.3/o2_cli/__init__.py +42 -0
  3. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/PKG-INFO +1 -1
  4. {o2_cli-0.1.2 → o2_cli-0.1.3}/pyproject.toml +1 -1
  5. o2_cli-0.1.2/o2_cli/__init__.py +0 -30
  6. {o2_cli-0.1.2 → o2_cli-0.1.3}/LICENSE +0 -0
  7. {o2_cli-0.1.2 → o2_cli-0.1.3}/README.md +0 -0
  8. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/__main__.py +0 -0
  9. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/api_sync.py +0 -0
  10. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/cli.py +0 -0
  11. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/client.py +0 -0
  12. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/__init__.py +0 -0
  13. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/_helpers.py +0 -0
  14. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/account.py +0 -0
  15. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/admin.py +0 -0
  16. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/auth.py +0 -0
  17. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/balance.py +0 -0
  18. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/deposits.py +0 -0
  19. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/fees.py +0 -0
  20. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/markets.py +0 -0
  21. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/mm.py +0 -0
  22. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/notifications.py +0 -0
  23. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/orders.py +0 -0
  24. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/positions.py +0 -0
  25. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/settings.py +0 -0
  26. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/setup_cmd.py +0 -0
  27. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/trades.py +0 -0
  28. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/commands/withdrawals.py +0 -0
  29. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/config.py +0 -0
  30. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/exceptions.py +0 -0
  31. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/output.py +0 -0
  32. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/self_update.py +0 -0
  33. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli/setup.py +0 -0
  34. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/SOURCES.txt +0 -0
  35. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/dependency_links.txt +0 -0
  36. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/entry_points.txt +0 -0
  37. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/requires.txt +0 -0
  38. {o2_cli-0.1.2 → o2_cli-0.1.3}/o2_cli.egg-info/top_level.txt +0 -0
  39. {o2_cli-0.1.2 → o2_cli-0.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: o2-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI for O2 DEX Trading Platform
5
5
  Author: Dylan Wu
6
6
  License-Expression: MIT
@@ -0,0 +1,42 @@
1
+ """O2 CLI - Command-line interface for O2 DEX Trading Platform."""
2
+
3
+ from pathlib import Path
4
+
5
+ __version__ = "0.1.3"
6
+
7
+
8
+ def ensure_skill_installed() -> bool:
9
+ """自动安装或更新 Claude Code Skill 到 ~/.claude/skills/o2-cli/。
10
+
11
+ 首次运行时安装。CLI 升级后自动刷新 skill 内容。
12
+
13
+ Returns:
14
+ True 如果 skill 已存在或刚安装成功,False 如果安装失败。
15
+ """
16
+ skill_dir = Path.home() / ".claude" / "skills" / "o2-cli"
17
+ skill_file = skill_dir / "SKILL.md"
18
+ version_file = skill_dir / ".version"
19
+
20
+ try:
21
+ from o2_cli.setup import SKILL_CONTENT
22
+
23
+ # Check if skill needs update (missing or version mismatch)
24
+ current_version = __version__
25
+ installed_version = ""
26
+ if version_file.exists():
27
+ installed_version = version_file.read_text(encoding="utf-8").strip()
28
+
29
+ needs_update = (
30
+ not skill_file.exists()
31
+ or installed_version != current_version
32
+ )
33
+
34
+ if not needs_update:
35
+ return True
36
+
37
+ skill_dir.mkdir(parents=True, exist_ok=True)
38
+ skill_file.write_text(SKILL_CONTENT, encoding="utf-8")
39
+ version_file.write_text(current_version, encoding="utf-8")
40
+ return True
41
+ except OSError:
42
+ return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: o2-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI for O2 DEX Trading Platform
5
5
  Author: Dylan Wu
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "o2-cli"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  description = "CLI for O2 DEX Trading Platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,30 +0,0 @@
1
- """O2 CLI - Command-line interface for O2 DEX Trading Platform."""
2
-
3
- from pathlib import Path
4
-
5
- __version__ = "0.1.2"
6
-
7
-
8
- def ensure_skill_installed() -> bool:
9
- """自动安装 Claude Code Skill 到 ~/.claude/skills/o2-cli/。
10
-
11
- 首次运行 o2 命令时检查并安装。不覆盖已有文件(用户可能自定义过)。
12
-
13
- Returns:
14
- True 如果 skill 已存在或刚安装成功,False 如果安装失败。
15
- """
16
- skill_dir = Path.home() / ".claude" / "skills" / "o2-cli"
17
- skill_file = skill_dir / "SKILL.md"
18
-
19
- if skill_file.exists():
20
- return True
21
-
22
- try:
23
- from o2_cli.setup import SKILL_CONTENT
24
-
25
- skill_dir.mkdir(parents=True, exist_ok=True)
26
- skill_file.write_text(SKILL_CONTENT, encoding="utf-8")
27
- return True
28
- except OSError:
29
- # 权限不足或其他 IO 错误,静默失败不影响 CLI 使用
30
- return False
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes