weflow-cli 1.5.0 → 1.6.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/ARCHITECTURE.md +105 -0
- package/CHANGELOG.md +110 -0
- package/CONTRIBUTING.md +45 -0
- package/LICENSE +21 -21
- package/OPERATIONS.md +272 -0
- package/README.en.md +281 -0
- package/README.md +333 -149
- package/SECURITY.md +47 -0
- package/bin/weflow-cli.ts +4032 -583
- package/dist/bin/weflow-cli.js +4296 -593
- package/dist/bin/weflow-cli.js.map +1 -1
- package/dist/mcp-server/index.js +178 -236
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/src/core/dbPathService.d.ts +15 -1
- package/dist/src/core/dbPathService.d.ts.map +1 -1
- package/dist/src/core/dbPathService.js +177 -19
- package/dist/src/core/dbPathService.js.map +1 -1
- package/dist/src/core/keyService.d.ts +8 -0
- package/dist/src/core/keyService.d.ts.map +1 -1
- package/dist/src/core/keyService.js +127 -22
- package/dist/src/core/keyService.js.map +1 -1
- package/dist/src/core/ntCore.d.ts +59 -1
- package/dist/src/core/ntCore.d.ts.map +1 -1
- package/dist/src/core/ntCore.js +188 -64
- package/dist/src/core/ntCore.js.map +1 -1
- package/dist/src/core/sqlcipherCore.d.ts.map +1 -1
- package/dist/src/core/sqlcipherCore.js +18 -1
- package/dist/src/core/sqlcipherCore.js.map +1 -1
- package/dist/src/core/wcdbCore.d.ts.map +1 -1
- package/dist/src/core/wcdbCore.js +3 -6
- package/dist/src/core/wcdbCore.js.map +1 -1
- package/dist/src/services/assistantDaemon.d.ts +19 -0
- package/dist/src/services/assistantDaemon.d.ts.map +1 -0
- package/dist/src/services/assistantDaemon.js +117 -0
- package/dist/src/services/assistantDaemon.js.map +1 -0
- package/dist/src/services/assistantMemory.d.ts +36 -0
- package/dist/src/services/assistantMemory.d.ts.map +1 -0
- package/dist/src/services/assistantMemory.js +182 -0
- package/dist/src/services/assistantMemory.js.map +1 -0
- package/dist/src/services/assistantPrivacy.d.ts +25 -0
- package/dist/src/services/assistantPrivacy.d.ts.map +1 -0
- package/dist/src/services/assistantPrivacy.js +77 -0
- package/dist/src/services/assistantPrivacy.js.map +1 -0
- package/dist/src/services/assistantRouting.d.ts +18 -0
- package/dist/src/services/assistantRouting.d.ts.map +1 -0
- package/dist/src/services/assistantRouting.js +68 -0
- package/dist/src/services/assistantRouting.js.map +1 -0
- package/dist/src/services/assistantService.d.ts +37 -0
- package/dist/src/services/assistantService.d.ts.map +1 -0
- package/dist/src/services/assistantService.js +284 -0
- package/dist/src/services/assistantService.js.map +1 -0
- package/dist/src/services/assistantTools.d.ts +24 -0
- package/dist/src/services/assistantTools.d.ts.map +1 -0
- package/dist/src/services/assistantTools.js +582 -0
- package/dist/src/services/assistantTools.js.map +1 -0
- package/dist/src/services/chatService.d.ts +44 -0
- package/dist/src/services/chatService.d.ts.map +1 -1
- package/dist/src/services/chatService.js +105 -4
- package/dist/src/services/chatService.js.map +1 -1
- package/dist/src/services/configService.d.ts +55 -0
- package/dist/src/services/configService.d.ts.map +1 -1
- package/dist/src/services/configService.js +147 -6
- package/dist/src/services/configService.js.map +1 -1
- package/dist/src/services/evidenceService.d.ts +30 -0
- package/dist/src/services/evidenceService.d.ts.map +1 -0
- package/dist/src/services/evidenceService.js +98 -0
- package/dist/src/services/evidenceService.js.map +1 -0
- package/dist/src/services/exportService.d.ts +13 -20
- package/dist/src/services/exportService.d.ts.map +1 -1
- package/dist/src/services/exportService.js +113 -47
- package/dist/src/services/exportService.js.map +1 -1
- package/dist/src/services/initKeyService.d.ts +19 -0
- package/dist/src/services/initKeyService.d.ts.map +1 -0
- package/dist/src/services/initKeyService.js +80 -0
- package/dist/src/services/initKeyService.js.map +1 -0
- package/dist/src/services/messageContract.d.ts +23 -0
- package/dist/src/services/messageContract.d.ts.map +1 -0
- package/dist/src/services/messageContract.js +49 -0
- package/dist/src/services/messageContract.js.map +1 -0
- package/dist/src/services/messageQuery.d.ts +7 -0
- package/dist/src/services/messageQuery.d.ts.map +1 -0
- package/dist/src/services/messageQuery.js +30 -0
- package/dist/src/services/messageQuery.js.map +1 -0
- package/dist/src/services/wechat-formatter.js +14 -14
- package/dist/src/services/wechatMessageService.d.ts.map +1 -1
- package/dist/src/services/wechatMessageService.js +31 -3
- package/dist/src/services/wechatMessageService.js.map +1 -1
- package/dist/src/services/whitelistService.d.ts +52 -4
- package/dist/src/services/whitelistService.d.ts.map +1 -1
- package/dist/src/services/whitelistService.js +183 -17
- package/dist/src/services/whitelistService.js.map +1 -1
- package/dist/src/types.d.ts +20 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/dateRange.d.ts +15 -0
- package/dist/src/utils/dateRange.d.ts.map +1 -0
- package/dist/src/utils/dateRange.js +48 -0
- package/dist/src/utils/dateRange.js.map +1 -0
- package/dist/src/utils/mcpSecurity.d.ts +5 -0
- package/dist/src/utils/mcpSecurity.d.ts.map +1 -0
- package/dist/src/utils/mcpSecurity.js +39 -0
- package/dist/src/utils/mcpSecurity.js.map +1 -0
- package/dist/src/utils/packageRoot.d.ts +2 -0
- package/dist/src/utils/packageRoot.d.ts.map +1 -0
- package/dist/src/utils/packageRoot.js +16 -0
- package/dist/src/utils/packageRoot.js.map +1 -0
- package/dist/src/utils/python.d.ts +2 -0
- package/dist/src/utils/python.d.ts.map +1 -0
- package/dist/src/utils/python.js +72 -0
- package/dist/src/utils/python.js.map +1 -0
- package/dist/src/utils/pythonProcessEnv.d.ts +3 -0
- package/dist/src/utils/pythonProcessEnv.d.ts.map +1 -0
- package/dist/src/utils/pythonProcessEnv.js +46 -0
- package/dist/src/utils/pythonProcessEnv.js.map +1 -0
- package/dist/src/utils/talkerUtils.d.ts +4 -1
- package/dist/src/utils/talkerUtils.d.ts.map +1 -1
- package/dist/src/utils/talkerUtils.js +9 -9
- package/dist/src/utils/talkerUtils.js.map +1 -1
- package/dist/src/utils/wechatEmoji.d.ts +5 -0
- package/dist/src/utils/wechatEmoji.d.ts.map +1 -0
- package/dist/src/utils/wechatEmoji.js +35 -0
- package/dist/src/utils/wechatEmoji.js.map +1 -0
- package/docs/AI_INTERFACE.md +189 -0
- package/docs/BRANCHES.md +87 -0
- package/docs/DATA_CONTRACT.md +74 -0
- package/docs/DECISIONS.md +270 -0
- package/docs/DEEPSEEK_V4_FLASH/346/226/275/345/267/245/346/226/207/346/241/243.md +234 -0
- package/docs/EVIDENCE_GUIDE.md +96 -0
- package/docs/MCP.md +95 -0
- package/docs/PARTNERS.md +41 -0
- package/docs/PROJECT_STATE.md +96 -0
- package/docs/ROADMAP.md +191 -0
- package/docs/SETUP.md +103 -0
- package/docs/images/weflow-architecture-gpt-image-2.png +0 -0
- package/docs/images/weflow-architecture.png +0 -0
- package/docs/images/weflow-architecture.svg +65 -0
- package/mcp-server/index.ts +169 -269
- package/package.json +81 -72
- package/requirements-3x.txt +4 -0
- package/requirements-voice.txt +15 -0
- package/requirements.txt +9 -0
- package/resources/js/marked.min.js +69 -0
- package/resources/wechat-emoji/666.png +0 -0
- package/resources/wechat-emoji/Awesome.png +0 -0
- package/resources/wechat-emoji/Concerned.png +0 -0
- package/resources/wechat-emoji/Cry.png +0 -0
- package/resources/wechat-emoji/Emm.png +0 -0
- package/resources/wechat-emoji/Facepalm.png +0 -0
- package/resources/wechat-emoji/Grin.png +0 -0
- package/resources/wechat-emoji/OK.png +0 -0
- package/resources/wechat-emoji/Respect.png +0 -0
- package/resources/wechat-emoji/Sick.png +0 -0
- package/resources/wechat-emoji/Sleep.png +0 -0
- package/resources/wechat-emoji/Smile.png +0 -0
- package/resources/wechat-emoji//344/272/262/344/272/262.png +0 -0
- package/resources/wechat-emoji//344/276/277/344/276/277.png +0 -0
- package/resources/wechat-emoji//345/201/267/347/254/221.png +0 -0
- package/resources/wechat-emoji//345/202/262/346/205/242.png +0 -0
- package/resources/wechat-emoji//345/206/215/350/247/201.png +0 -0
- package/resources/wechat-emoji//345/207/213/350/260/242.png +0 -0
- package/resources/wechat-emoji//345/212/240/346/262/271.png +0 -0
- package/resources/wechat-emoji//345/213/276/345/274/225.png +0 -0
- package/resources/wechat-emoji//345/217/221/345/221/206.png +0 -0
- package/resources/wechat-emoji//345/217/221/346/200/222.png +0 -0
- package/resources/wechat-emoji//345/217/221/346/212/226.png +0 -0
- package/resources/wechat-emoji//345/217/257/346/200/234.png +0 -0
- package/resources/wechat-emoji//345/217/263/345/223/274/345/223/274.png +0 -0
- package/resources/wechat-emoji//345/217/271/346/260/224.png +0 -0
- package/resources/wechat-emoji//345/220/203/347/223/234.png +0 -0
- package/resources/wechat-emoji//345/220/210/345/215/201.png +0 -0
- package/resources/wechat-emoji//345/220/220.png +0 -0
- package/resources/wechat-emoji//345/221/262/347/211/231.png +0 -0
- package/resources/wechat-emoji//345/222/222/351/252/202.png +0 -0
- package/resources/wechat-emoji//345/222/226/345/225/241.png +0 -0
- package/resources/wechat-emoji//345/223/207.png +0 -0
- package/resources/wechat-emoji//345/225/244/351/205/222.png +0 -0
- package/resources/wechat-emoji//345/230/230.png +0 -0
- package/resources/wechat-emoji//345/230/264/345/224/207.png +0 -0
- package/resources/wechat-emoji//345/230/277/345/223/210.png +0 -0
- package/resources/wechat-emoji//345/233/247.png +0 -0
- package/resources/wechat-emoji//345/233/260.png +0 -0
- package/resources/wechat-emoji//345/235/217/347/254/221.png +0 -0
- package/resources/wechat-emoji//345/244/247/345/223/255.png +0 -0
- package/resources/wechat-emoji//345/244/251/345/225/212.png +0 -0
- package/resources/wechat-emoji//345/244/252/351/230/263.png +0 -0
- package/resources/wechat-emoji//345/244/261/346/234/233.png +0 -0
- package/resources/wechat-emoji//345/245/270/347/254/221.png +0 -0
- package/resources/wechat-emoji//345/245/275/347/232/204.png +0 -0
- package/resources/wechat-emoji//345/247/224/345/261/210.png +0 -0
- package/resources/wechat-emoji//345/256/263/347/276/236.png +0 -0
- package/resources/wechat-emoji//345/260/264/345/260/254.png +0 -0
- package/resources/wechat-emoji//345/272/206/347/245/235.png +0 -0
- package/resources/wechat-emoji//345/274/261.png +0 -0
- package/resources/wechat-emoji//345/274/272.png +0 -0
- package/resources/wechat-emoji//345/276/227/346/204/217.png +0 -0
- package/resources/wechat-emoji//345/276/256/347/254/221.png +0 -0
- package/resources/wechat-emoji//345/277/203/347/242/216.png +0 -0
- package/resources/wechat-emoji//345/277/253/345/223/255/344/272/206.png +0 -0
- package/resources/wechat-emoji//346/201/220/346/203/247.png +0 -0
- package/resources/wechat-emoji//346/202/240/351/227/262.png +0 -0
- package/resources/wechat-emoji//346/203/212/346/201/220.png +0 -0
- package/resources/wechat-emoji//346/203/212/350/256/266.png +0 -0
- package/resources/wechat-emoji//346/204/211/345/277/253.png +0 -0
- package/resources/wechat-emoji//346/206/250/347/254/221.png +0 -0
- package/resources/wechat-emoji//346/211/223/350/204/270.png +0 -0
- package/resources/wechat-emoji//346/212/223/347/213/202.png +0 -0
- package/resources/wechat-emoji//346/212/240/351/274/273.png +0 -0
- package/resources/wechat-emoji//346/212/261/346/213/263.png +0 -0
- package/resources/wechat-emoji//346/213/245/346/212/261.png +0 -0
- package/resources/wechat-emoji//346/213/263/345/244/264.png +0 -0
- package/resources/wechat-emoji//346/215/202/350/204/270.png +0 -0
- package/resources/wechat-emoji//346/217/241/346/211/213.png +0 -0
- package/resources/wechat-emoji//346/222/207/345/230/264.png +0 -0
- package/resources/wechat-emoji//346/223/246/346/261/227.png +0 -0
- package/resources/wechat-emoji//346/225/262/346/211/223.png +0 -0
- package/resources/wechat-emoji//346/227/240/350/257/255.png +0 -0
- package/resources/wechat-emoji//346/227/272/346/237/264.png +0 -0
- package/resources/wechat-emoji//346/231/225.png +0 -0
- package/resources/wechat-emoji//346/234/210/344/272/256.png +0 -0
- package/resources/wechat-emoji//346/234/272/346/231/272.png +0 -0
- package/resources/wechat-emoji//346/261/227.png +0 -0
- package/resources/wechat-emoji//346/265/201/346/263/252.png +0 -0
- package/resources/wechat-emoji//347/202/270/345/274/271.png +0 -0
- package/resources/wechat-emoji//347/203/237/350/212/261.png +0 -0
- package/resources/wechat-emoji//347/210/206/347/253/271.png +0 -0
- package/resources/wechat-emoji//347/210/261/345/277/203.png +0 -0
- package/resources/wechat-emoji//347/214/252/345/244/264.png +0 -0
- package/resources/wechat-emoji//347/216/253/347/221/260.png +0 -0
- package/resources/wechat-emoji//347/224/237/347/227/205.png +0 -0
- package/resources/wechat-emoji//347/226/221/351/227/256.png +0 -0
- package/resources/wechat-emoji//347/231/274.png +0 -0
- package/resources/wechat-emoji//347/231/275/347/234/274.png +0 -0
- package/resources/wechat-emoji//347/232/261/347/234/211.png +0 -0
- package/resources/wechat-emoji//347/235/241.png +0 -0
- package/resources/wechat-emoji//347/240/264/346/266/225/344/270/272/347/254/221.png +0 -0
- package/resources/wechat-emoji//347/244/274/347/211/251.png +0 -0
- package/resources/wechat-emoji//347/244/276/344/274/232/347/244/276/344/274/232.png +0 -0
- package/resources/wechat-emoji//347/246/217.png +0 -0
- package/resources/wechat-emoji//347/254/221/350/204/270.png +0 -0
- package/resources/wechat-emoji//347/272/242/345/214/205.png +0 -0
- package/resources/wechat-emoji//347/277/273/347/231/275/347/234/274.png +0 -0
- package/resources/wechat-emoji//350/200/266.png +0 -0
- package/resources/wechat-emoji//350/203/234/345/210/251.png +0 -0
- package/resources/wechat-emoji//350/204/270/347/272/242.png +0 -0
- package/resources/wechat-emoji//350/211/262.png +0 -0
- package/resources/wechat-emoji//350/213/246/346/266/251.png +0 -0
- package/resources/wechat-emoji//350/217/234/345/210/200.png +0 -0
- package/resources/wechat-emoji//350/233/213/347/263/225.png +0 -0
- package/resources/wechat-emoji//350/241/260.png +0 -0
- package/resources/wechat-emoji//350/243/202/345/274/200.png +0 -0
- package/resources/wechat-emoji//350/256/251/346/210/221/347/234/213/347/234/213.png +0 -0
- package/resources/wechat-emoji//350/260/203/347/232/256.png +0 -0
- package/resources/wechat-emoji//350/267/263/350/267/263.png +0 -0
- package/resources/wechat-emoji//350/275/254/345/234/210.png +0 -0
- package/resources/wechat-emoji//351/204/231/350/247/206.png +0 -0
- package/resources/wechat-emoji//351/227/255/345/230/264.png +0 -0
- package/resources/wechat-emoji//351/230/264/351/231/251.png +0 -0
- package/resources/wechat-emoji//351/232/276/350/277/207.png +0 -0
- package/resources/wechat-emoji//351/252/267/351/253/205.png +0 -0
- package/resources/wechat-emoji//351/274/223/346/216/214.png +0 -0
- package/scripts/_batch_link_sources.py +73 -73
- package/scripts/_utils.py +29 -0
- package/scripts/annual_report.py +796 -796
- package/scripts/auto_tag.py +128 -128
- package/scripts/biz_daily.py +210 -53
- package/scripts/chat_report.py +10 -0
- package/scripts/chat_stats.py +702 -702
- package/scripts/classify_daily.py +17 -11
- package/scripts/create_reading_notes.py +370 -370
- package/scripts/daily_stats.py +132 -0
- package/scripts/enrich_backlinks.py +163 -163
- package/scripts/export_chat_html.py +1704 -107
- package/scripts/extract_todos.py +445 -404
- package/scripts/fav_server.py +119 -12
- package/scripts/fix_topics.py +111 -111
- package/scripts/generate_ai_report.py +1 -1
- package/scripts/generate_html.py +597 -277
- package/scripts/inspection_records.py +354 -0
- package/scripts/mcp_bridge.py +398 -398
- package/scripts/nt_decrypt.py +693 -48
- package/scripts/pipeline.py +27 -19
- package/scripts/promote_all.py +312 -310
- package/scripts/promote_ideas.py +299 -297
- package/scripts/rag_chat.py +194 -191
- package/scripts/semantic_search.py +435 -431
- package/scripts/sync_fav.py +201 -146
- package/scripts/sync_weread.py +192 -192
- package/scripts/vault_rag.py +140 -139
- package/scripts/vault_search.py +141 -141
- package/scripts/wechat_emoji.py +132 -0
- package/scripts/wechat_emoticon.py +433 -0
- package/scripts/wechat_image.py +258 -0
- package/scripts/wechat_voice.py +327 -0
- package/src/core/dbPathService.ts +163 -18
- package/src/core/keyService.ts +137 -25
- package/src/core/ntCore.ts +202 -61
- package/src/core/sqlcipherCore.ts +17 -1
- package/src/core/wcdbCore.ts +3 -7
- package/src/services/assistantDaemon.ts +111 -0
- package/src/services/assistantMemory.ts +193 -0
- package/src/services/assistantPrivacy.ts +87 -0
- package/src/services/assistantRouting.ts +92 -0
- package/src/services/assistantService.ts +295 -0
- package/src/services/assistantTools.ts +549 -0
- package/src/services/chatService.ts +133 -4
- package/src/services/configService.ts +194 -6
- package/src/services/evidenceService.ts +129 -0
- package/src/services/exportService.ts +113 -48
- package/src/services/initKeyService.ts +83 -0
- package/src/services/messageContract.ts +77 -0
- package/src/services/messageQuery.ts +38 -0
- package/src/services/wechat-formatter.ts +348 -348
- package/src/services/wechatMessageService.ts +25 -3
- package/src/services/wereadService.ts +308 -308
- package/src/services/whitelistService.ts +209 -22
- package/src/types.ts +20 -0
- package/src/utils/dateRange.ts +58 -0
- package/src/utils/mcpSecurity.ts +39 -0
- package/src/utils/packageRoot.ts +14 -0
- package/src/utils/python.ts +73 -0
- package/src/utils/pythonProcessEnv.ts +45 -0
- package/src/utils/talkerUtils.ts +14 -2
- package/dist/src/utils/errors.d.ts +0 -25
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js +0 -43
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/pythonRunner.d.ts +0 -27
- package/dist/src/utils/pythonRunner.d.ts.map +0 -1
- package/dist/src/utils/pythonRunner.js +0 -62
- package/dist/src/utils/pythonRunner.js.map +0 -1
- package/src/utils/errors.ts +0 -42
- package/src/utils/pythonRunner.ts +0 -81
package/README.en.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1>𝗪𝗲𝗙𝗹𝗼𝘄 𝗖𝗟𝗜 <img src="./logo.png" width="280" valign="middle" alt="WeFlow CLI logo" /></h1>
|
|
4
|
+
|
|
5
|
+
[简体中文](./README.md) · **English**
|
|
6
|
+
|
|
7
|
+
*"People today have never seen the moon of ancient times, yet today's moon once shone upon the people of old." — Li Bai*
|
|
8
|
+
|
|
9
|
+
> *"Heaven and earth are the inn of all things; time, a passing traveler through a hundred generations." — Li Bai*
|
|
10
|
+
|
|
11
|
+
> Bring your chat history, official-account reading, and personal knowledge workflows back to your own computer.
|
|
12
|
+
|
|
13
|
+
[](https://www.npmjs.com/package/weflow-cli)
|
|
14
|
+
[](https://nodejs.org/)
|
|
15
|
+
[](https://www.python.org/)
|
|
16
|
+
[](https://github.com/zhuobichen/weflow-cli/releases)
|
|
17
|
+
[](./SECURITY.md)
|
|
18
|
+
[](./LICENSE)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
**WeFlow CLI turns WeChat into your local second brain**: read and query chat history locally with one command, export readable HTML; turn official-account articles into AI-digested daily reports; read your WeChat favorites; build a semantic-searchable knowledge base — and plug it all into MCP-compatible AI editors like Claude Code. Works on Windows and Linux.
|
|
23
|
+
|
|
24
|
+
> 🔒 **Local-first**: runs entirely on your machine — zero telemetry, zero cloud reporting. Database keys are stored locally, encrypted with machine-bound AES-256-GCM. AI features only activate after you explicitly configure your own API key. See the [Security & Privacy statement](./SECURITY.md).
|
|
25
|
+
|
|
26
|
+
> This project is intended only for data you are authorized to access. Please obey applicable laws, WeChat's terms, and the privacy of others.
|
|
27
|
+
|
|
28
|
+
> **⚠️ Use boundaries and risks**: Use this project only on devices you control and only with data you own or are explicitly authorized to access. Do not use it to monitor, track, or read another person's WeChat data, deploy it on someone else's device, or run it remotely and silently. Review applicable laws, WeChat's terms, and account permissions before use; third-party tools may trigger account restrictions or suspension. This is not legal advice, and users are responsible for their use of the project.
|
|
29
|
+
|
|
30
|
+
## At a Glance
|
|
31
|
+
|
|
32
|
+
**WeChat favorites query** (read local `favorite.db`, with type filter and keyword search):
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
$ weflow-cli fav list -n 3
|
|
36
|
+
|
|
37
|
+
收藏列表 (共 1042 条, 显示 3 条):
|
|
38
|
+
|
|
39
|
+
[2026/8/21 19:42:42] [文章] “豆包型人格”爆火,可千万别学
|
|
40
|
+
来源: 中国研究生
|
|
41
|
+
https://mp.weixin.qq.com/s/eDk_kcyd8ltuqn6J3iReVg
|
|
42
|
+
[2026/8/21 10:50:38] [文章] 爆火插件让DeepSeek V4 Pro 0813性能拉满,全面超越 Fable 5!
|
|
43
|
+
来源: 智猩猩AI
|
|
44
|
+
https://mp.weixin.qq.com/s/3GXFjmtUsq42sXJHJGgwyg
|
|
45
|
+
[2026/8/21 10:47:21] [文章] 250年前,一个26岁年轻人写了一本小册子,至今仍在拷问每一个文明社会
|
|
46
|
+
来源: 悦读撷英
|
|
47
|
+
https://mp.weixin.qq.com/s/YIkB8TyyyimPP1hmgQQPZg
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**The full workflow, one command per step**:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
weflow-cli sessions # list chat sessions
|
|
54
|
+
weflow-cli messages "contact" -n 20 # query chat messages
|
|
55
|
+
weflow-cli export "contact" html # export HTML / Excel / Markdown / JSON
|
|
56
|
+
weflow-cli fav list -t article -k AI # favorites: type filter + keyword search
|
|
57
|
+
weflow-cli daily --date 2026-08-21 # official-account digest + AI summary
|
|
58
|
+
weflow-cli daily-server # local reader http://localhost:8765
|
|
59
|
+
weflow-cli chat "How does RAG work?" # knowledge-base RAG Q&A
|
|
60
|
+
weflow-cli mcp-config # one-shot MCP client integration
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## What You Can Do
|
|
64
|
+
|
|
65
|
+
| Scenario | Capability |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| Chat history | Query sessions, contacts, and messages; export to JSON, TXT, Markdown, HTML, Excel. |
|
|
68
|
+
| Official-account digest | Crawl articles, AI summarization and classification, generate a local reading page, keep favorites and read states. |
|
|
69
|
+
| Personal knowledge base | Sync WeRead notes, build an Obsidian vault, semantic search, RAG Q&A, and a concept wiki. |
|
|
70
|
+
| AI collaboration | Expose article crawling, knowledge-base retrieval, digests, and selected local-data tools to MCP-compatible clients. The inventory follows the current code and `docs/MCP.md`. |
|
|
71
|
+
| Personal review | Monthly chat reports, annual reports, todo extraction, and local Moments cache queries. |
|
|
72
|
+
| WeChat favorites | Read WeChat "Favorites" (official-account articles, text, images, videos, chat records) with type filters, keyword search, and Markdown/JSON export. |
|
|
73
|
+
| Second-brain agent | Chat with a local AI assistant inside WeChat: natural-language queries over chats, favorites, Moments, digests, WeRead, todos, and the knowledge base; three-tier memory across sessions, daemonized background service. |
|
|
74
|
+
|
|
75
|
+
> **⚠️ Intended use**: this tool only accesses data of **your own** WeChat account, on your own machine, with your own consent. Do not use it to monitor a partner, employee, or any third party without explicit consent, deploy it onto someone else's device, or run it remotely and silently. Review WeChat's terms, account-risk policies, and local legal requirements. See [SECURITY.md](SECURITY.md).
|
|
76
|
+
|
|
77
|
+
## Quick Start in Three Minutes
|
|
78
|
+
|
|
79
|
+
### 1. Install and Check
|
|
80
|
+
|
|
81
|
+
Requires Node.js 18+, Python 3.10+, and a signed-in Windows WeChat. After installation, check your environment first:
|
|
82
|
+
|
|
83
|
+
```powershell
|
|
84
|
+
npm install -g weflow-cli
|
|
85
|
+
weflow-cli check
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Install the Python dependencies required by the standard Windows 4.x workflow:
|
|
89
|
+
|
|
90
|
+
```powershell
|
|
91
|
+
python -m pip install -r requirements.txt
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If you are still on WeChat 3.x, also install the optional dependencies: `python -m pip install -r requirements-3x.txt`.
|
|
95
|
+
|
|
96
|
+
### 2. Initialize Local Data Access
|
|
97
|
+
|
|
98
|
+
Close WeChat and run the initialization. Follow the prompts to start and sign in to WeChat; the CLI will try to discover the data directory and extract the required keys:
|
|
99
|
+
|
|
100
|
+
```powershell
|
|
101
|
+
weflow-cli init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The WeChat "storage location", account directory, and its `db_storage` directory can all be specified directly:
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
weflow-cli init --path "D:\WeChat\xwechat_files"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Once initialization finishes, verify that your own data is readable:
|
|
111
|
+
|
|
112
|
+
```powershell
|
|
113
|
+
weflow-cli sessions
|
|
114
|
+
weflow-cli contacts -k "keyword"
|
|
115
|
+
weflow-cli messages "contact" -n 10
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
For key, database, or Python environment issues, follow the [Operations & Troubleshooting Guide](./OPERATIONS.md) step by step.
|
|
119
|
+
|
|
120
|
+
### 3. Pick a Workflow
|
|
121
|
+
|
|
122
|
+
**Export a chat history**
|
|
123
|
+
|
|
124
|
+
```powershell
|
|
125
|
+
weflow-cli export "contact" html --output ./output
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
HTML export embeds WeChat's cached thumbnails by default and reconstructs images, custom stickers, system messages, and article cards as far as the local data allows. Remote media is cached per URL under `.cover-cache/` in the output directory, so **a re-export is near-instant** (about 2s for 1600+ messages) and only the first export pays the network cost. Custom stickers decrypt offline from the local cache; when no sticker seed is configured the exporter derives it from WeChat's process memory and prints the command to persist it. Add `--full-images` for originals (5-24MB each) at several times the cost. See the [operations manual](./OPERATIONS.md#4-导出聊天记录) for details.
|
|
129
|
+
|
|
130
|
+
**Generate the official-account digest for a day**
|
|
131
|
+
|
|
132
|
+
```powershell
|
|
133
|
+
weflow-cli daily --date 2026-08-12 --api-key "Your DeepSeek API Key"
|
|
134
|
+
weflow-cli daily-server --date 2026-08-12
|
|
135
|
+
|
|
136
|
+
# Preview articles only; no AI calls or daily-report writes
|
|
137
|
+
weflow-cli daily --date 2026-08-12 --dry-run
|
|
138
|
+
|
|
139
|
+
# Generate without any AI calls; fetching, HTML, and local indexes remain enabled
|
|
140
|
+
weflow-cli daily --date 2026-08-12 --no-ai
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The reader serves at `http://localhost:8765/` by default.
|
|
144
|
+
|
|
145
|
+
**Use the versioned message contract**
|
|
146
|
+
|
|
147
|
+
```powershell
|
|
148
|
+
weflow-cli export "contact" json --contract weflow-v1 --output ./output
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The generated envelope keeps message fields stable and includes conservative `coverage` metadata. For incremental reads, use an overlapping `--from` time window and deduplicate locally by conversation plus `localId`/`serverId`; a stable cursor is not exposed yet. The legacy JSON export remains a top-level array.
|
|
152
|
+
|
|
153
|
+
**Connect an AI editor**
|
|
154
|
+
|
|
155
|
+
```powershell
|
|
156
|
+
weflow-cli mcp-config > .mcp.json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Place the generated configuration wherever your MCP client expects it and restart the client. See `weflow-cli mcp-config` output for the tool list and configuration details.
|
|
160
|
+
|
|
161
|
+
Beyond the knowledge-base tools, the MCP server also exposes selected local WeChat data capabilities (sessions, chat history, favorites, Moments, digests, WeRead, todos, knowledge base, and assistant memory). See the [MCP Integration Guide](./docs/MCP.md) for the current inventory and security boundaries.
|
|
162
|
+
|
|
163
|
+
**Host a local AI assistant in WeChat (second brain)**
|
|
164
|
+
|
|
165
|
+
```powershell
|
|
166
|
+
weflow-cli config set deepseekApiKey "sk-..." # or any OpenAI-compatible endpoint: aiBaseUrl + aiModel
|
|
167
|
+
weflow-cli login-wechat # scan the QR code to bind the messaging channel (a ClawBot contact appears in WeChat)
|
|
168
|
+
weflow-cli assistant start # run the agent as a background daemon
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Then just talk to ClawBot on your phone. The assistant queries local chats and favorites to answer, with memory that survives across sessions:
|
|
172
|
+
|
|
173
|
+
- "What have I been busy with lately?" — synthesizes recent sessions and messages
|
|
174
|
+
- "Summarize my chats with XX" — pulls that thread's history
|
|
175
|
+
- "Which AI articles do I have in favorites?" — searches WeChat favorites
|
|
176
|
+
- "What does this favorited article say?" — fetches and summarizes the article body
|
|
177
|
+
- "What's new on my Moments?" / "Who posts the most?" — Moments timeline and stats
|
|
178
|
+
- "What did official accounts push today? Any AI ones?" — digest queries with topic/keyword filters
|
|
179
|
+
- "What am I reading?" / "My notes on XX" — WeRead shelf and notebooks
|
|
180
|
+
- "Any pending todos? Anything urgent?" — todo list sorted by urgency
|
|
181
|
+
- "How does my knowledge base explain RAG?" — concept-wiki lookup
|
|
182
|
+
- "Remember: my project is called weflow-cli" — writes to long-term memory
|
|
183
|
+
|
|
184
|
+
How it works: the daemon long-polls WeChat's official bot channel (iLink); the agent loop, three-tier memory (working window / rolling summary / long-term facts), and all database queries run on your machine. Only the final question and reply texts go to the configured LLM; phone numbers, emails, and links in tool output are redacted by default (`config set assistantPrivacy strict` for stronger masking; a local `ollama` engine keeps everything offline). Sessions expire after 24h of inactivity, and proactive replies per window are capped by official limits.
|
|
185
|
+
|
|
186
|
+
Cost guardrails: a built-in daily cap of 100 processed messages (send "记忆" in WeChat to check usage). The assistant denies all incoming users by default; configure an explicit whitelist before AI calls are enabled:
|
|
187
|
+
|
|
188
|
+
```powershell
|
|
189
|
+
weflow-cli config set assistantWhitelist "your-@im.wechat-ID" # unset = deny everyone
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Management: `weflow-cli assistant status` / `log` / `stop`; send "帮助" in WeChat for in-chat commands.
|
|
193
|
+
|
|
194
|
+
## Common Commands
|
|
195
|
+
|
|
196
|
+
| Goal | Command |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| Check environment & config | `weflow-cli check` · `weflow-cli config show` |
|
|
199
|
+
| Initialize or specify paths | `weflow-cli init [--path <dir>]` |
|
|
200
|
+
| Browse chat data | `weflow-cli sessions` · `weflow-cli messages <contact>` · `weflow-cli contacts` |
|
|
201
|
+
| Export chat history | `weflow-cli export <contact> <json\|txt\|md\|html\|excel>` |
|
|
202
|
+
| Digest & reader | `weflow-cli daily` · `weflow-cli daily-server` · `weflow-cli review` |
|
|
203
|
+
| Moments cache | `weflow-cli sns timeline` · `weflow-cli sns users` · `weflow-cli sns stats` |
|
|
204
|
+
| WeChat favorites | `weflow-cli fav list` · `weflow-cli fav export markdown` · `weflow-cli fav set-key` |
|
|
205
|
+
| WeRead | `weflow-cli weread shelf` · `notes` · `search` · `stats` |
|
|
206
|
+
| Knowledge base | `weflow-cli vault` · `weflow-cli wiki` · `weflow-cli search <query>` · `weflow-cli chat` |
|
|
207
|
+
| Reports & tasks | `weflow-cli report` · `annual-report` · `todos` |
|
|
208
|
+
| Second-brain assistant | `weflow-cli assistant start` · `status` · `log` · `stop` |
|
|
209
|
+
| AI editor integration | `weflow-cli mcp-config` |
|
|
210
|
+
|
|
211
|
+
Run `weflow-cli <command> --help` for the full options of any command. For example:
|
|
212
|
+
|
|
213
|
+
```powershell
|
|
214
|
+
weflow-cli export --help
|
|
215
|
+
weflow-cli daily --help
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Running from Source
|
|
219
|
+
|
|
220
|
+
```powershell
|
|
221
|
+
git clone https://github.com/zhuobichen/weflow-cli.git
|
|
222
|
+
cd weflow-cli
|
|
223
|
+
npm install
|
|
224
|
+
npm run build
|
|
225
|
+
npm run dev -- check
|
|
226
|
+
npm run dev -- init
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Main Python workflows:
|
|
230
|
+
|
|
231
|
+
```powershell
|
|
232
|
+
# Article crawling -> AI classification -> HTML reading page -> Wiki / learning digest
|
|
233
|
+
python scripts/pipeline.py --date YYYY-MM-DD --api-key "Your API Key" --engine deepseek
|
|
234
|
+
|
|
235
|
+
# Run step by step
|
|
236
|
+
python scripts/biz_daily.py --date YYYY-MM-DD --api-key "Your API Key"
|
|
237
|
+
python scripts/generate_html.py --date YYYY-MM-DD
|
|
238
|
+
python scripts/fav_server.py --date YYYY-MM-DD
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Architecture
|
|
242
|
+
|
|
243
|
+

|
|
244
|
+
|
|
245
|
+
The project is split into four clearly bounded parts:
|
|
246
|
+
|
|
247
|
+
| Directory | Responsibility |
|
|
248
|
+
| --- | --- |
|
|
249
|
+
| `bin/` | Commander CLI entry and interactive flows. |
|
|
250
|
+
| `src/core/` | WeChat data directory discovery, keys, NT/WCDB/SQLCipher database access. |
|
|
251
|
+
| `src/services/` | Chat, contacts, export, config, message channel, and other business capabilities. |
|
|
252
|
+
| `scripts/` | Python workflows: official-account digest, reader, knowledge pipelines, reports, search. |
|
|
253
|
+
| `mcp-server/` | stdio server for MCP clients. |
|
|
254
|
+
|
|
255
|
+
For a more complete view of modules and data flow, read [ARCHITECTURE.md](./ARCHITECTURE.md).
|
|
256
|
+
|
|
257
|
+
## Privacy & Security
|
|
258
|
+
|
|
259
|
+
- Databases, key configuration, and exported files stay on your machine by default; key fields are stored machine-bound and encrypted.
|
|
260
|
+
- Network requests involving DeepSeek, article crawling, WeRead, or MCP happen only when you run the corresponding workflow.
|
|
261
|
+
- Use `whitelist`, `blacklist`, and `audit` to manage or audit message sending; always confirm the target contact and content before sending.
|
|
262
|
+
- After upgrading WeChat, switching accounts, or migrating computers, you may need to re-initialize or re-scan NT keys.
|
|
263
|
+
|
|
264
|
+
## Documentation & Feedback
|
|
265
|
+
|
|
266
|
+
- [Operations & Troubleshooting Guide](./OPERATIONS.md): initialization, NT keys, environment issues, common errors.
|
|
267
|
+
- [Cross-machine Deployment Guide](./docs/SETUP.md): full installation on a new Windows PC.
|
|
268
|
+
- [MCP Integration Guide](./docs/MCP.md): client configuration, tool scopes, security boundaries.
|
|
269
|
+
- [Detailed Architecture](./ARCHITECTURE.md): modules, data flow, implementation boundaries.
|
|
270
|
+
- [Project State](./docs/PROJECT_STATE.md): current capabilities, constraints, priorities, and handoff entry point.
|
|
271
|
+
- [Technical Decisions](./docs/DECISIONS.md): durable design rationale for long-term maintenance.
|
|
272
|
+
- [Electronic Evidence Guide](./docs/EVIDENCE_GUIDE.md): preservation workflow, legal boundaries, and usage notes.
|
|
273
|
+
- [Contributing Guide](./CONTRIBUTING.md) and [Security Policy](./SECURITY.md): development, feedback, and sensitive issues.
|
|
274
|
+
- [Changelog](./CHANGELOG.md): release summaries.
|
|
275
|
+
- [GitHub Issues](https://github.com/zhuobichen/weflow-cli/issues): please attach sanitized command output, OS, WeChat version, and reproduction steps.
|
|
276
|
+
|
|
277
|
+
## Acknowledgments & License
|
|
278
|
+
|
|
279
|
+
This project draws on or uses fine projects such as [WeFlow](https://github.com/hicccc77/WeFlow), [koffi](https://koffi.dev/), [ExcelJS](https://github.com/exceljs/exceljs), and [Scrapling](https://github.com/D4Vinci/Scrapling).
|
|
280
|
+
|
|
281
|
+
Released under the [MIT License](./LICENSE).
|