@wukonglabs/wukong 0.0.3 → 0.0.4
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 +53 -57
- package/dist/cli/help.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,85 +1,81 @@
|
|
|
1
1
|
# @wukonglabs/wukong
|
|
2
2
|
|
|
3
|
-
> CI-First AI Agent CLI
|
|
3
|
+
> CI-First AI Agent CLI — a minimal yet full-featured AI coding assistant
|
|
4
4
|
|
|
5
|
-
Wukong
|
|
5
|
+
Wukong is a CLI AI coding agent with a ReAct reasoning loop, built-in tools, a skill system, and session persistence. Powered by [`@wukonglabs/wukong-agent-sdk`](https://www.npmjs.com/package/@wukonglabs/wukong-agent-sdk).
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
npm install -g @wukonglabs/wukong
|
|
12
|
-
|
|
13
|
-
# 或免安装直接运行
|
|
14
|
-
npx @wukonglabs/wukong agent -m "你好"
|
|
10
|
+
npm install -g @wukonglabs/wukong@latest
|
|
15
11
|
```
|
|
16
12
|
|
|
17
|
-
>
|
|
13
|
+
> Requires Node.js >= 22. Pure JS/TS, no native addons — install and run, no C++ toolchain needed.
|
|
18
14
|
|
|
19
|
-
##
|
|
15
|
+
## First Run (Interactive Setup)
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Run `wukong` directly. If no model provider is configured, an interactive wizard starts:
|
|
22
18
|
|
|
23
19
|
```text
|
|
24
|
-
🔧
|
|
25
|
-
|
|
26
|
-
1) OpenAI
|
|
27
|
-
2) Anthropic
|
|
28
|
-
3) OpenAI
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
✅
|
|
20
|
+
🔧 No model config detected — starting interactive setup
|
|
21
|
+
Choose a provider type:
|
|
22
|
+
1) OpenAI (Official)
|
|
23
|
+
2) Anthropic (Claude Official)
|
|
24
|
+
3) OpenAI-Compatible (custom baseUrl, e.g. DeepSeek / vLLM)
|
|
25
|
+
Enter choice [1]: 3
|
|
26
|
+
API Key: sk-xxx
|
|
27
|
+
Base URL (required, e.g. https://api.deepseek.com/v1): https://api.deepseek.com/v1
|
|
28
|
+
Model name: deepseek-chat
|
|
29
|
+
✅ Config saved to /Users/you/.wukong/wukong.json
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
Config is written to `~/.wukong/wukong.json` (permissions `0600`). You can also manually configure as described below.
|
|
37
33
|
|
|
38
|
-
>
|
|
34
|
+
> Non-interactive environments (pipes / CI) skip the wizard; use env vars or a config file instead.
|
|
39
35
|
|
|
40
|
-
##
|
|
36
|
+
## Usage
|
|
41
37
|
|
|
42
38
|
```bash
|
|
43
|
-
#
|
|
39
|
+
# Interactive mode
|
|
44
40
|
wukong
|
|
45
41
|
|
|
46
|
-
#
|
|
47
|
-
wukong agent --message "
|
|
42
|
+
# Single-shot
|
|
43
|
+
wukong agent --message "Check my package.json"
|
|
48
44
|
|
|
49
|
-
# JSON
|
|
50
|
-
wukong agent --json --message "
|
|
45
|
+
# JSON output (for programmatic use)
|
|
46
|
+
wukong agent --json --message "List files in current directory"
|
|
51
47
|
|
|
52
|
-
#
|
|
53
|
-
wukong agent --message "
|
|
48
|
+
# Reuse session (multi-turn)
|
|
49
|
+
wukong agent --message "Continue the last task" --session-id "my_session"
|
|
54
50
|
|
|
55
|
-
#
|
|
56
|
-
wukong agent --message "
|
|
51
|
+
# Custom system prompt
|
|
52
|
+
wukong agent --message "Review this PR" --system-prompt "You are a code reviewer"
|
|
57
53
|
|
|
58
|
-
#
|
|
59
|
-
wukong agent --message "
|
|
54
|
+
# Image recognition (requires vision config)
|
|
55
|
+
wukong agent --message "Describe this image" --images https://example.com/shot.png
|
|
60
56
|
```
|
|
61
57
|
|
|
62
|
-
### CLI
|
|
58
|
+
### CLI Options
|
|
63
59
|
|
|
64
|
-
|
|
|
65
|
-
| ----------------- |
|
|
66
|
-
| `agent` | -
|
|
67
|
-
| `--message` | `-m`
|
|
68
|
-
| `--session-id` | `-s`
|
|
69
|
-
| `--system-prompt` | -
|
|
70
|
-
| `--images` | -
|
|
71
|
-
| `--json` | -
|
|
72
|
-
| `--test` | -
|
|
60
|
+
| Option | Short | Description |
|
|
61
|
+
| ----------------- | ----- | ---------------------------------------- |
|
|
62
|
+
| `agent` | - | Subcommand: single-shot mode |
|
|
63
|
+
| `--message` | `-m` | Message content |
|
|
64
|
+
| `--session-id` | `-s` | Session ID (default: `cli:local`) |
|
|
65
|
+
| `--system-prompt` | - | Injected system prompt |
|
|
66
|
+
| `--images` | - | Image URLs (multiple allowed) |
|
|
67
|
+
| `--json` | - | JSON output |
|
|
68
|
+
| `--test` | - | Test mode: send test message then exit |
|
|
73
69
|
|
|
74
|
-
##
|
|
70
|
+
## Configuration
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
Priority: `CLI args > env vars (.env) > config file (wukong.json) > defaults`
|
|
77
73
|
|
|
78
|
-
|
|
74
|
+
Config file lookup order: `$WUKONG_CONFIG_PATH` → `./wukong.json` → `~/.wukong/wukong.json`
|
|
79
75
|
|
|
80
|
-
###
|
|
76
|
+
### Minimal Config File
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
Place at `~/.wukong/wukong.json` (global) or `./wukong.json` (project):
|
|
83
79
|
|
|
84
80
|
```json
|
|
85
81
|
{
|
|
@@ -95,24 +91,24 @@ wukong agent --message "识别这张图片" --images https://example.com/shot.pn
|
|
|
95
91
|
}
|
|
96
92
|
```
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
Works with any OpenAI-compatible endpoint and Anthropic Claude. Provider type is auto-detected from model name / baseUrl.
|
|
99
95
|
|
|
100
|
-
###
|
|
96
|
+
### Environment Variables (Recommended)
|
|
101
97
|
|
|
102
98
|
```bash
|
|
103
99
|
OPENAI_API_KEY=sk-xxx # → providers.openai.apiKey
|
|
104
|
-
LLM_BASE_URL=https://api.xxx/v1 # → providers.openai.baseUrl
|
|
100
|
+
LLM_BASE_URL=https://api.xxx/v1 # → providers.openai.baseUrl
|
|
105
101
|
LLM_MODEL=gpt-4o # → agent.defaultModel
|
|
106
102
|
ANTHROPIC_API_KEY=sk-ant-xxx # → providers.anthropic.apiKey
|
|
107
103
|
```
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
Config file string values support `${VAR_NAME}` templates referencing env vars.
|
|
110
106
|
|
|
111
|
-
>
|
|
107
|
+
> Full config options (multi-provider, Vision, Skills) → [root README](https://cnb.cool/O.o/wukong).
|
|
112
108
|
|
|
113
|
-
## Skills
|
|
109
|
+
## Skills
|
|
114
110
|
|
|
115
|
-
|
|
111
|
+
Inject domain knowledge and custom tools via `SKILL.md` files — no source changes needed. Skills auto-load from `<install-dir>/skills/bundled/`, `~/.wukong/skills/`, `<project>/skills/`, and configured directories (later paths override earlier ones by name). See root README for details.
|
|
116
112
|
|
|
117
113
|
## License
|
|
118
114
|
|
package/dist/cli/help.js
CHANGED
|
@@ -51,7 +51,7 @@ Wukong (悟空) — CI-First AI Agent CLI
|
|
|
51
51
|
工具权限(安全相关):
|
|
52
52
|
--profile <name> 工具权限 profile(覆盖 wukong.json 的 tools.profile)
|
|
53
53
|
可选值: minimal | chat | coding(默认) | messaging | full
|
|
54
|
-
chat → 只读工具集(read/list/grep/search/
|
|
54
|
+
chat → 只读工具集(read/list/grep/search/skills)
|
|
55
55
|
无 exec_command/write_file/web_fetch,适合对话模式,
|
|
56
56
|
防止被社工诱导发 curl 外发敏感信息
|
|
57
57
|
coding → 完整开发权限(默认)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wukonglabs/wukong",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "CI-First AI Agent CLI — 极简但功能完整的 AI 编程助手(ReAct 循环 + 内置工具 + 技能系统)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"wukong": "dist/index.js"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@wukonglabs/wukong-agent-sdk": "0.0.
|
|
34
|
+
"@wukonglabs/wukong-agent-sdk": "0.0.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^25.3.2",
|