sophhub 0.1.1 → 0.1.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.
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # SophHub CLI
2
+
3
+ SophHub CLI 是一个命令行工具,用于浏览和下载 AI Agent Skill。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install -g sophhub
9
+ ```
10
+
11
+ 或者用 `npx` 免安装直接运行:
12
+
13
+ ```bash
14
+ npx sophhub list
15
+ ```
16
+
17
+ 要求 Node.js >= 18。
18
+
19
+ ## 使用
20
+
21
+ ### 查看所有 Skill
22
+
23
+ ```bash
24
+ sophhub list
25
+ ```
26
+
27
+ 按类型筛选:
28
+
29
+ ```bash
30
+ sophhub list --type builtin
31
+ sophhub list --type store
32
+ ```
33
+
34
+ 以 JSON 格式输出(方便脚本和管道消费):
35
+
36
+ ```bash
37
+ sophhub list --json
38
+ sophhub list --type store --json
39
+ ```
40
+
41
+ ### 下载 Skill
42
+
43
+ 下载到当前目录:
44
+
45
+ ```bash
46
+ sophhub download weather
47
+ ```
48
+
49
+ 指定输出目录:
50
+
51
+ ```bash
52
+ sophhub download didi-ride -o ./my-skills
53
+ ```
54
+
55
+ ### 查看版本
56
+
57
+ ```bash
58
+ sophhub --version
59
+ ```
60
+
61
+ ### 查看帮助
62
+
63
+ ```bash
64
+ sophhub --help
65
+ sophhub list --help
66
+ sophhub download --help
67
+ ```
68
+
69
+ ## 配置
70
+
71
+ 可通过 `~/.sophhubrc.json` 配置默认行为:
72
+
73
+ ```json
74
+ {
75
+ "defaultOutput": "."
76
+ }
77
+ ```
78
+
79
+ | 字段 | 说明 | 默认值 |
80
+ | --- | --- | --- |
81
+ | `defaultOutput` | download 默认输出目录 | `.`(当前目录) |
82
+
83
+ 命令行参数 `-o` 优先级高于配置文件。
84
+
85
+ ## 开发
86
+
87
+ ```bash
88
+ # 克隆仓库
89
+ git clone git@gitlab.sophgo.vip:llm-open-platform/sophclaw-skills.git
90
+ cd sophclaw-skills/cli
91
+
92
+ # 安装依赖
93
+ npm install
94
+
95
+ # 准备内置 skill(从仓库根目录拷贝到 cli/skills/)
96
+ bash scripts/prepublish.sh
97
+
98
+ # 全局注册命令(符号链接,修改代码即时生效)
99
+ npm link
100
+
101
+ # 调试
102
+ sophhub list
103
+ sophhub download weather -o /tmp/test
104
+
105
+ # 调试完毕后卸载
106
+ npm unlink -g sophhub
107
+ ```
108
+
109
+ ## 发版
110
+
111
+ ```bash
112
+ cd cli
113
+
114
+ # 升版本(patch / minor / major)
115
+ npm version patch
116
+
117
+ # 发布(自动触发 prepublish 打包 skills)
118
+ npm publish
119
+
120
+ # 推送 tag
121
+ git push && git push --tags
122
+ ```
package/bin/sophhub.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sophhub",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "SophHub CLI - Manage and download AI Agent skills",
5
5
  "type": "module",
6
6
  "bin": {