soulhubcli 1.0.0

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.
package/README.md ADDED
@@ -0,0 +1,139 @@
1
+ # SoulHub CLI
2
+
3
+ SoulHub CLI — 用于安装和管理 OpenClaw AI Agent 人格模板的命令行工具。支持从 SoulHub Registry 或本地目录安装单 Agent 和多 Agent 团队。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install -g soulhubcli
9
+ ```
10
+
11
+ 或使用 npx 直接运行:
12
+
13
+ ```bash
14
+ npx soulhubcli <command>
15
+ ```
16
+
17
+ ## 命令一览
18
+
19
+ | 命令 | 说明 |
20
+ |------|------|
21
+ | `soulhub search <keyword>` | 按关键词搜索 Agent 模板 |
22
+ | `soulhub info <name>` | 查看 Agent 详细信息 |
23
+ | `soulhub install <name>` | 从 Registry 安装 Agent 或团队 |
24
+ | `soulhub install --from <source>` | 从本地目录、ZIP 文件或 URL 安装 |
25
+ | `soulhub list` | 列出已安装的 Agent |
26
+ | `soulhub update [name]` | 更新已安装的 Agent |
27
+ | `soulhub uninstall <name>` | 卸载已安装的 Agent |
28
+ | `soulhub publish` | 验证并发布你的 Agent |
29
+
30
+ ## 使用方法
31
+
32
+ ### 搜索 Agent
33
+
34
+ ```bash
35
+ soulhub search python
36
+ soulhub search "content writing"
37
+ ```
38
+
39
+ ### 安装 Agent
40
+
41
+ CLI 会自动识别目标是单 Agent 还是多 Agent 团队,无需手动区分。
42
+
43
+ **从 Registry 安装:**
44
+
45
+ ```bash
46
+ # 安装单 Agent(作为主 Agent,部署到 workspace 目录)
47
+ soulhub install ops-assistant
48
+
49
+ # 安装多 Agent 团队(调度 Agent + 工作 Agent)
50
+ soulhub install dev-squad
51
+ ```
52
+
53
+ **从本地安装:**
54
+
55
+ ```bash
56
+ # 从本地目录安装(自动识别单/多 Agent)
57
+ soulhub install --from ./my-agent/
58
+
59
+ # 从 ZIP 文件安装
60
+ soulhub install --from ./agent-team.zip
61
+
62
+ # 从 URL 安装
63
+ soulhub install --from https://example.com/agent-team.zip
64
+ ```
65
+
66
+ **指定目标目录:**
67
+
68
+ ```bash
69
+ # 安装到自定义目录(不依赖 OpenClaw 环境)
70
+ soulhub install ops-assistant --dir ./my-agents
71
+
72
+ # 指定 OpenClaw 安装目录
73
+ soulhub install ops-assistant --claw-dir /opt/openclaw
74
+ ```
75
+
76
+ ### 列出已安装的 Agent
77
+
78
+ ```bash
79
+ soulhub list
80
+ ```
81
+
82
+ ### 更新 Agent
83
+
84
+ ```bash
85
+ soulhub update # 更新全部
86
+ soulhub update ops-assistant # 更新指定 Agent
87
+ ```
88
+
89
+ ### 卸载 Agent
90
+
91
+ ```bash
92
+ soulhub uninstall ops-assistant
93
+ ```
94
+
95
+ ## 安装行为说明
96
+
97
+ ### 单 Agent 安装
98
+
99
+ - 单 Agent 会作为**主 Agent** 安装到 OpenClaw 的 `workspace/` 目录
100
+ - 如果已存在主 Agent,CLI 会**自动备份**(复制到 `agentbackup/workspace`),原目录保持不变
101
+ - 仅覆盖 `IDENTITY.md` 和 `SOUL.md` 等灵魂文件,不影响 workspace 中的其他运行时文件
102
+ - 安装完成后自动重启 OpenClaw Gateway;若重启失败会提示手动重启
103
+
104
+ ### 多 Agent 团队安装
105
+
106
+ - **调度 Agent(Dispatcher)** 作为主 Agent 安装到 `workspace/` 目录
107
+ - **工作 Agent(Worker)** 安装到各自的 `workspace-<agentId>/` 目录
108
+ - 自动配置多 Agent 之间的通信
109
+ - Worker Agent 通过 `openclaw agents add` 命令注册
110
+ - 安装完成后自动重启 OpenClaw Gateway
111
+
112
+ ## 配置
113
+
114
+ CLI 将配置存储在 `~/.soulhub/config.json`。
115
+
116
+ ### 自定义 Registry
117
+
118
+ 通过环境变量设置自定义 Registry 地址:
119
+
120
+ ```bash
121
+ export SOULHUB_REGISTRY_URL=https://your-registry.example.com
122
+ ```
123
+
124
+ ### OpenClaw 目录
125
+
126
+ CLI 按以下优先级查找 OpenClaw 安装目录:
127
+
128
+ 1. `--claw-dir` 命令行参数
129
+ 2. `OPENCLAW_HOME` 环境变量
130
+ 3. 默认路径 `~/.openclaw`
131
+
132
+ ## 环境要求
133
+
134
+ - Node.js >= 18.0.0
135
+ - OpenClaw(可选,使用 `--dir` 参数时不需要)
136
+
137
+ ## License
138
+
139
+ MIT
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node