ex-brain 0.1.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.
Files changed (3) hide show
  1. package/README.md +95 -0
  2. package/dist/cli.js +93543 -0
  3. package/package.json +37 -0
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # ex-brain
2
+
3
+ CLI 个人知识库,基于 [seekdb](https://docs.seekdb.ai/) 构建,支持页面管理、混合检索、时间线、标签、导入导出与 MCP Server。
4
+
5
+ ## 核心功能
6
+
7
+ - **知识图谱可视化** - 交互式图谱,展示实体关联关系
8
+ - **智能编译** - 语义分析,智能更新 Compiled Truth
9
+ - **时间线管理** - 自动提取事件,记录历史演变
10
+ - **混合检索** - 全文搜索 + 向量语义查询
11
+ - **实体链接** - 自动识别实体,创建关联页面
12
+
13
+ ## 数据采集
14
+
15
+ 推荐使用 [MarkSnip](https://chromewebstore.google.com/detail/kcbaglhfgbkjdnpeokaamjjkddempipm) 作为数据采集工具:
16
+
17
+ - 一键剪藏网页为 Markdown 格式
18
+ - 支持代码块、表格、数学公式
19
+ - 本地处理,隐私友好
20
+ - 支持 Obsidian 集成
21
+
22
+ 配合 ex-brain 使用:
23
+
24
+ ```bash
25
+ # MarkSnip 剪藏后,导入到知识库
26
+ cat article.md | ebrain put articles/slug --stdin
27
+
28
+ # 或智能编译
29
+ ebrain compile companies/river-ai --file article.md --source web_clip
30
+ ```
31
+
32
+ ## 安装
33
+
34
+ ```bash
35
+ # 全局安装(需要 Bun 或 Node.js)
36
+ bun install -g ex-brain
37
+ # 或
38
+ npm install -g ex-brain
39
+
40
+ ebrain --help
41
+ ```
42
+
43
+ ## 快速开始
44
+
45
+ ```bash
46
+ # 初始化(自动创建 ~/.ebrain/data/ebrain.db)
47
+ ebrain init
48
+
49
+ # 写入页面
50
+ ebrain put my/note --file note.md
51
+
52
+ # 知识图谱可视化
53
+ ebrain graph # 启动图谱 Web UI (http://localhost:3000)
54
+ ebrain graph --port 8080 --open # 指定端口并自动打开浏览器
55
+
56
+ # 智能编译新信息
57
+ ebrain compile companies/river-ai "River AI completed Series A funding" --source meeting_notes
58
+
59
+ # 从页面提取时间线事件
60
+ ebrain timeline extract companies/river-ai
61
+
62
+ # 检索
63
+ ebrain search "某主题"
64
+ ebrain query "某问题"
65
+
66
+ # 启动 MCP Server(供 AI 工具调用)
67
+ ebrain serve
68
+ ```
69
+
70
+ ## 配置
71
+
72
+ 编辑 `~/.ebrain/settings.json`:
73
+
74
+ ```jsonc
75
+ {
76
+ "db": { "path": "~/.ebrain/data/ebrain.db" },
77
+ "embed": {
78
+ "provider": "hash", // 或 "openai_compatible"
79
+ "baseURL": "...",
80
+ "model": "...",
81
+ "dimensions": 1024,
82
+ "apiKey": "sk-..."
83
+ }
84
+ }
85
+ ```
86
+
87
+ 运行 `ebrain config` 查看当前生效配置。详见 [docs/ebrain-cli.md](docs/ebrain-cli.md)。
88
+
89
+ ## 开发
90
+
91
+ ```bash
92
+ bun install
93
+ bun run src/cli.ts --help
94
+ bun test
95
+ ```