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:安装文档更新
xinyang_bali3d4bf9834388
diff --git a/README.md b/README.mdindex dcd5848465..add5b11a2f 100644--- a/README.md+++ b/README.md@@ -104,6 +104,7 @@ Set up heartbeat tasks with your to-do items, and JiuwenClaw will wake up on sch| Document | Description || :--------------------------------------------------- | :------------------------------------------------------- |+| [📖 Install guide](docs/en/InstallGuide.md) | Full installation paths (pip, source, conda, Docker) || [📖 Quick Start](docs/en/Quickstart.md) | Get up and running with JiuwenClaw in 5 minutes || [📖 Quick Start (TUI)](docs/en/Quickstart_tui.md) | Get up and running with JiuwenClaw-tui in 5 minutes || [⚙️ Configuration & Workspace](docs/en/Configuration.md) | Environment setup and workspace management |@@ -135,6 +136,7 @@ Set up heartbeat tasks with your to-do items, and JiuwenClaw will wake up on sch| [📦 Packaging Desktop App](docs/en/PackExeGuide.md) | Build standalone desktop executables || [🚀 Development Practices](docs/en/development-practices/README.md) | Development practices and experience sharing |+## 🤝 ContributingWe warmly welcome community contributions — whether it's filing bug reports, suggesting new features, or improving documentation, every bit of support means the world to us.diff --git a/README_CN.md b/README_CN.mdindex 846ff48303..12262f789e 100644--- a/README_CN.md+++ b/README_CN.md@@ -144,6 +144,7 @@ jiuwenclaw-tui| 文档 | 核心内容 ||:-----|:---------|+| [📖 安装指南](docs/zh/安装指南.md) | 从零安装(pip、源码、conda、Docker 等) || [📖 快速开始](docs/zh/Quickstart.md) | 5分钟上手JiuwenClaw || [📖 快速开始(TUI)](docs/zh/Quickstart_tui.md) | 5分钟上手JiuwenClaw-tui || [⚙️ 配置与工作空间](docs/zh/配置信息.md) | 环境配置与工作区管理 |diff --git "a/docs/assets/images/\345\244\251\346\260\224.png" "b/docs/assets/images/\345\244\251\346\260\224.png"new file mode 100644index 0000000000..d1e0fa1db3Binary files /dev/null and "b/docs/assets/images/\345\244\251\346\260\224.png" differdiff --git a/docs/en/InstallGuide.md b/docs/en/InstallGuide.mdnew file mode 100644index 0000000000..4d4d7f4090--- /dev/null+++ b/docs/en/InstallGuide.md@@ -0,0 +1,473 @@+# JiuwenClaw install guide++> **Important:** Finishing installation does not mean the app is ready to use. You must complete model configuration first. See [Configuration](https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/en/Configuration.md) ([Chinese](https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/zh/%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF.md)) for model setup.++---++## Prerequisites++Before installing JiuwenClaw, make sure your system meets the following requirements:++| Dependency | Version | Notes |+|------------|---------|-------|+| OS | Windows 10/11, macOS 10.15+, Linux | Common desktop OS supported |+| Python | ≥3.11, below 3.14 | Python 3.11 recommended |+| Node.js | 18.x or newer | Used for the web UI |+| Git | Latest | Required for source install |++### Environment check++Run these commands in a terminal:++```bash+# Check Python+python --version+# Expect: Python 3.11.x or Python 3.12.x++# Check Node.js+node --version+# Expect: v18.x.x or newer++# Check Git+git --version+# Expect: git version 2.x.x+```++---++## First-time installation++### Option 1: pip install++#### 1. Installation steps++```bash+# Create a virtual environment (recommended)+python -m venv jiuwenclaw-env++# Activate the virtual environment+# Windows:+jiuwenclaw-env\Scripts\activate+# macOS/Linux:+source jiuwenclaw-env/bin/activate++# Install JiuwenClaw+pip install jiuwenclaw+```++#### 2. First launch++```bash+# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start JiuwenClaw+jiuwenclaw-start+```++After the first start, the app creates the config directory `~/.jiuwenclaw/`.++#### 3. Post-start verification++After a successful start, verify the installation:++1. **Open the Web UI**: in your browser go to `http://localhost:5173`+2. **Open configuration**: in the left sidebar choose **Configuration**+3. **Configure the model**: follow [Configuration](Configuration.md) to set up your model API+4. **Confirm it works**:+ - The Web UI loads+ - After model configuration you can run a basic chat (tools/MCP may be used depending on your setup)++++> 💡 **Tip:** If the Web UI does not load, check `~/.jiuwenclaw/logs/` for errors.++#### 4. Restarting the service++If you closed JiuwenClaw and want to run it again:++```bash+# Start again+jiuwenclaw-start+```++---++### Option 2: Install from source (uv)++#### 1. Environment setup++Install **uv** first. If it is not installed, follow the [uv documentation](https://docs.astral.sh/uv/).++```bash+# Check that uv is installed+uv --version+# Expect: uv 0.x.x+```++#### 2. Clone and install++```bash+# Clone the repository+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# Enter project directory+cd jiuwenclaw++# Create venv and install dependencies with uv+uv venv+uv pip install -e .+```++#### 3. Build the front end++> ⚠️ **Important:** With a source (editable) install you must build the front end manually, or startup will fail with `dist directory not found`.++```bash+# Enter front-end directory (repo root is jiuwenclaw)+cd web++# Install front-end dependencies+npm install++# Build+npm run build++# Copy build output into the user workspace+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# Back to repo root+cd ..+```++**Notes:**++- `uv pip install -e .` is an editable install that points at your source tree.+- `web/dist` is ignored by `.gitignore` and is not shipped in the repo.+- You must build and copy artifacts to `~/.jiuwenclaw/web/dist`.++#### 4. First launch++```bash+# Activate virtual environment+# Windows:+.venv\Scripts\activate+# macOS/Linux:+source .venv/bin/activate++# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start+jiuwenclaw-start+```++#### 5. Post-start verification (same as Option 1)++Use the checklist under [Post-start verification](#3-post-start-verification).++#### 6. Restarting the service++```bash+# After activating the virtual environment+jiuwenclaw-start+```++---++### Option 3: Install from source (conda)++#### 1. Environment setup++Install **conda** first. If it is not installed, follow the [Miniconda documentation](https://docs.conda.io/en/latest/miniconda.html).++```bash+# Check that conda is installed+conda --version+# Expect: conda 23.x.x or newer+```++#### 2. Create the conda environment++```bash+# Create environment+conda create -n jiuwenclaw python=3.11++# Initialize conda (first time)+conda init+# After init, close the window and open a new session before activate++# Activate environment+conda activate jiuwenclaw+```++#### 3. Clone and install++```bash+# Clone the repository+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# Enter project directory+cd jiuwenclaw++# Install dependencies+pip install -e .+```++#### 4. Build the front end++> ⚠️ **Important:** With a source (editable) install you must build the front end manually, or startup will fail with `dist directory not found`.++```bash+# Enter front-end directory (repo root is jiuwenclaw)+cd web++# Install front-end dependencies+npm install++# Build+npm run build++# Copy build output into the user workspace+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# Back to repo root+cd ..+```++**Notes:**++- `pip install -e .` is an editable install that points at your source tree.+- `web/dist` is ignored by `.gitignore` and is not shipped in the repo.+- You must build and copy artifacts to `~/.jiuwenclaw/web/dist`.++#### 5. First launch++```bash+# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start+jiuwenclaw-start+```++#### 6. Post-start verification (same as Option 1)++Use the checklist under [Post-start verification](#3-post-start-verification).++#### 7. Restarting the service++```bash+# Activate environment, then start+conda activate jiuwenclaw+jiuwenclaw-start+```++---++## Version upgrades++| Current range | Approach | Notes |+|---------------|----------|-------|+| Routine (e.g. 0.1.8 → 0.1.9, does not cross 0.1.7) | [Routine version upgrades](#routine-version-upgrades) | Upgrade directly; no backup required |+| Major (e.g. <0.1.7 → ≥0.1.7, crosses 0.1.7) | [Major version upgrades](#major-version-upgrades) | Back up data first |++---++### Routine version upgrades++#### pip install upgrade++```bash+# Activate your virtual environment+# Then upgrade+pip install --upgrade jiuwenclaw+```++#### Source install upgrade++```bash+# Enter project directory+cd jiuwenclaw++# Pull latest+git pull++# Reinstall+pip install -e .++# Rebuild the front end (if it was updated)+cd web+npm install+npm run build++# Copy build output+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++cd ..+```++---++### Major version upgrades++> ⚠️ Always back up your data before upgrading across major versions.++#### 1. Data backup++**Windows:**++```bash+# Back up the whole config and data directory+xcopy "%USERPROFILE%\.jiuwenclaw" "%USERPROFILE%\.jiuwenclaw_backup" /E /I++# Or with PowerShell (recommended)+Copy-Item -Path "$env:USERPROFILE\.jiuwenclaw" -Destination "$env:USERPROFILE\.jiuwenclaw_backup" -Recurse+```++**macOS/Linux:**++```bash+# Back up the whole config and data directory+cp -r ~/.jiuwenclaw ~/.jiuwenclaw_backup++# Or with rsync (recommended; preserves permissions)+rsync -av ~/.jiuwenclaw ~/.jiuwenclaw_backup+```++**What to back up:**++| Path | Description |+|------|-------------|+| `config/config.yaml` | Main config (models, API keys, etc.) |+| `config/.env` | Environment variables |+| `agent/memory/` | User memory data |+| `agent/home/` | Identity and task data |+| `agent/skills/` | Skills library (custom skills and config) |+| `agent/workspace/` | Workspace files |++#### 2. Perform the upgrade++Pick the steps that match how you installed JiuwenClaw:++##### pip install upgrade++Follow the same steps as [Routine version upgrade – pip install upgrade](#pip-install-upgrade) (activate your virtual environment, then run `pip install --upgrade jiuwenclaw`).++##### Source install upgrade++Follow the same steps as [Routine version upgrade – source install upgrade](#source-install-upgrade) (pull, reinstall, rebuild the front end when needed, and copy `dist` as described there).++#### 3. Data migration++After upgrading, migrate data so config and stores match the new version.++##### Step 1: Review config changes++```bash+# View the new config template (source install)+cat docs/config_template.yaml++# Or read the changelog+# https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/CHANGELOG.md+```++##### Step 2: Migrate configuration++1. **Compare old and new config shape**++ New releases may add or remove options. Check:+ - New required keys in `config.yaml`+ - New variables in `.env`+ - Deprecated or renamed keys++2. **Migrate by hand**++ ```bash+ # Back up the new default config+ cp ~/.jiuwenclaw/config/config.yaml ~/.jiuwenclaw/config/config.yaml.new++ # Restore from backup (use with care)+ # Prefer diff/merge in an editor instead of blind overwrite+ ```++3. **Common migration cases**++ | Case | What to do |+ |------|------------|+ | New model support | Add the new model block in `config.yaml` |+ | API endpoint change | Update URLs in `.env` |+ | Renamed keys | Map old → new using the changelog |+ | Removed keys | Delete obsolete entries |++##### Step 3: Migrate memory data++Memory is usually backward compatible; still verify:++```bash+# Inspect memory layout+ls ~/.jiuwenclaw/agent/memory/++# If something looks wrong, restore from backup+cp -r ~/.jiuwenclaw_backup/agent/memory/* ~/.jiuwenclaw/agent/memory/+```++##### Step 4: Verify migration++```bash+# Start the service+jiuwenclaw-start++# Watch logs for config errors+# Logs: ~/.jiuwenclaw/logs/+```++**Migration checklist:**++- [ ] Service starts cleanly+- [ ] Model config works (chat OK)+- [ ] Historical memory is readable+- [ ] Custom settings carried over+- [ ] No serious errors or warnings++---++## FAQ++### Q: On start I see "Python version not supported"++Use Python ≥3.11 and below 3.14 (e.g. 3.11, 3.12, or 3.13).++### Q: On start I see "Node.js not found"++Install Node.js 18.x or newer.++### Q: How do I check the installed version?++```bash+jiuwenclaw --version+```++### Q: How do I uninstall?++```bash+pip uninstall jiuwenclaw+```++---++## Related links++- **Repository:** https://gitcode.com/openJiuwen/jiuwenclaw+- **Issues:** https://gitcode.com/openJiuwen/jiuwenclaw/issues+- **Docs:** https://gitcode.com/openJiuwen/jiuwenclaw/tree/develop/docs++---++*Last updated: 2026-04-10*diff --git a/docs/en/README.md b/docs/en/README.mdindex 46a7ac4160..c4db91b7c6 100644--- a/docs/en/README.md+++ b/docs/en/README.md@@ -2,6 +2,7 @@This section collects common usage notes and feature documentation for JiuwenClaw.+- Installation: [Install guide](InstallGuide.md)- Install and run from scratch: [Quick start](Quickstart.md) / [TUI mode](Quickstart_tui.md)- Web UI layout and main areas: [Page overview](Page-Overview.md)([简体中文版](../zh/页面概览.md))- Unified Gateway↔Agent request envelope (E2A): [E2A protocol](E2A-protocol.md)([中文版](../zh/E2A-protocol.md))diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.mdindex d11bb37c15..b4462ca2ed 100644--- a/docs/en/SUMMARY.md+++ b/docs/en/SUMMARY.md@@ -1,5 +1,6 @@# Summary+- [Install guide](InstallGuide.md)- [Quick start](Quickstart.md)- [Quick start (TUI)](Quickstart_tui.md)- [Page overview (web UI)](Page-Overview.md)diff --git a/docs/en/install.md b/docs/en/install.mdnew file mode 100644index 0000000000..44c270059c--- /dev/null+++ b/docs/en/install.md@@ -0,0 +1,533 @@+# JiuwenClaw installation guide++> **Important:** Finishing installation does not mean the app is ready to use. You must complete model configuration first. See [Configuration](#configuration) for model setup.++---++## Prerequisites++Before installing JiuwenClaw, make sure your system meets the following requirements:++| Dependency | Version | Notes |+|------------|---------|-------|+| OS | Windows 10/11, macOS 10.15+, Linux | Common desktop OS supported |+| Python | 3.10 – 3.12 | Python 3.11 recommended |+| Node.js | 18.x or newer | Used for the web UI |+| Git | Latest | Required for source install |++### Environment check++Run these commands in a terminal:++```bash+# Check Python+python --version++# Check Node.js+node --version++# Check Git+git --version+```++---++## First-time installation++### Option 1: Desktop installer (exe)++> To be filled in when a desktop installer is available. Prefer this method when offered.++---++### Option 2: pip install++#### 1. Installation steps++```bash+# Create a virtual environment (recommended)+python -m venv jiuwenclaw-env++# Activate the virtual environment+# Windows:+jiuwenclaw-env\Scripts\activate+# macOS/Linux:+source jiuwenclaw-env/bin/activate++# Install JiuwenClaw+pip install jiuwenclaw+```++#### 2. Use China mainland mirrors (recommended)++```bash+# Tsinghua mirror+pip install jiuwenclaw -i https://pypi.tuna.tsinghua.edu.cn/simple++# Aliyun mirror+pip install jiuwenclaw -i https://mirrors.aliyun.com/pypi/simple/+```++#### 3. First launch++```bash+# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start JiuwenClaw+jiuwenclaw-start+```++After the first start, the app creates the config directory `~/.jiuwenclaw/`.++#### 4. Restarting the service++If you closed JiuwenClaw and want to run it again:++```bash+# Start again+jiuwenclaw-start+```++---++### Option 3: Install from source (uv)++#### 1. Install uv++```bash+# Windows (PowerShell)+powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"++# macOS/Linux+curl -LsSf https://astral.sh/uv/install.sh | sh+```++#### 2. Clone and install++```bash+# Clone the repository+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# Enter project directory+cd jiuwenclaw++# Create venv and install dependencies with uv+uv venv+uv pip install -e .+```++#### 3. Build the front end++> ⚠️ **Important:** With a source (editable) install you must build the front end manually, or startup will fail with `dist directory not found`.++```bash+# Enter front-end directory+cd web++# Install front-end dependencies+npm install++# Build+npm run build++# Copy build output into the user workspace+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# Back to repo root+cd ..+```++**Notes:**++- `pip install -e .` / `uv pip install -e .` is an editable install that points at your source tree.+- `web/dist` is ignored by `.gitignore` and is not shipped in the repo.+- You must build and copy artifacts to `~/.jiuwenclaw/web/dist`.++#### 4. First launch++```bash+# Activate virtual environment+# Windows:+.venv\Scripts\activate+# macOS/Linux:+source .venv/bin/activate++# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start+jiuwenclaw-start+```++#### 5. Restarting the service++```bash+# After activating the virtual environment+jiuwenclaw-start+```++---++### Option 4: Install from source (conda)++#### 1. Check and install conda++**Check if conda is installed:**++```bash+conda --version+```++If a version is printed, conda is installed and you can skip installation.++**Install conda (if missing):**++Miniconda (lightweight) is recommended:++| System | How to install |+|--------|----------------|+| Windows | PowerShell commands below |+| macOS | `brew install --cask miniconda` or download the installer |+| Linux | Commands below |++**Install Miniconda on Windows (PowerShell):**++```powershell+# Download Miniconda installer+Invoke-WebRequest -Uri "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" -OutFile "miniconda.exe"++# Silent install (default location)+start /wait "" .\Miniconda3-latest-Windows-x86_64.exe /InstallationType=[JustMe|AllUsers] /AddToPath=[0|1] /RegisterPython=[0|1] /S /D=<install_path>++# After install, open a new terminal and run conda --version. If it prints a version, install and PATH are OK.+```++**Install Miniconda on Linux:**++```bash+# Download and install Miniconda+curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh+bash miniconda.sh -b -p $HOME/miniconda3++# Add to PATH+export PATH="$HOME/miniconda3/bin:$PATH"++# Initialize conda (optional; takes effect after restarting the shell)+conda init+```++#### 2. Create the conda environment++```bash+# Create environment+conda create -n jiuwenclaw python=3.11++# Initialize conda (first time)+conda init+# After init, close the window and open a new session before activate++# Activate environment+conda activate jiuwenclaw+```++#### 3. Clone and install++```bash+# Clone the repository+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# Enter project directory+cd jiuwenclaw++# Install dependencies+pip install -e .+```++#### 4. Build the front end++> ⚠️ **Important:** With a source (editable) install you must build the front end manually, or startup will fail with `dist directory not found`.++```bash+# Enter front-end directory+cd web++# Install front-end dependencies+npm install++# Build+npm run build++# Copy build output into the user workspace+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# Back to repo root+cd ..+```++**Notes:**++- `pip install -e .` is an editable install that points at your source tree.+- `web/dist` is ignored by `.gitignore` and is not shipped in the repo.+- You must build and copy artifacts to `~/.jiuwenclaw/web/dist`.++#### 5. First launch++```bash+# Initialize JiuwenClaw (first run)+jiuwenclaw-init+# Start+jiuwenclaw-start+```++#### 6. Restarting the service++```bash+# Activate environment, then start+conda activate jiuwenclaw+jiuwenclaw-start+```++---++## Version upgrades++| Current range | Approach | Notes |+|---------------|----------|-------|+| Same major (e.g. 0.1.x → 0.1.y) | [Routine version upgrades](#routine-version-upgrades) | Upgrade directly; no backup required |+| Cross-major (e.g. 0.1.x → 0.2.x) | [Major version upgrades](#major-version-upgrades) | Back up data first |++---++### Routine version upgrades++#### pip install upgrade++```bash+# Activate your virtual environment+# Then upgrade+pip install --upgrade jiuwenclaw+```++#### Source install upgrade++```bash+# Enter project directory+cd jiuwenclaw++# Pull latest+git pull++# Reinstall+pip install -e .++# Rebuild the front end (when it changed)+cd web+npm install+npm run build++# Copy build output+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++cd ..+```++---++### Major version upgrades++> ⚠️ Always back up your data before upgrading across major versions.++#### 1. Data backup++**Windows:**++```bash+# Back up the whole config and data directory+xcopy "%USERPROFILE%\.jiuwenclaw" "%USERPROFILE%\.jiuwenclaw_backup" /E /I++# Or with PowerShell (recommended)+Copy-Item -Path "$env:USERPROFILE\.jiuwenclaw" -Destination "$env:USERPROFILE\.jiuwenclaw_backup" -Recurse+```++**macOS/Linux:**++```bash+# Back up the whole config and data directory+cp -r ~/.jiuwenclaw ~/.jiuwenclaw_backup++# Or with rsync (recommended; preserves permissions)+rsync -av ~/.jiuwenclaw ~/.jiuwenclaw_backup+```++**What to back up:**++| Path | Description |+|------|-------------|+| `config/config.yaml` | Main config (models, API keys, etc.) |+| `config/.env` | Environment variables |+| `agent/memory/` | User memory data |+| `agent/home/` | Identity and task data |+| `agent/skills/` | Skills library (custom skills and config) |+| `agent/workspace/` | Workspace files |++#### 2. Perform the upgrade++Pick the steps that match how you installed JiuwenClaw:++##### pip install upgrade++Same as [Routine version upgrade – pip install upgrade](#pip-install-upgrade):++```bash+# Activate virtual environment+# Windows:+jiuwenclaw-env\Scripts\activate+# macOS/Linux:+source jiuwenclaw-env/bin/activate++# Upgrade+pip install --upgrade jiuwenclaw+```++##### Source install upgrade++Same as [Routine version upgrade – source install upgrade](#source-install-upgrade):++```bash+# Enter project directory+cd jiuwenclaw++# Pull latest+git pull++# Reinstall+pip install -e .+```++#### 3. Data migration++After upgrading, migrate data so config and stores match the new version.++##### Step 1: Review config changes++```bash+# View the new config template (source install)+cat docs/config_template.yaml++# Or read the changelog+# https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/CHANGELOG.md+```++##### Step 2: Migrate configuration++1. **Compare old and new config shape**++ New releases may add or remove options. Check:+ - New required keys in `config.yaml`+ - New variables in `.env`+ - Deprecated or renamed keys++2. **Migrate by hand**++ ```bash+ # Back up the new default config+ cp ~/.jiuwenclaw/config/config.yaml ~/.jiuwenclaw/config/config.yaml.new++ # Restore from backup (use with care)+ # Prefer diff/merge in an editor instead of blind overwrite+ ```++3. **Common migration cases**++ | Case | What to do |+ |------|------------|+ | New model support | Add the new model block in `config.yaml` |+ | API endpoint change | Update URLs in `.env` |+ | Renamed keys | Map old → new using the changelog |+ | Removed keys | Delete obsolete entries |++##### Step 3: Migrate memory data++Memory is usually backward compatible; still verify:++```bash+# Inspect memory layout+ls ~/.jiuwenclaw/agent/memory/++# If something looks wrong, restore from backup+cp -r ~/.jiuwenclaw_backup/agent/memory/* ~/.jiuwenclaw/agent/memory/+```++##### Step 4: Verify migration++```bash+# Start the service+jiuwenclaw-start++# Watch logs for config errors+# Logs: ~/.jiuwenclaw/logs/+```++**Migration checklist:**++- [ ] Service starts cleanly+- [ ] Model config works (chat OK)+- [ ] Historical memory is readable+- [ ] Custom settings carried over+- [ ] No serious errors or warnings++---++## Configuration++After installation, configure models before normal use. Files live under:++- **Config directory:** `~/.jiuwenclaw/config/`+- **Main file:** `config.yaml`+- **Environment:** `.env`++For details see the [configuration guide](https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/en/Configuration.md) ([Chinese](https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/zh/%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF.md)).+++## FAQ++### Q: On start I see "Python version not supported"++Use Python 3.10, 3.11, or 3.12.++### Q: On start I see "Node.js not found"++Install Node.js 18.x or newer.++### Q: How do I check the installed version?++```bash+jiuwenclaw --version+```++### Q: How do I uninstall?++```bash+pip uninstall jiuwenclaw+```++---++## Related links++- **Web UI (page overview):** [Page-Overview.md](Page-Overview.md)([简体中文版](../zh/页面概览.md))+- **Repository:** https://gitcode.com/openJiuwen/jiuwenclaw+- **Issues:** https://gitcode.com/openJiuwen/jiuwenclaw/issues+- **Docs:** https://gitcode.com/openJiuwen/jiuwenclaw/tree/develop/docs++---++*Last updated: 2026-04-09*diff --git a/docs/zh/README.md b/docs/zh/README.mdindex 773dc3aad0..2268f21a83 100644--- a/docs/zh/README.md+++ b/docs/zh/README.md@@ -2,6 +2,7 @@这里汇总 JiuwenClaw 的常用使用说明与功能文档。+- 从零开始安装与启动:见 [安装指南](安装指南.md)- 从零开始安装与启动:见 [快速开始](Quickstart.md) / [TUI 模式](Quickstart_tui.md)- 网页端界面与功能分区总览:见 [页面概览](页面概览.md)([English: Page overview](../en/Page-Overview.md))- Gateway 与 AgentServer 统一请求信封(E2A):见 [E2A 协议](E2A-protocol.md)([English](../en/E2A-protocol.md))diff --git a/docs/zh/SUMMARY.md b/docs/zh/SUMMARY.mdindex 0bded8e218..86988e35f5 100644--- a/docs/zh/SUMMARY.md+++ b/docs/zh/SUMMARY.md@@ -1,5 +1,6 @@# Summary+- [安装指南](安装指南.md)- [快速开始](Quickstart.md)- [快速开始(TUI)](Quickstart_tui.md)- [页面概览](页面概览.md)diff --git "a/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md" "b/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md"new file mode 100644index 0000000000..501a87a6ff--- /dev/null+++ "b/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md"@@ -0,0 +1,480 @@+# JiuwenClaw 安装指南++> **重要提醒:** 安装完成并不代表直接可用,需要先完成模型配置。请参考[配置信息](https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/zh/%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF.md)进行模型配置++---++## 安装前准备++在安装 JiuwenClaw 之前,请确保您的系统满足以下要求:++| 依赖项 | 版本要求 | 说明 |+|--------|----------|------|+| 操作系统 | Windows 10/11, macOS 10.15+, Linux | 支持主流操作系统 |+| Python | ≥3.11, <3.14 | 推荐使用 Python 3.11 |+| Node.js | 18.x 或更高版本 | 用于前端界面 |+| Git | 最新版本 | 用于源码安装 |++### 环境检查++在终端中运行以下命令检查环境:++```bash+# 检查 Python 版本+python --version+# 预期输出:Python 3.11.x 或 Python 3.12.x++# 检查 Node.js 版本+node --version+# 预期输出:v18.x.x 或更高++# 检查 Git 版本+git --version+# 预期输出:git version 2.x.x+```++---++## 首次安装++### 方式一:pip 安装++#### 1. 安装步骤++```bash+# 创建虚拟环境(推荐)+python -m venv jiuwenclaw-env++# 激活虚拟环境+# Windows:+jiuwenclaw-env\Scripts\activate+# macOS/Linux:+source jiuwenclaw-env/bin/activate++# 安装 JiuwenClaw+## 方式一:默认安装+pip install jiuwenclaw++## 方式二:使用国内镜像源(推荐)+# 清华源+pip install jiuwenclaw -i https://pypi.tuna.tsinghua.edu.cn/simple++# 阿里源+pip install jiuwenclaw -i https://mirrors.aliyun.com/pypi/simple/+```++#### 2. 首次启动++```bash+# 初始化 JiuwenClaw(首次启动)+jiuwenclaw-init+# 启动 JiuwenClaw+jiuwenclaw-start+```++首次启动后,系统会自动创建配置目录 `~/.jiuwenclaw/`。++#### 3. 启动后验证++启动成功后,请按以下步骤验证安装是否正确:++1. **打开 Web 端**:在浏览器中访问 `http://localhost:5173`+2. **进入配置页面**:点击左侧导航栏「配置信息」+3. **完成模型配置**:参考 [配置信息](配置信息.md) 完成模型 API 配置+4. **验证安装成功**:+ - Web 页面可正常访问+ - 完成模型配置后可进行一次基础对话++++> 💡 **提示**:如果 Web 页面无法访问,请检查日志文件 `~/.jiuwenclaw/logs/` 是否有错误信息。++#### 4. 重新启动服务++如果关闭 JiuwenClaw 后需要再次使用:++```bash+# 再次启动+jiuwenclaw-start+```++---++### 方式二:源码安装(uv 方式)++#### 1. 环境准备++确保已安装 uv。如未安装,请参考 [uv 官方文档](https://docs.astral.sh/uv/) 自行安装。++```bash+# 检查 uv 是否已安装+uv --version++#预期输出:uv 0.17.x 或更高+```++#### 2. 克隆并安装++```bash+# 克隆代码仓库+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# 进入项目目录+cd jiuwenclaw++# 使用 uv 创建虚拟环境并安装依赖+uv venv+uv pip install -e .+```++#### 3. 构建前端++> ⚠️ **重要**:源码安装(editable install)需要手动构建前端,否则启动时会报错 `dist directory not found`。++```bash+# 进入前端目录+cd jiuwenclaw\web++# 安装前端依赖+npm install++# 构建前端+npm run build++# 复制构建产物到用户工作区+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# 返回项目根目录+cd ..\..+```++**说明**:+- `pip install -e .` 是 editable install,直接指向源码目录+- 源码中 `web/dist` 被 `.gitignore` 忽略,不包含构建产物+- 需要手动构建并复制到 `~/.jiuwenclaw/web/dist`++#### 4. 首次启动++```bash+# 激活虚拟环境+# Windows:+.venv\Scripts\activate+# macOS/Linux:+source .venv/bin/activate++# 初始化 JiuwenClaw(首次启动)+jiuwenclaw-init+# 启动+jiuwenclaw-start+```++#### 5. 启动后验证++验证步骤见 [启动后验证](#3-启动后验证)。++#### 6. 重新启动服务++```bash+# 激活虚拟环境后启动+jiuwenclaw-start+```++---++### 方式三:源码安装(conda 方式)++#### 1. 环境准备++确保已安装 conda。如未安装,请参考 [Miniconda 官方文档](https://docs.conda.io/en/latest/miniconda.html) 自行安装。++```bash+# 检查 conda 是否已安装+conda --version+# 预期输出:conda 23.x.x 或更高+```++#### 2. 创建 conda 环境++```bash+# 创建虚拟环境+conda create -n jiuwenclaw python=3.11++# 初始化环境(首次)+conda init+# 初始化之后,关闭窗口。再重新打开会话执行激活命令++# 激活环境+conda activate jiuwenclaw+```++#### 3. 克隆并安装++```bash+# 克隆代码仓库+git clone https://gitcode.com/openJiuwen/jiuwenclaw.git++# 进入项目目录+cd jiuwenclaw++# 安装依赖+pip install -e .+```++#### 4. 构建前端++> ⚠️ **重要**:源码安装(editable install)需要手动构建前端,否则启动时会报错 `dist directory not found`。++```bash+# 进入前端目录+cd jiuwenclaw\web++# 安装前端依赖+npm install++# 构建前端+npm run build++# 复制构建产物到用户工作区+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++# 返回项目根目录+cd ..\..+```++**说明**:+- `pip install -e .` 是 editable install,直接指向源码目录+- 源码中 `web/dist` 被 `.gitignore` 忽略,不包含构建产物+- 需要手动构建并复制到 `~/.jiuwenclaw/web/dist`++#### 5. 首次启动++```bash+# 初始化 JiuwenClaw(首次启动)+jiuwenclaw-init+# 启动+jiuwenclaw-start+```++#### 6. 启动后验证++验证步骤见 [启动后验证](#3-启动后验证)。++#### 7. 重新启动服务++```bash+# 激活环境后启动+conda activate jiuwenclaw+jiuwenclaw-start+```++---++## 版本升级++| 当前版本范围 | 升级方式 | 说明 |+|--------------|----------|------|+| 常规版本(如0.1.8 → 0.1.9,不跨0.1.7版本) | [常规版本升级](#常规版本升级) | 直接升级,无需备份 |+| 重大版本(如<0.1.7 → >=0.1.7,跨0.1.7版本) | [重大版本升级](#重大版本升级) | 需要先备份数据 |++---++### 常规版本升级++#### pip 安装升级++```bash+# 激活虚拟环境+# 然后执行升级+pip install --upgrade jiuwenclaw+```++#### 源码安装升级++```bash+# 进入项目目录+cd jiuwenclaw++# 拉取最新代码+git pull++# 重新安装+pip install -e .++# 重新构建前端(如有更新)+cd jiuwenclaw\web+npm install+npm run build++# 复制构建产物+# Windows:+xcopy /E /I dist %USERPROFILE%\.jiuwenclaw\web\dist+# macOS/Linux:+cp -r dist ~/.jiuwenclaw/web/dist++cd ..\..+```++---++### 重大版本升级++> ⚠️ 跨主版本升级前,请务必备份数据!++#### 1. 数据备份步骤++**Windows 系统:**++```bash+# 备份整个配置和数据目录+xcopy "%USERPROFILE%\.jiuwenclaw" "%USERPROFILE%\.jiuwenclaw_backup" /E /I++# 或使用 PowerShell(推荐)+Copy-Item -Path "$env:USERPROFILE\.jiuwenclaw" -Destination "$env:USERPROFILE\.jiuwenclaw_backup" -Recurse+```++**macOS/Linux 系统:**++```bash+# 备份整个配置和数据目录+cp -r ~/.jiuwenclaw ~/.jiuwenclaw_backup++# 或使用 rsync(推荐,保留权限和属性)+rsync -av ~/.jiuwenclaw ~/.jiuwenclaw_backup+```++**备份内容说明:**++| 目录/文件 | 说明 |+|-----------|------|+| `config/config.yaml` | 主配置文件(模型、API密钥等) |+| `config/.env` | 环境变量配置 |+| `agent/memory/` | 用户记忆数据 |+| `agent/home/` | 身份与任务信息 |+| `agent/skills/` | 技能库(自定义技能和配置) |+| `agent/workspace/` | 工作区文件 |++#### 2. 执行升级++根据您的安装方式,选择对应的升级方法:++##### pip 安装升级++步骤与 [常规版本升级 - pip 安装升级](#pip-安装升级) 完全相同,请直接按该小节执行。++##### 源码安装升级++步骤与 [常规版本升级 - 源码安装升级](#源码安装升级) 完全相同,请直接按该小节执行。++#### 3. 数据迁移++升级完成后,需要进行数据迁移以确保配置和数据兼容新版本。++##### 步骤一:检查配置文件变更++```bash+# 查看新版本的配置模板(源码安装)+cat docs/config_template.yaml++# 或查看配置变更日志+# https://gitcode.com/openJiuwen/jiuwenclaw/blob/develop/docs/CHANGELOG.md+```++##### 步骤二:配置文件迁移++1. **对比新旧配置文件结构**++ 新版本可能引入新的配置项或废弃旧配置项。请检查:+ - `config.yaml` 中是否有新增必填项+ - `.env` 中是否有新的环境变量+ - 旧配置项是否被废弃或重命名++2. **手动迁移配置**++ ```bash+ # 备份新版本的默认配置+ cp ~/.jiuwenclaw/config/config.yaml ~/.jiuwenclaw/config/config.yaml.new++ # 从备份恢复旧配置(谨慎操作)+ # 建议使用文本编辑器对比合并,而非直接覆盖+ ```++3. **常见配置迁移场景**++ | 场景 | 处理方式 |+ |------|----------|+ | 新增模型支持 | 在 `config.yaml` 中添加新的模型配置项 |+ | API 端点变更 | 更新 `.env` 中的 API 地址 |+ | 配置项重命名 | 按更新日志映射旧项到新项 |+ | 废弃配置项 | 删除不再使用的配置项 |++##### 步骤三:记忆数据迁移++记忆数据通常向后兼容,但建议检查:++```bash+# 检查记忆目录结构+ls ~/.jiuwenclaw/agent/memory/++# 如有异常,可从备份恢复+cp -r ~/.jiuwenclaw_backup/agent/memory/* ~/.jiuwenclaw/agent/memory/+```++##### 步骤四:验证迁移结果++```bash+# 启动服务+jiuwenclaw-start++# 检查日志是否有配置错误+# 日志位置:~/.jiuwenclaw/logs/+```++**迁移检查清单:**++- [ ] 服务能正常启动+- [ ] 模型配置生效(能正常对话)+- [ ] 历史记忆数据可访问+- [ ] 自定义配置已迁移+- [ ] 无报错或警告信息++---++## 常见问题++### Q: 启动时报错 "Python version not supported"++请确保 Python 版本 ≥3.11 且 <3.14。Python 版本检查详见:[环境检查](#环境检查)++### Q: 启动时报错 "Node.js not found"++请安装 Node.js 18.x 或更高版本。Node.js 版本检查详见:[环境检查](#环境检查)++### Q: 如何查看当前版本?++```bash+pip show jiuwenclaw+```++### Q: 如何卸载?++```bash+pip uninstall jiuwenclaw+```++---++## 相关链接++- **代码仓库:** https://gitcode.com/openJiuwen/jiuwenclaw+- **问题反馈:** https://gitcode.com/openJiuwen/jiuwenclaw/issues+- **文档中心:** https://gitcode.com/openJiuwen/jiuwenclaw/tree/develop/docs++---++*最后更新:2026-04-10*