wechat-ai 0.1.6 → 0.1.8

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 CHANGED
@@ -6,51 +6,38 @@
6
6
  <img src="docs/screenshot.png" width="800" alt="wechat-ai screenshot" />
7
7
  </p>
8
8
 
9
+ ## 快速开始
10
+
11
+ ### 1. 安装
12
+
9
13
  ```bash
10
14
  npm i -g wechat-ai
11
- wechat-ai set qwen sk-xxx
12
- wechat-ai
13
15
  ```
14
16
 
15
- ## 支持模型
16
-
17
- | 模型 | 默认版本 | 设置 Key |
18
- |------|---------|---------|
19
- | 通义千问 (Qwen) | qwen-plus | `wechat-ai set qwen <key>` |
20
- | DeepSeek | deepseek-chat | `wechat-ai set deepseek <key>` |
21
- | Claude | claude-opus-4-6 (Agent) | `wechat-ai set claude <key>` |
22
- | GPT | gpt-4o | `wechat-ai set gpt <key>` |
23
- | Gemini | gemini-2.0-flash | `wechat-ai set gemini <key>` |
24
- | MiniMax | MiniMax-Text-01 | `wechat-ai set minimax <key>` |
25
- | 智谱 (GLM) | glm-4-plus | `wechat-ai set glm <key>` |
17
+ ### 2. 设置 API Key(任选一个模型)
26
18
 
27
- 支持任何 OpenAI 兼容 API,编辑 `~/.wai/config.json` 即可添加。
19
+ ```bash
20
+ wechat-ai set qwen sk-xxx # 通义千问
21
+ wechat-ai set deepseek sk-xxx # DeepSeek
22
+ wechat-ai set gemini AIza-xxx # Gemini
23
+ ```
28
24
 
29
- Claude 通过 [Agent SDK](https://github.com/anthropics/claude-agent-sdk-typescript) 接入,支持执行代码、读写文件、搜索网页,不只是聊天。
25
+ ### 3. 启动
30
26
 
31
- ### API Key 获取
27
+ ```bash
28
+ wechat-ai # 首次启动会弹出微信扫码
29
+ ```
32
30
 
33
- | 模型 | 申请地址 |
34
- |------|---------|
35
- | 通义千问 (Qwen) | https://dashscope.console.aliyun.com/apiKey |
36
- | DeepSeek | https://platform.deepseek.com/api_keys |
37
- | Claude | https://console.anthropic.com/settings/keys |
38
- | GPT | https://platform.openai.com/api-keys |
39
- | Gemini | https://aistudio.google.com/apikey |
40
- | MiniMax | https://platform.minimaxi.com/user-center/basic-information/interface-key |
41
- | 智谱 (GLM) | https://open.bigmodel.cn/usercenter/apikeys |
31
+ 扫码登录后,给微信机器人发消息即可开始对话。
42
32
 
43
- ## 安装运行
33
+ ## 其他安装方式
44
34
 
45
35
  ```bash
46
- # 方式一:直接运行(无需安装)
36
+ # 免安装体验
47
37
  npx wechat-ai
48
38
 
49
- # 方式二:全局安装
50
- npm i -g wechat-ai
51
-
52
- # 方式三:克隆源码
53
- git clone https://github.com/anxiong2025/wechat-ai.git
39
+ # 从源码运行
40
+ git clone https://github.com/anthropics/wechat-ai.git
54
41
  cd wechat-ai && npm install && npm run build && node dist/cli.js
55
42
  ```
56
43
 
@@ -61,9 +48,28 @@ wechat-ai # 启动(首次自动弹出二维码)
61
48
  wechat-ai set <模型> <key> # 保存 API Key
62
49
  wechat-ai use <模型> # 设置默认模型
63
50
  wechat-ai config # 查看配置(Key 已脱敏)
51
+ wechat-ai start # 后台运行(daemon 模式)
52
+ wechat-ai stop # 停止后台进程
53
+ wechat-ai logs # 查看后台日志
64
54
  wechat-ai update # 更新到最新版
65
55
  ```
66
56
 
57
+ ## 支持模型
58
+
59
+ | 模型 | 默认版本 | 设置 Key | 获取 Key |
60
+ |------|---------|---------|---------|
61
+ | 通义千问 (Qwen) | qwen-plus | `wechat-ai set qwen <key>` | [申请](https://bailian.console.aliyun.com/cn-beijing/?tab=model#/api-key) |
62
+ | DeepSeek | deepseek-chat | `wechat-ai set deepseek <key>` | [申请](https://platform.deepseek.com/api_keys) |
63
+ | Claude | claude-opus-4-6 (Agent) | `wechat-ai set claude <key>` | [申请](https://console.anthropic.com/settings/keys) |
64
+ | GPT | gpt-4o | `wechat-ai set gpt <key>` | [申请](https://platform.openai.com/api-keys) |
65
+ | Gemini | gemini-2.0-flash | `wechat-ai set gemini <key>` | [申请](https://aistudio.google.com/apikey) |
66
+ | MiniMax | MiniMax-Text-01 | `wechat-ai set minimax <key>` | [申请](https://platform.minimaxi.com/user-center/basic-information/interface-key) |
67
+ | 智谱 (GLM) | glm-4-plus | `wechat-ai set glm <key>` | [申请](https://open.bigmodel.cn/usercenter/apikeys) |
68
+
69
+ 支持任何 OpenAI 兼容 API,编辑 `~/.wai/config.json` 即可添加。
70
+
71
+ Claude 通过 [Agent SDK](https://github.com/anthropics/claude-agent-sdk-typescript) 接入,支持执行代码、读写文件、搜索网页,不只是聊天。
72
+
67
73
  ### 微信内指令
68
74
 
69
75
  ```
@@ -100,17 +106,6 @@ src/
100
106
  └── openai-compatible.ts 通用 OpenAI 兼容
101
107
  ```
102
108
 
103
- ## 微信协议
104
-
105
- 直接实现微信 ilink bot API,不依赖 OpenClaw:
106
-
107
- - 登录:`ilink/bot/get_bot_qrcode` 扫码
108
- - 收消息:`ilink/bot/getupdates` 长轮询
109
- - 发消息:`ilink/bot/sendmessage`
110
- - 输入状态:`ilink/bot/sendtyping`
111
-
112
- 参考:[@tencent-weixin/openclaw-weixin](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin) (MIT)
113
-
114
109
  ## 计划
115
110
 
116
111
  - [x] 微信 ilink 协议
@@ -118,9 +113,13 @@ src/
118
113
  - [x] 输入状态提示
119
114
  - [x] 7 个内置模型
120
115
  - [x] npm 发布
116
+ - [x] 中间件系统
117
+ - [x] MCP 客户端支持
118
+ - [x] 所有模型 Function Calling
119
+ - [x] 后台运行 (daemon 模式)
121
120
  - [ ] 图片/文件收发
121
+ - [ ] 语音消息 (ASR/TTS)
122
122
  - [ ] Telegram / Discord 渠道
123
- - [ ] MCP 支持
124
123
 
125
124
  ## 协议
126
125