Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix: 重新梳理Quickstart说明

openJiuwen-bota0e142231e9c
diff --git a/.gitignore b/.gitignore
index 4088017a16..5b5da342ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,9 +43,14 @@ pnpm-debug.log*
*.swp
*.swo
.DS_Store
+.claude
+CLAUDE.md
+workspace/agent-data.json
# reference
reference/
+openspec/
+docs/ai/
# logs
logs/
diff --git a/docs/en/Quickstart.md b/docs/en/Quickstart.md
index 64e9cd3488..25fb2c6af0 100644
--- a/docs/en/Quickstart.md
+++ b/docs/en/Quickstart.md
@@ -1,107 +1,158 @@
-# Quick start
+# Quick Start
-JiuwenClaw supports two installation paths:
+> **⚠️ Version Sync**: This document should be kept in sync with [`docs/zh/Quickstart.md`](../zh/Quickstart.md). When updating one, please update the other.
-**Option 1: pip install**
+JiuwenClaw provides two installation methods: `pip install` or `install from source`.
-​ Suitable if you manage your own Python environment.
+## Prerequisites
-**Option 2: Run from source**
+- Download JiuwenClaw code:
+ ```bash
+ git clone https://gitcode.com/openjiuwen/jiuwenclaw.git
+ ```
+- Environment dependencies:
+ - Python: >=3.11, <3.14
+ - Node.js: >=18.0.0 (only needed for building frontend from source or for browser-use functionality; 20 LTS recommended)
-​ Suitable if you extend or adapt JiuwenClaw from source.
+**Note: Users can choose any of the following installation methods based on their needs.**
-Dependencies:
+## Method 1: pip Install
-- Python: >=3.11, <3.14
-- Node.js: >=18.0.0 (only needed to build the web frontend or for browser-use; 20 LTS recommended)
+Suitable for users who manage their own Python environment. Follow these steps:
-You can create a virtual environment with `uv` or Anaconda:
+- Create a virtual environment & install JiuwenClaw
-```bash
-# uv (any of 3.11, 3.12, 3.13)
-uv venv --python=3.11
-# or: uv venv --python=3.12
-# or: uv venv --python=3.13
+ ```bash
+ # Create a virtual environment named jiuwenclaw
+ python -m venv jiuwenclaw
-# Anaconda (any of 3.11, 3.12, 3.13)
-conda create -n JiuwenClaw python=3.11
-# or: conda create -n JiuwenClaw python=3.12
-# or: conda create -n JiuwenClaw python=3.13
-```
+ # Activate the jiuwenclaw virtual environment
+ jiuwenclaw\Scripts\activate
-**Option 1: pip install (recommended)**
+ # Install JiuwenClaw
+ pip install jiuwenclaw
+ ```
-Run in a terminal:
+- Initialize & start JiuwenClaw
-```bash
-# Create a virtual environment named jiuwenclaw
-python -m venv jiuwenclaw
+ ```bash
+ # Initialize JiuwenClaw (first time setup)
+ jiuwenclaw-init
-# Activate it (Windows)
-jiuwenclaw\Scripts\activate
+ # Start JiuwenClaw
+ jiuwenclaw-start
+ ```
-# Install Jiuwenclaw
-pip install jiuwenclaw
-```
+ After running, you can access the JiuwenClaw web UI. The default local access URL is `http://localhost:5173`.
-After installation, initialize and start:
+ **Note:** For remote access, run the following commands:
-```bash
-# First-time init
-jiuwenclaw-init
+ ```bash
+ # Start web service
+ jiuwenclaw-web --host 0.0.0.0 --port <custom-port>
-# Start JiuwenClaw
-jiuwenclaw-start
-```
+ # Start backend service
+ jiuwenclaw-app
+ ```
-When it is running, open the web UI (default `http://localhost:5173`). For remote access:
+## Method 2: Install from Source
-``````
-# Web service
-jiuwenclaw-web --host 0.0.0.0 --port <port>
+Suitable for users who perform custom development or adaptation based on JiuwenClaw.
-# Backend only
-jiuwenclaw-app
-``````
+### uv Installation
+- Create a virtual environment with `uv`
+ ```bash
+ # Create a virtual environment with uv (supports any of 3.11, 3.12, 3.13)
+ uv venv --python=3.11
+ # or: uv venv --python=3.12
+ # or: uv venv --python=3.13
+ ```
+- Run uv sync
-**Option 2: Run from source**
+ Navigate to the project root directory `jiuwenclaw/` and run:
+ ```bash
+ uv sync
+ ```
-Clone the repository:
+- Install frontend dependencies
-```bash
- git clone https://gitcode.com/openjiuwen/jiuwenclaw.git
-```
+ Navigate to the frontend directory `jiuwenclaw/web` and install dependencies:
+ ```bash
+ cd jiuwenclaw/web
+ npm install
+ ```
-In the repo root, sync dependencies:
+- Run frontend service
-```bash
- uv sync
-```
+ Two methods are available for running the frontend service:
+
+ - Static frontend service (suitable for production deployment)
+ ```bash
+ npm run build
+ cd ../../
+ uv run jiuwenclaw-init
+ uv run jiuwenclaw-start
+ ```
+
+ - Dynamic frontend service (suitable for development and debugging)
+ ```bash
+ cd ../../
+ uv run jiuwenclaw-init
+ uv run jiuwenclaw-start dev
+ ```
+
+ After running, you can access the JiuwenClaw web UI.
+
+### conda Installation
+
+- Create a virtual environment with `conda`
+ ```bash
+ # Create a virtual environment with Anaconda (supports any of 3.11, 3.12, 3.13)
+ conda create -n JiuwenClaw python=3.11
+ # or: conda create -n JiuwenClaw python=3.12
+ # or: conda create -n JiuwenClaw python=3.13
+ ```
+
+- Install Python dependencies
+
+ Navigate to the project root directory `jiuwenclaw/` and run:
+ ```bash
+ # Mode 1: Development installation (recommended, facilitates code modification)
+ pip install -e .
+
+ # Mode 2: Regular installation
+ pip install .
+ ```
+ **Note:** This installation method relies on the project's installable package (pyproject.toml) and will install `jiuwenclaw` itself by default.
-Install the web app dependencies:
+- Install frontend dependencies
-```bash
+ Navigate to the frontend directory `jiuwenclaw/web` and install dependencies:
+ ```bash
cd jiuwenclaw/web
npm install
-```
+ ```
-Static frontend (production build):
+- Run frontend service
-```bash
- npm run build
- cd ../../
- uv run jiuwenclaw-init
- uv run jiuwenclaw-start
-```
+ Two methods are available for running the frontend service:
-Dev mode (dynamic frontend):
+ - Static frontend service (suitable for production deployment)
+ ```bash
+ npm run build
+ cd ../../
+ jiuwenclaw-init
+ jiuwenclaw-start
+ ```
-```bash
- cd ../../
- uv run jiuwenclaw-init
- uv run jiuwenclaw-start dev
-```
+ - Dynamic frontend service (suitable for development and debugging)
+ ```bash
+ cd ../../
+ # Start directly (without using uv run)
+ jiuwenclaw-init
+ jiuwenclaw-start dev
+ ```
-Then open the web UI as above.
+ After running, you can access the JiuwenClaw web UI.
diff --git a/docs/zh/Quickstart.md b/docs/zh/Quickstart.md
index 51350b847f..4665dd8233 100644
--- a/docs/zh/Quickstart.md
+++ b/docs/zh/Quickstart.md
@@ -1,107 +1,151 @@
# 快速开始
-JiuwenClaw提供两种安装方式:
+> **⚠️ 版本同步**: 本文档应与英文版 [`docs/en/Quickstart.md`](../en/Quickstart.md) 保持同步。更新一版时请同时更新另一版。
-**方式一:pip安装**
+JiuwenClaw提供两种安装方式:`pip安装`或`源码安装`。
-​ 适合自行管理Python环境的用户
-
-**方式二:源码运行**
-
-​ 适合基于JiuwenClaw进行二次开发适配的用户
-
-环境依赖:
-
-- python:>=3.11,<3.14
-- nodejs:>=18.0.0(仅源码前端构建或 browser-use 功能需要,推荐 20 LTS)
-
-可以使用`uv`或Anaconda新建虚拟环境
-
-```bash
-# 使用uv新建虚拟环境(支持 3.11、3.12、3.13 任一版本)
-uv venv --python=3.11
-# 或 uv venv --python=3.12
-# 或 uv venv --python=3.13
-
-# 使用Anaconda新建虚拟环境(支持 3.11、3.12、3.13 任一版本)
-conda create -n JiuwenClaw python=3.11
-# 或 conda create -n JiuwenClaw python=3.12
-# 或 conda create -n JiuwenClaw python=3.13
-```
+安装前准备:
+- JiuwenClaw代码下载
+ ```bash
+ git clone https://gitcode.com/openjiuwen/jiuwenclaw.git
+ ```
+- 环境依赖:
+ - python:>=3.11,<3.14
+ - nodejs:>=18.0.0(仅源码前端构建或 browser-use 功能需要,推荐 20 LTS)
-**方式一:pip安装(推荐)**
+**注意:用户可根据自己实际需要,基于以下任意一种方案安装。**
-命令行执行
+## **方式一:pip安装**
-```bash
-# 创建名为 Jiuwenclaw 的虚拟环境
-python -m venv jiuwenclaw
+​适合自行管理Python环境的用户。具体操作如下:
+- 创建虚拟环境 & 安装 jiuwenclaw 项目
-# 激活 Jiuwenclaw 虚拟环境
-jiuwenclaw\Scripts\activate
+ ```bash
+ # 创建名为 Jiuwenclaw 的虚拟环境
+ python -m venv jiuwenclaw
-# 安装 Jiuwenclaw
-pip install jiuwenclaw
-```
+ # 激活 Jiuwenclaw 虚拟环境
+ jiuwenclaw\Scripts\activate
-安装完成后执行命令行初始化和启动
+ # 安装 Jiuwenclaw
+ pip install jiuwenclaw
+ ```
-```bash
-# 初始化 JiuwenClaw (首次启动)
-jiuwenclaw-init
+- 初始化 & 启动 jiuwenclaw 项目
-# 启动 JiuwenClaw
-jiuwenclaw-start
-```
+ ```bash
+ # 初始化 JiuwenClaw (首次启动)
+ jiuwenclaw-init
-运行完成后即可在网页前端访问JiuwenClaw服务(默认网页本地访问 `http://localhost:5173`,如需远程访问可以执行入下命令)
+ # 启动 JiuwenClaw
+ jiuwenclaw-start
+ ```
-``````
-# 启动web服务
-jiuwenclaw-web --host 0.0.0.0 --port 自定义端口
+ 运行完成后即可在网页前端访问JiuwenClaw服务,默认网页本地访问 `http://localhost:5173`。
-# 启动后端服务
-jiuwenclaw-app
-``````
+ **注:** 如需远程访问可以执行入下命令:
+ ``````
+ # 启动web服务
+ jiuwenclaw-web --host 0.0.0.0 --port 自定义端口
+ # 启动后端服务
+ jiuwenclaw-app
+ ``````
-**方式二:源码运行**
+## **方式二:源码运行**
-下载JiuwenClaw代码
+​适合基于JiuwenClaw进行二次开发适配的用户。
-```bash
- git clone https://gitcode.com/openjiuwen/jiuwenclaw.git
-```
+### `uv`方式安装
+- 使用`uv`新建虚拟环境
+ ```bash
+ # 使用uv新建虚拟环境(支持 3.11、3.12、3.13 任一版本)
+ uv venv --python=3.11
+ # 或 uv venv --python=3.12
+ # 或 uv venv --python=3.13
+ ```
-进入源码目录执行uv同步操作
-
-```bash
+- 执行uv同步操作
+
+ 进入项目根目录`jiuwenclaw/`执行:
+ ```bash
uv sync
-```
+ ```
-进入前端目录 jiuwenclaw/web 安装依赖
+- 安装前端依赖
-```bash
+ 进入前端目录 jiuwenclaw/web 安装依赖:
+ ```bash
cd jiuwenclaw/web
npm install
-```
-
-静态运行前端服务
-
-```bash
- npm run build
- cd ../../
- uv run jiuwenclaw-init
- uv run jiuwenclaw-start
-```
-
-动态运行前端服务
-
-```bash
- cd ../../
- uv run jiuwenclaw-init
- uv run jiuwenclaw-start dev
-```
-
-运行完成后即可在网页前端访问JiuwenClaw服务
\ No newline at end of file
+ ```
+
+- 运行前端服务
+
+ 可以采取两种方式运行前端服务:
+ - 静态运行前端服务(适合生产环境部署)
+ ```bash
+ npm run build
+ cd ../../
+ uv run jiuwenclaw-init
+ uv run jiuwenclaw-start
+ ```
+
+ - 动态运行前端服务(适合生开发调试)
+ ```bash
+ cd ../../
+ uv run jiuwenclaw-init
+ uv run jiuwenclaw-start dev
+ ```
+
+ 运行完成后即可在网页前端访问JiuwenClaw服务。
+
+### `conda`方式安装
+- 使用`conda`新建虚拟环境
+ ```bash
+ # 使用Anaconda新建虚拟环境(支持 3.11、3.12、3.13 任一版本)
+ conda create -n JiuwenClaw python=3.11
+ # 或 conda create -n JiuwenClaw python=3.12
+ # 或 conda create -n JiuwenClaw python=3.13
+ ```
+- 安装python依赖
+
+ 进入项目根目录`jiuwenclaw/`执行:
+ ```bash
+ # 模式1:开发模式安装(推荐,便于修改代码)
+ pip install -e .
+
+ # 模式2:普通安装
+ pip install .
+ ```
+ **注意:** 该安装方式依赖项目的可安装包(pyproject.toml),同时会默认安装`jiuwenclaw`自己。
+
+- 安装前端依赖
+
+ 进入前端目录 jiuwenclaw/web 安装依赖:
+ ```bash
+ cd jiuwenclaw/web
+ npm install
+ ```
+
+- 运行前端服务
+
+ 可以采取两种方式运行前端服务:
+ - 静态运行前端服务(适合生产环境部署)
+ ```bash
+ npm run build
+ cd ../../
+ jiuwenclaw-init
+ jiuwenclaw-start
+ ```
+
+ - 动态运行前端服务(适合生开发调试)
+ ```bash
+ cd ../../
+ # 直接启动(不使用 uv run)
+ jiuwenclaw-init
+ jiuwenclaw-start dev
+ ```
+
+ 运行完成后即可在网页前端访问JiuwenClaw服务。