@starhui/huly-cli 0.3.0 → 0.4.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 +9 -9
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/skills/huly-cli/SKILL.md +15 -14
package/README.md
CHANGED
|
@@ -47,20 +47,20 @@ npx -y @starhui/huly-cli@latest tools --filter issue --json
|
|
|
47
47
|
## 示例
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
npx -y @starhui/huly-cli@latest
|
|
51
|
-
npx -y @starhui/huly-cli@latest
|
|
52
|
-
npx -y @starhui/huly-cli@latest
|
|
53
|
-
npx -y @starhui/huly-cli@latest
|
|
54
|
-
npx -y @starhui/huly-cli@latest
|
|
55
|
-
npx -y @starhui/huly-cli@latest
|
|
56
|
-
npx -y @starhui/huly-cli@latest
|
|
50
|
+
npx -y @starhui/huly-cli@latest project list --json
|
|
51
|
+
npx -y @starhui/huly-cli@latest project statuses HULY --json
|
|
52
|
+
npx -y @starhui/huly-cli@latest issue list --project HULY --status-category active --limit 20 --json
|
|
53
|
+
npx -y @starhui/huly-cli@latest issue get HULY-123 --project HULY --json
|
|
54
|
+
npx -y @starhui/huly-cli@latest issue create --project HULY --title "Fix login redirect"
|
|
55
|
+
npx -y @starhui/huly-cli@latest issue update HULY-123 --project HULY --status Done
|
|
56
|
+
npx -y @starhui/huly-cli@latest search "login redirect" --json
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
对于没有封装成一级命令的能力,可以直接调用上游 MCP 工具:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
npx -y @starhui/huly-cli@latest
|
|
63
|
-
npx -y @starhui/huly-cli@latest
|
|
62
|
+
npx -y @starhui/huly-cli@latest call list_projects --data '{"limit":10}' --json
|
|
63
|
+
npx -y @starhui/huly-cli@latest call get_issue --field project=HULY --field identifier=HULY-123 --json
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## 命令
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ var validateConfig = (config) => {
|
|
|
62
62
|
}
|
|
63
63
|
if (missing.length > 0) {
|
|
64
64
|
throw new Error(
|
|
65
|
-
`Missing Huly configuration: ${missing.join(", ")}. Set environment variables or pass --config
|
|
65
|
+
`Missing Huly configuration: ${missing.join(", ")}. Set environment variables or pass --config <path>.`
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starhui/huly-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Command-line client for Huly built on top of huly-mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@firfi/huly-mcp": "0.
|
|
39
|
+
"@firfi/huly-mcp": "0.34.0",
|
|
40
40
|
"commander": "15.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
package/skills/huly-cli/SKILL.md
CHANGED
|
@@ -15,11 +15,12 @@ For local development inside this repository, `huly` is also acceptable after `p
|
|
|
15
15
|
```bash
|
|
16
16
|
npx -y @starhui/huly-cli@latest --version
|
|
17
17
|
```
|
|
18
|
-
2.
|
|
18
|
+
2. Check sanitized config from existing environment variables first:
|
|
19
19
|
```bash
|
|
20
|
-
npx -y @starhui/huly-cli@latest
|
|
20
|
+
npx -y @starhui/huly-cli@latest context
|
|
21
21
|
```
|
|
22
|
-
3. If
|
|
22
|
+
3. If required config is missing, ask the user whether to pass an explicit dotenv file with `--config <path>`.
|
|
23
|
+
4. If project is omitted for issue commands, set `HULY_DEFAULT_PROJECT` or pass `--project`.
|
|
23
24
|
|
|
24
25
|
Never print real tokens, passwords, or full `.env` contents. `npx -y @starhui/huly-cli@latest context` is safe because it returns sanitized config.
|
|
25
26
|
|
|
@@ -27,37 +28,37 @@ Never print real tokens, passwords, or full `.env` contents. `npx -y @starhui/hu
|
|
|
27
28
|
|
|
28
29
|
List projects:
|
|
29
30
|
```bash
|
|
30
|
-
npx -y @starhui/huly-cli@latest
|
|
31
|
+
npx -y @starhui/huly-cli@latest project list --json
|
|
31
32
|
```
|
|
32
33
|
|
|
33
34
|
Discover statuses before creating or updating issues:
|
|
34
35
|
```bash
|
|
35
|
-
npx -y @starhui/huly-cli@latest
|
|
36
|
+
npx -y @starhui/huly-cli@latest project statuses HULY --json
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
List issues:
|
|
39
40
|
```bash
|
|
40
|
-
npx -y @starhui/huly-cli@latest
|
|
41
|
+
npx -y @starhui/huly-cli@latest issue list --project HULY --status-category active --limit 20 --json
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
Get an issue:
|
|
44
45
|
```bash
|
|
45
|
-
npx -y @starhui/huly-cli@latest
|
|
46
|
+
npx -y @starhui/huly-cli@latest issue get HULY-123 --project HULY --json
|
|
46
47
|
```
|
|
47
48
|
|
|
48
49
|
Create an issue:
|
|
49
50
|
```bash
|
|
50
|
-
npx -y @starhui/huly-cli@latest
|
|
51
|
+
npx -y @starhui/huly-cli@latest issue create --project HULY --title "Short imperative title" --description "Markdown body"
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
Update an issue:
|
|
54
55
|
```bash
|
|
55
|
-
npx -y @starhui/huly-cli@latest
|
|
56
|
+
npx -y @starhui/huly-cli@latest issue update HULY-123 --project HULY --status Done
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
Search:
|
|
59
60
|
```bash
|
|
60
|
-
npx -y @starhui/huly-cli@latest
|
|
61
|
+
npx -y @starhui/huly-cli@latest search "query text" --limit 10 --json
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
## Raw Tool Access
|
|
@@ -65,9 +66,9 @@ npx -y @starhui/huly-cli@latest --config .env search "query text" --limit 10 --j
|
|
|
65
66
|
Use raw calls when the first-class CLI does not expose an upstream MCP tool:
|
|
66
67
|
|
|
67
68
|
```bash
|
|
68
|
-
npx -y @starhui/huly-cli@latest
|
|
69
|
-
npx -y @starhui/huly-cli@latest
|
|
70
|
-
npx -y @starhui/huly-cli@latest
|
|
69
|
+
npx -y @starhui/huly-cli@latest tools --filter document
|
|
70
|
+
npx -y @starhui/huly-cli@latest call get_issue --field project=HULY --field identifier=HULY-123 --json
|
|
71
|
+
npx -y @starhui/huly-cli@latest call list_projects --data '{"limit":10}' --json
|
|
71
72
|
```
|
|
72
73
|
|
|
73
74
|
`--field key=value` coerces `true`, `false`, `null`, and numbers. Use `--data` or `--file` for nested JSON.
|
|
@@ -78,7 +79,7 @@ npx -y @starhui/huly-cli@latest --config .env call list_projects --data '{"limit
|
|
|
78
79
|
- Read before write: inspect the project/status/issue before mutating it unless the user gave exact values.
|
|
79
80
|
- Destructive commands require confirmation; only pass `--yes` when the user explicitly requested deletion.
|
|
80
81
|
- Prefer status names from `project statuses`; do not invent workflow statuses.
|
|
81
|
-
- If a command fails due to auth/config, report the missing sanitized fields from `npx -y @starhui/huly-cli@latest
|
|
82
|
+
- If a command fails due to auth/config, report the missing sanitized fields from `npx -y @starhui/huly-cli@latest context`; do not expose secrets. Only retry with `--config <path>` after the user confirms which dotenv file to use.
|
|
82
83
|
|
|
83
84
|
## Useful Mapping
|
|
84
85
|
|