Skip to content

Commit 67da414

Browse files
ahmad-ajmalmakiroll1125CraftBotzfoongAlanAAG
authored
fix: install.py no longer installs all required packages (#300)
* new coding skill: find-skills * new coding skill: firecrawl (scrape the web) * new coding skill: excalidraw diagrams * Update contributing md with SOPs * new coding skill: planetscale postgres * new coding skill: planetscale mysql * new coding skill: planetscale vitess * new coding skill: planetscale neki * new coding skill: cloudflare workers best practices * new coding skills: essential Trail of Bits skills + modified existing skill files to reference CraftBot * new coding skill: awesome-copilot git-commit * new coding skill: shannon pentester * clear conversation and task data with clear command * improvement:more github action * Added more google calendar actions * action expansion for gmail, gdrive, and outlook * action expansion for Notion, Discord, and Slack * action expansion for Lark * action expansion of Jira, Line business, and telegram bot * action expansion for whatsapp * action expansion google docs * action expansion lark calendar * action expansion twitter * Lint and Formating Fix * integration connection in onboarding step * refactor: migrate browser frontend state to Redux Toolkit Collapse 3 WebSocket connections into 1 SocketClient and 5 React contexts into 13 domain slices. Settings tabs cache server data with hasLoaded flags so remounts and cross-page consumers don't re-fetch. * selectEnabledSkills * revamp: modal component * current version fix * Check update fix * Remove TUI support * fix: display user-invoked skills in Skills icon in Dashboard * Feat/slash command autocomplete (#268) * feat: add base slash command autocomplete logic * feat: add core logic and ui for slash command autocomplete * feat: add slash command autocomplete for skill invocation * include command as selectable too and tab to autocomplete function * feat: add support for autocomplete to use Redux for commands and skills * feat: fixes for slash command autocomplete * feat: scroll autocomplete dashboard using up/down arrow keys and better autocomplete using tab/enter keys --------- Co-authored-by: CraftBot <craftbot@craftbot.dev> * fix: skill information (invocations, top skills) persist across sessions * fix: skill information (invocations, top skills) persist across sessions + (upload missing file) * Reset setting config * fix: add support for OpenAI Images 2.0 and Gemini Nano Banana 2 image generation * fix: Gemini is default provider if both OpenAI and Gemini API keys are provided * feature:added bedrock as provider and fixed gemini and openrouter cache logic * update requirement and setting of Bedrock * Upgrade create_pdf action with themes, visual layout, and unicode safety - Replace deprecated FPDF/HTMLMixin pattern with direct write_html on FPDF 2.8 - Add gradient banner header rendered from the first H1 heading - Add 5 colour themes: default, corporate, minimal, warm, forest - Add tag_styles for h1-h5 with colour hierarchy, code blocks with background fill, and page number footer - Add unicode sanitizer (_CHAR_MAP) to prevent latin-1 crashes on em dashes, smart quotes, currency symbols, and other common characters - Add optional subtitle and page_numbers input fields - Return pages and size_bytes in success payload for output verification - Add parallelizable=False to prevent concurrent file write corruption - Remove FPDF from requirement list (was silently skipped by executor heuristic) - Add tiered error handling: PermissionError, OSError, and generic Exception with actionable messages instead of a single bare except - Auto-create missing parent directories instead of crashing - Validate .pdf extension upfront * Improvement/task interative update (#287) * Improvement:upgrade task panel visual * improvement:refactor UI code * feature:improve visual and interactive of action * feature:added action renderer * feature:initial mascot update * mascot animation update * mascost display action * git status * set default zoom level and task and actions panel width * Refactor of the mascot display screen logic * Reset setting config * mascot action display refactor --------- Co-authored-by: CraftBot <craftbot@craftbot.dev> * removed repeated validation check * Upgrade read_pdf with pdfplumber primary engine, text/layout modes, and page_range * create dm channel struct check * Fix issue 238: reinitialize cache session mid task provider switch * Add edit_pdf action and update requirements with PDF processing deps * bug:fix tui module not found issue * Update create_pdf theme guidance and add theme_used to edit_pdf description * UI:task list scrolling logic * UI update: attachement preview * UI improve:Increase contrast and other improvement * UI update:link color and marketplace icon * V1.3.2 Lint Checks and fixes * version update in setting config * lint fix (#292) * remove cache pip * remove requirements.txt comments for proper install (#299) * Update README.md Update README * Update README and sync README * Update README with new banner * Update README.md Logo size update * Dev (#291) * new coding skill: find-skills * new coding skill: firecrawl (scrape the web) * new coding skill: excalidraw diagrams * Update contributing md with SOPs * new coding skill: planetscale postgres * new coding skill: planetscale mysql * new coding skill: planetscale vitess * new coding skill: planetscale neki * new coding skill: cloudflare workers best practices * new coding skills: essential Trail of Bits skills + modified existing skill files to reference CraftBot * new coding skill: awesome-copilot git-commit * new coding skill: shannon pentester * clear conversation and task data with clear command * improvement:more github action * Added more google calendar actions * action expansion for gmail, gdrive, and outlook * action expansion for Notion, Discord, and Slack * action expansion for Lark * action expansion of Jira, Line business, and telegram bot * action expansion for whatsapp * action expansion google docs * action expansion lark calendar * action expansion twitter * Lint and Formating Fix * integration connection in onboarding step * refactor: migrate browser frontend state to Redux Toolkit Collapse 3 WebSocket connections into 1 SocketClient and 5 React contexts into 13 domain slices. Settings tabs cache server data with hasLoaded flags so remounts and cross-page consumers don't re-fetch. * selectEnabledSkills * revamp: modal component * current version fix * Check update fix * Remove TUI support * fix: display user-invoked skills in Skills icon in Dashboard * Feat/slash command autocomplete (#268) * feat: add base slash command autocomplete logic * feat: add core logic and ui for slash command autocomplete * feat: add slash command autocomplete for skill invocation * include command as selectable too and tab to autocomplete function * feat: add support for autocomplete to use Redux for commands and skills * feat: fixes for slash command autocomplete * feat: scroll autocomplete dashboard using up/down arrow keys and better autocomplete using tab/enter keys --------- Co-authored-by: CraftBot <craftbot@craftbot.dev> * fix: skill information (invocations, top skills) persist across sessions * fix: skill information (invocations, top skills) persist across sessions + (upload missing file) * Reset setting config * fix: add support for OpenAI Images 2.0 and Gemini Nano Banana 2 image generation * fix: Gemini is default provider if both OpenAI and Gemini API keys are provided * feature:added bedrock as provider and fixed gemini and openrouter cache logic * update requirement and setting of Bedrock * Upgrade create_pdf action with themes, visual layout, and unicode safety - Replace deprecated FPDF/HTMLMixin pattern with direct write_html on FPDF 2.8 - Add gradient banner header rendered from the first H1 heading - Add 5 colour themes: default, corporate, minimal, warm, forest - Add tag_styles for h1-h5 with colour hierarchy, code blocks with background fill, and page number footer - Add unicode sanitizer (_CHAR_MAP) to prevent latin-1 crashes on em dashes, smart quotes, currency symbols, and other common characters - Add optional subtitle and page_numbers input fields - Return pages and size_bytes in success payload for output verification - Add parallelizable=False to prevent concurrent file write corruption - Remove FPDF from requirement list (was silently skipped by executor heuristic) - Add tiered error handling: PermissionError, OSError, and generic Exception with actionable messages instead of a single bare except - Auto-create missing parent directories instead of crashing - Validate .pdf extension upfront * Improvement/task interative update (#287) * Improvement:upgrade task panel visual * improvement:refactor UI code * feature:improve visual and interactive of action * feature:added action renderer * feature:initial mascot update * mascot animation update * mascost display action * git status * set default zoom level and task and actions panel width * Refactor of the mascot display screen logic * Reset setting config * mascot action display refactor --------- Co-authored-by: CraftBot <craftbot@craftbot.dev> * removed repeated validation check * Upgrade read_pdf with pdfplumber primary engine, text/layout modes, and page_range * create dm channel struct check * Fix issue 238: reinitialize cache session mid task provider switch * Add edit_pdf action and update requirements with PDF processing deps * bug:fix tui module not found issue * Update create_pdf theme guidance and add theme_used to edit_pdf description * UI:task list scrolling logic * UI update: attachement preview * UI improve:Increase contrast and other improvement * UI update:link color and marketplace icon * V1.3.2 Lint Checks and fixes * version update in setting config * lint fix (#292) * remove cache pip --------- Co-authored-by: Tobias Garcia <iguana3000tg@gmail.com> Co-authored-by: ahmad-ajmal <ahmadajmal1514@gmail.com> Co-authored-by: CraftBot <craftbot@craftbot.dev> Co-authored-by: Tobias Garcia <145974358+makiroll1125@users.noreply.github.com> Co-authored-by: AlanAAG <alanayalag@gmail.com> Co-authored-by: はる <165422770+ahmad-ajmal@users.noreply.github.com> * Quick UI fix * fix: remove requirements.txt comments for proper install (#298) --------- Co-authored-by: イツミネ <tham_yikfoong@outlook.com> Co-authored-by: CraftBot <craftbot@craftbot.dev> Co-authored-by: Tobias Garcia <iguana3000tg@gmail.com> Co-authored-by: Tobias Garcia <145974358+makiroll1125@users.noreply.github.com> Co-authored-by: AlanAAG <alanayalag@gmail.com> --------- Co-authored-by: Tobias Garcia <iguana3000tg@gmail.com> Co-authored-by: CraftBot <craftbot@craftbot.dev> Co-authored-by: Tobias Garcia <145974358+makiroll1125@users.noreply.github.com> Co-authored-by: イツミネ <tham_yikfoong@outlook.com> Co-authored-by: AlanAAG <alanayalag@gmail.com>
1 parent 286aab0 commit 67da414

13 files changed

Lines changed: 2038 additions & 129 deletions

File tree

README.cn.md

Lines changed: 236 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,53 @@
6161

6262
## 🧰 快速开始
6363

64-
环境要求: Python 3.10+ · 浏览器模式需要 Node.js 18+
64+
- **自带密钥 (BYOK)** — 灵活的 LLM 提供商系统,支持 OpenAI、Google Gemini、Anthropic Claude、BytePlus 和本地 Ollama 模型。可轻松切换提供商。
65+
- **记忆系统** — 在午夜整理并汇总一天中发生的事件。
66+
- **主动式代理** — 学习你的偏好、习惯和人生目标,然后进行规划并启动任务(当然需要你的批准)来帮助你改善生活。
67+
- **Living UI** — 在 CraftBot 中构建、导入或演进自定义应用。代理始终感知 UI 的状态,并可直接读取、写入和操作其数据。
68+
- **外部工具集成** — 连接 Google Workspace、Slack、Notion、Zoom、LinkedIn、Discord 和 Telegram(更多即将推出!),支持嵌入式凭据和 OAuth。
69+
- **MCP** — 模型上下文协议(Model Context Protocol)集成,通过外部工具和服务扩展代理能力。
70+
- **技能系统** — 可扩展的技能框架,内置任务规划、研究、代码审查、Git 操作等技能。
71+
- **跨平台** — 完整支持 Windows、macOS 和 Linux,具有平台特定代码变体和 Docker 容器化。
72+
73+
> [!IMPORTANT]
74+
> **GUI 模式已弃用。** CraftBot 不再支持 GUI(桌面自动化)模式。请改用 Browser 或 CLI 模式。
75+
76+
<div align="center">
77+
<img src="assets/craftbot_readme_features.png" alt="CraftBot Banner" width="1280"/>
78+
<img src="assets/craftbot_features_custom.png" alt="CraftBot Banner" width="1280"/>
79+
</div>
80+
81+
---
82+
83+
84+
## 🧰 环境设置
85+
86+
### 前置要求
87+
- Python **3.10+**
88+
- `git`(克隆仓库所需)
89+
- 你所选 LLM 提供商的 API Key(OpenAI、Gemini 或 Anthropic)
90+
- `Node.js` **18+**(可选 - 仅浏览器界面需要)
91+
- `conda`(可选 - 如未找到,安装器会提供自动安装 Miniconda 的选项)
92+
93+
### 我该选哪种方式?
94+
95+
> **不确定?选方案一。** 它会帮你搞定所有事。
96+
97+
| | 方案一 — 服务安装 | 方案二 — Conda 安装 | 方案三 — 手动安装 |
98+
|---|---|---|---|
99+
| **适合谁** | 大多数用户、新手、测试 | 想要独立环境的 Conda 用户 | 进阶用户、自定义 Python、完全控制 |
100+
| **自动管理 Python 环境?** | ✅ 自动 | ✅ 自动 | ❌ 你自己管理 |
101+
| **后台运行?** | ✅ 是,作为服务 | ❌ 否 | ❌ 否 |
102+
| **启动方式** | `python craftbot.py install` | `python install.py --conda` | `python install.py` |
103+
104+
---
105+
106+
### ⭐ 方案一 — 服务安装(推荐)
107+
108+
**适合你,如果:** 你希望 CraftBot 开箱即用——后台服务、开机自启、桌面快捷方式,无需手动操作。
109+
110+
`craftbot.py` 全程自动处理:Python 环境、依赖安装、后台进程管理和自启注册。
65111

66112
```bash
67113
# 1. 克隆仓库
@@ -98,7 +144,79 @@ python craftbot.py uninstall # 停止运行、移除自启动并卸载所有依
98144
- 一套完全贴合你工作流的定制 CRM?
99145
- 一个 CraftBot 能替你读取并操作的公司仪表盘?
100146

101-
把它作为一个 Living UI 与 CraftBot 一同运行,并让它随着你的需求持续成长。
147+
```bash
148+
# 1. 克隆仓库
149+
git clone https://github.com/CraftOS-dev/CraftBot.git
150+
cd CraftBot
151+
152+
# 2. 安装到 conda 环境
153+
python install.py --conda
154+
155+
# 3. 运行 CraftBot
156+
conda run -n craftbot python run.py
157+
158+
# 如果 conda 不在 PATH 中(仅 Windows):
159+
&"$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n craftbot python run.py
160+
```
161+
162+
> [!NOTE]
163+
> 每次运行 CraftBot 时,请使用 `conda run -n craftbot python run.py`。此方式没有后台服务——由你手动启停。
164+
165+
---
166+
167+
### 方案三 — 手动安装(pip)
168+
169+
**适合你,如果:** 你希望完全掌控 Python 环境,不需要任何自动服务或后台进程,自己管理 CraftBot。
170+
171+
`install.py`(不带参数)会对当前激活的 Python 环境执行标准 pip 安装。通过 `run.py` 手动启停 CraftBot。
172+
173+
```bash
174+
# 1. 克隆仓库
175+
git clone https://github.com/CraftOS-dev/CraftBot.git
176+
cd CraftBot
177+
178+
# 2. 在当前 Python 环境中安装依赖
179+
python install.py
180+
181+
# 3. 运行 CraftBot
182+
python run.py
183+
```
184+
185+
首次运行会引导你完成 API Key 设置和偏好配置。
186+
187+
> [!NOTE]
188+
> 如果未安装 Node.js,安装器会提供详细指引。你也可以完全跳过浏览器模式,直接使用 CLI 模式——无需 Node.js:`python run.py --cli`
189+
190+
### 安装完成后你可以做什么?
191+
- 用自然语言与代理交流
192+
- 让它执行复杂的多步骤任务
193+
- 输入 `/help` 查看可用命令
194+
- 连接 Google、Slack、Notion 等服务
195+
196+
### 🖥️ 界面模式
197+
198+
<div align="center">
199+
<img src="assets/WCA_README_banner.png" alt="CraftOS Banner" width="1280"/>
200+
</div>
201+
202+
CraftBot 支持多种 UI 模式。根据你的偏好选择:
203+
204+
| 模式 | 命令 | 要求 | 最适合 |
205+
|------|---------|--------------|----------|
206+
| **浏览器** | `python run.py` | Node.js 18+ | 现代 Web 界面,最易使用 |
207+
| **CLI** | `python run.py --cli` || 命令行,轻量级 |
208+
209+
**浏览器模式**是默认的推荐模式。如果你没有 Node.js,安装器会提供安装指引,或者你可以使用 **CLI 模式**
210+
211+
---
212+
213+
## 🧬 Living UI
214+
215+
**Living UI 是随你需求而进化的系统/应用/仪表盘。**
216+
217+
需要一个内置 AI 副驾的看板?量身定制符合你工作流程的 CRM?
218+
一个 CraftBot 能读取并驱动的公司仪表盘?
219+
将它作为 Living UI 启动——它与 CraftBot 并行运行,并随着你的需求变化而成长。
102220

103221
<div align="center">
104222
<img src="assets/living-ui-example.png" alt="Living UI example" width="1280"/>
@@ -144,7 +262,21 @@ CraftBot 嵌入在每个 Living UI 之中,并且**对其状态保持感知**:它
144262
- **📊 习惯追踪器** — 培养并追踪自己的习惯,用类 GitHub 风格的活动日历像写代码一样维护你的习惯。
145263
- **🐦 Luolinglo** — 不是多邻国,但你可以学习新语言、做单词卡片,并和 CraftBot 一起练习。
146264

147-
**[浏览并参与贡献 Living UI 市场 →](https://craftos.net/marketplace)**
265+
## 🧩 架构概览
266+
267+
| 组件 | 说明 |
268+
|-----------|-------------|
269+
| **代理基础层 (Agent Base)** | 核心编排层,管理任务生命周期、协调各组件并处理主要的代理循环。 |
270+
| **LLM 接口** | 统一接口,支持多个 LLM 提供商(OpenAI、Gemini、Anthropic、BytePlus、Ollama)。 |
271+
| **上下文引擎** | 生成优化的提示词,支持 KV-cache。 |
272+
| **动作管理器** | 从动作库中检索和执行动作。自定义动作易于扩展。 |
273+
| **动作路由器** | 根据任务需求智能选择最佳匹配的动作,需要时通过 LLM 解析输入参数。 |
274+
| **事件流** | 实时事件发布系统,用于任务进度跟踪、UI 更新和执行监控。 |
275+
| **记忆管理器** | 基于 RAG 的语义记忆,使用 ChromaDB。处理记忆分块、向量化、检索和增量更新。 |
276+
| **状态管理器** | 全局状态管理,跟踪代理执行上下文、对话历史和运行时配置。 |
277+
| **任务管理器** | 管理任务定义,支持简单和复杂任务模式,创建待办事项,多步骤工作流跟踪。 |
278+
| **技能管理器** | 加载并将可插拔技能注入代理上下文。 |
279+
| **MCP 适配器** | 模型上下文协议集成,将 MCP 工具转换为原生动作。 |
148280

149281
---
150282

@@ -162,13 +294,109 @@ CraftBot 嵌入在每个 Living UI 之中,并且**对其状态保持感知**:它
162294

163295
## 🔧 故障排查与常见问题
164296

165-
### 缺少 Node.js (浏览器模式)
166-
如果运行 `python run.py` 时看到 **"npm not found in PATH"**:
167-
1.[nodejs.org](https://nodejs.org/) 下载 LTS 版本
168-
2. 安装后重启终端
297+
### install.py
298+
299+
| 参数 | 说明 |
300+
|------|-------------|
301+
| `--conda` | 使用 conda 环境(可选) |
302+
303+
### run.py
304+
305+
| 参数 | 说明 |
306+
|------|-------------|
307+
| (无) |**浏览器**模式运行(推荐,需要 Node.js) |
308+
| `--cli` |**CLI** 模式运行(轻量级) |
309+
310+
**安装示例:**
311+
```bash
312+
# 简单 pip 安装(不使用 conda)
313+
python install.py
314+
315+
# 使用 conda 环境(推荐 conda 用户使用)
316+
python install.py --conda
317+
```
318+
319+
**运行 CraftBot:**
320+
321+
```powershell
322+
# 浏览器模式(默认,需要 Node.js)
323+
python run.py
324+
325+
# CLI 模式(轻量级)
326+
python run.py --cli
327+
328+
# 使用 conda 环境
329+
conda run -n craftbot python run.py
330+
331+
# 如果 conda 不在 PATH 中,使用完整路径
332+
&"$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n craftbot python run.py
333+
```
334+
335+
**Linux/macOS (Bash):**
336+
```bash
337+
# 浏览器模式(默认,需要 Node.js)
338+
python run.py
339+
340+
# CLI 模式(轻量级)
341+
python run.py --cli
342+
343+
# 使用 conda 环境
344+
conda run -n craftbot python run.py
345+
```
346+
347+
### 🔧 后台服务(推荐)
348+
349+
将 CraftBot 作为后台服务运行,关闭终端后仍可继续运行。系统会自动创建桌面快捷方式,随时可重新打开浏览器。
350+
351+
```bash
352+
# 安装依赖、注册开机自启、启动 CraftBot
353+
python craftbot.py install
354+
```
355+
356+
就这样。终端会自动关闭,CraftBot 在后台运行,浏览器自动打开。
357+
358+
```bash
359+
# 其他服务命令:
360+
python craftbot.py start # 在后台启动 CraftBot
361+
python craftbot.py status # 检查是否正在运行
362+
python craftbot.py stop # 停止 CraftBot
363+
python craftbot.py restart # 重启 CraftBot
364+
python craftbot.py logs # 查看最近日志输出
365+
```
366+
367+
| 命令 | 说明 |
368+
|---------|-------------|
369+
| `python craftbot.py install` | 安装依赖、注册开机自启、启动 CraftBot、打开浏览器,并自动关闭终端 |
370+
| `python craftbot.py start` | 在后台启动 CraftBot(若已运行则自动重启,终端自动关闭) |
371+
| `python craftbot.py stop` | 停止 CraftBot |
372+
| `python craftbot.py restart` | 停止并重启 CraftBot |
373+
| `python craftbot.py status` | 检查 CraftBot 是否在运行,以及自动启动是否已启用 |
374+
| `python craftbot.py logs` | 显示最近日志(使用 `-n 100` 查看更多行) |
375+
| `python craftbot.py uninstall` | 停止 CraftBot、注销自启、卸载 pip 包并清理 pip 缓存 |
376+
377+
> [!TIP]
378+
> 执行 `craftbot.py start``craftbot.py install` 后,系统会自动创建 **CraftBot 桌面快捷方式**。如果不小心关闭了浏览器,双击快捷方式即可重新打开。
379+
380+
> [!NOTE]
381+
> **安装:** 安装器会在缺少依赖时提供清晰的指引。如果未找到 Node.js,会提示你安装或切换到 CLI 模式。安装会自动检测 GPU 可用性,必要时回退到仅 CPU 模式。
382+
383+
> [!TIP]
384+
> **首次设置:** CraftBot 会引导你完成引导流程,配置 API Key、代理名称、MCP 和技能。
385+
386+
> [!NOTE]
387+
> **Playwright Chromium:** WhatsApp Web 集成可选。如果安装失败,代理在其他任务上仍能正常工作。可稍后手动安装:`playwright install chromium`
388+
389+
---
390+
391+
## 🔧 故障排除与常见问题
392+
393+
### 缺少 Node.js(浏览器模式)
394+
运行 `python run.py` 时看到 **"npm not found in PATH"**
395+
1.[nodejs.org](https://nodejs.org/) 下载(选择 LTS 版本)
396+
2. 安装并重启终端
169397
3. 再次运行 `python run.py`
170398

171-
**备选方案:** 改用无需 Node.js 的 TUI 模式:
399+
**替代方案:** 使用 CLI 模式(不需要 Node.js):
172400
```bash
173401
python run.py --cli
174402
```

0 commit comments

Comments
 (0)