openclaw-chinese-ai-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenClaw Chinese AI Assistant Skill

OpenClaw中文AI助手Skill

Skill by ara.so — Hermes Skills collection.
ara.so开发的Skill — 属于Hermes Skills集合。

Overview

概述

OpenClaw Chinese Translation is a fully localized (Simplified Chinese) distribution of OpenClaw, an open-source personal AI assistant platform with 195,000+ GitHub stars. It runs locally on your machine and provides AI assistance through popular chat platforms (WhatsApp, Telegram, Discord) with both CLI and web dashboard interfaces fully translated to Chinese.
Key Features:
  • Automatic hourly sync with upstream OpenClaw (< 1 hour delay)
  • Full Chinese localization for CLI and Dashboard
  • Multi-platform support: WhatsApp, Telegram, Discord
  • Multiple LLM providers: Claude, OpenAI, compatible APIs
  • Tool calling and skill extensions
  • Daemon/service mode for background operation
  • Web-based management dashboard
OpenClaw中文翻译版是OpenClaw的全本地化(简体中文)发行版,OpenClaw是一款拥有195000+ GitHub星标的开源个人AI助手平台。它可在本地设备运行,并通过主流聊天平台(WhatsApp、Telegram、Discord)提供AI辅助服务,同时CLI和Web控制面板界面已完全汉化。
核心特性:
  • 每小时自动同步上游OpenClaw代码(延迟小于1小时)
  • CLI与控制面板全中文本地化
  • 多平台支持:WhatsApp、Telegram、Discord
  • 多LLM提供商适配:Claude、OpenAI及兼容API
  • 工具调用与Skill扩展功能
  • 守护进程/服务模式支持后台运行
  • 基于Web的管理控制面板

Installation

安装

Prerequisites

前置要求

Node.js >= 22 is required. Check version:
bash
node -v
If needed, download from https://nodejs.org/
需安装Node.js >= 22版本。检查版本:
bash
node -v
如需安装,请访问https://nodejs.org/下载

Install OpenClaw Chinese

安装OpenClaw中文版本

bash
npm install -g @qingchencloud/openclaw-zh@latest
bash
npm install -g @qingchencloud/openclaw-zh@latest

Verify Installation

验证安装

bash
openclaw --version
bash
openclaw --version

Initialization and Configuration

初始化与配置

Initial Setup with Daemon

带守护进程的初始设置

bash
openclaw onboard --install-daemon
This interactive wizard will guide you through:
  1. Selecting an LLM provider (Claude, OpenAI, or compatible)
  2. Configuring API credentials
  3. Setting up chat channels (WhatsApp/Telegram/Discord)
  4. Installing gateway as daemon service
bash
openclaw onboard --install-daemon
该交互式向导将引导您完成以下步骤:
  1. 选择LLM提供商(Claude、OpenAI或兼容提供商)
  2. 配置API凭证
  3. 设置聊天渠道(WhatsApp/Telegram/Discord)
  4. 将网关安装为守护进程服务

Manual Configuration

手动配置

View current config:
bash
openclaw config
Edit config file directly (located at
~/.openclaw/config.yml
):
yaml
llm:
  provider: openai
  api_key: ${OPENAI_API_KEY}
  model: gpt-4
  base_url: https://api.openai.com/v1  # For compatible providers

gateway:
  port: 3000
  host: 0.0.0.0

channels:
  - type: telegram
    token: ${TELEGRAM_BOT_TOKEN}
  - type: discord
    token: ${DISCORD_BOT_TOKEN}
查看当前配置:
bash
openclaw config
直接编辑配置文件(路径为
~/.openclaw/config.yml
):
yaml
llm:
  provider: openai
  api_key: ${OPENAI_API_KEY}
  model: gpt-4
  base_url: https://api.openai.com/v1  # 兼容提供商可修改此地址

gateway:
  port: 3000
  host: 0.0.0.0

channels:
  - type: telegram
    token: ${TELEGRAM_BOT_TOKEN}
  - type: discord
    token: ${DISCORD_BOT_TOKEN}

Configure LLM Provider

配置LLM提供商

For OpenAI-compatible providers (like the free gpt.qt.cool):
bash
openclaw config set llm.provider openai-compatible
openclaw config set llm.base_url https://gpt.qt.cool/v1
openclaw config set llm.api_key ${YOUR_API_KEY}
openclaw config set llm.model gpt-4
For Claude:
bash
openclaw config set llm.provider anthropic
openclaw config set llm.api_key ${ANTHROPIC_API_KEY}
openclaw config set llm.model claude-3-5-sonnet-20241022
对于OpenAI兼容提供商(例如免费的gpt.qt.cool):
bash
openclaw config set llm.provider openai-compatible
openclaw config set llm.base_url https://gpt.qt.cool/v1
openclaw config set llm.api_key ${YOUR_API_KEY}
openclaw config set llm.model gpt-4
对于Claude:
bash
openclaw config set llm.provider anthropic
openclaw config set llm.api_key ${ANTHROPIC_API_KEY}
openclaw config set llm.model claude-3-5-sonnet-20241022

Core Commands

核心命令

Gateway Management

网关管理

bash
undefined
bash
undefined

Start gateway (foreground, for debugging)

启动网关(前台运行,用于调试)

openclaw gateway run
openclaw gateway run

Start as daemon (background, recommended)

以守护进程启动(后台运行,推荐方式)

openclaw gateway start
openclaw gateway start

Stop daemon

停止守护进程

openclaw gateway stop
openclaw gateway stop

Restart gateway

重启网关

openclaw gateway restart
openclaw gateway restart

Check status

查看状态

openclaw gateway status
openclaw gateway status

Install as system service (auto-start on boot)

安装为系统服务(开机自启)

openclaw gateway install
openclaw gateway install

Uninstall system service

卸载系统服务

openclaw gateway uninstall
undefined
openclaw gateway uninstall
undefined

Dashboard

控制面板

bash
undefined
bash
undefined

Open web dashboard (auto-opens browser)

打开Web控制面板(自动启动浏览器)

openclaw dashboard
openclaw dashboard

Open on specific port

指定端口打开

openclaw dashboard --port 8080
openclaw dashboard --port 8080

Access remotely with token

通过令牌远程访问

openclaw dashboard --host 0.0.0.0 --token ${DASHBOARD_TOKEN}

Dashboard URL: http://localhost:3000 (default)

**Language Setting:** After opening dashboard, go to **Overview** page → scroll to bottom → set **Language** to **简体中文 (Simplified Chinese)** → refresh.
openclaw dashboard --host 0.0.0.0 --token ${DASHBOARD_TOKEN}

控制面板默认URL:http://localhost:3000

**语言设置:** 打开控制面板后,进入**概览**页面 → 滚动至底部 → 将**语言**设置为**简体中文 (Simplified Chinese)** → 刷新页面。

Skills Management

Skill管理

bash
undefined
bash
undefined

List available skills

列出可用Skill

openclaw skills list
openclaw skills list

Install a skill

安装Skill

openclaw skills install 1password
openclaw skills install 1password

Remove a skill

移除Skill

openclaw skills remove 1password
openclaw skills remove 1password

Update all skills

更新所有Skill

openclaw skills update
undefined
openclaw skills update
undefined

Maintenance

维护命令

bash
undefined
bash
undefined

Update OpenClaw CLI

更新OpenClaw CLI

openclaw update
openclaw update

Diagnose issues (auto-fix)

诊断问题(自动修复)

openclaw doctor
openclaw doctor

View logs

查看日志

openclaw logs
openclaw logs

Clear cache

清除缓存

openclaw cache clear
undefined
openclaw cache clear
undefined

Real-World Usage Examples

实际使用示例

Example 1: Deploy with Custom LLM Provider

示例1:自定义LLM提供商部署

bash
#!/bin/bash
bash
#!/bin/bash

Set environment variables

设置环境变量

export OPENAI_API_KEY="sk-your-key-here" export TELEGRAM_BOT_TOKEN="123456:ABC-DEF-your-token"
export OPENAI_API_KEY="sk-your-key-here" export TELEGRAM_BOT_TOKEN="123456:ABC-DEF-your-token"

Install

安装

npm install -g @qingchencloud/openclaw-zh@latest
npm install -g @qingchencloud/openclaw-zh@latest

Configure programmatically

程序化配置

openclaw config set llm.provider openai-compatible openclaw config set llm.base_url https://gpt.qt.cool/v1 openclaw config set llm.api_key "${OPENAI_API_KEY}" openclaw config set llm.model gpt-4
openclaw config set llm.provider openai-compatible openclaw config set llm.base_url https://gpt.qt.cool/v1 openclaw config set llm.api_key "${OPENAI_API_KEY}" openclaw config set llm.model gpt-4

Add Telegram channel

添加Telegram渠道

openclaw config set channels.0.type telegram openclaw config set channels.0.token "${TELEGRAM_BOT_TOKEN}"
openclaw config set channels.0.type telegram openclaw config set channels.0.token "${TELEGRAM_BOT_TOKEN}"

Start daemon

启动守护进程

openclaw gateway start
openclaw gateway start

Verify running

验证运行状态

openclaw gateway status
undefined
openclaw gateway status
undefined

Example 2: Docker Deployment

示例2:Docker部署

Create
docker-compose.yml
:
yaml
version: '3.8'

services:
  openclaw:
    image: ghcr.io/1186258278/openclaw-chinese:latest
    container_name: openclaw-zh
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
      - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
      - DASHBOARD_TOKEN=${DASHBOARD_TOKEN}
    volumes:
      - ./data:/root/.openclaw
      - ./logs:/var/log/openclaw
Run:
bash
docker-compose up -d
创建
docker-compose.yml
文件:
yaml
version: '3.8'

services:
  openclaw:
    image: ghcr.io/1186258278/openclaw-chinese:latest
    container_name: openclaw-zh
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
      - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
      - DASHBOARD_TOKEN=${DASHBOARD_TOKEN}
    volumes:
      - ./data:/root/.openclaw
      - ./logs:/var/log/openclaw
启动命令:
bash
docker-compose up -d

Example 3: Remote Access with Nginx

示例3:Nginx实现远程访问

Nginx config for HTTPS dashboard access:
nginx
server {
    listen 443 ssl;
    server_name openclaw.example.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        
        # WebSocket support
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
用于HTTPS控制面板访问的Nginx配置:
nginx
server {
    listen 443 ssl;
    server_name openclaw.example.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        
        # WebSocket支持
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Example 4: Programmatic Agent Creation (JavaScript)

示例4:程序化创建Agent(JavaScript)

javascript
// Create custom agent configuration
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');

const configPath = path.join(process.env.HOME, '.openclaw', 'config.yml');
const config = yaml.load(fs.readFileSync(configPath, 'utf8'));

// Add new agent
config.agents = config.agents || [];
config.agents.push({
  name: 'research-assistant',
  model: 'gpt-4',
  system_prompt: '你是一个专业的研究助手,帮助用户查找和总结信息。',
  skills: ['web-search', 'summarize', 'markdown'],
  max_tokens: 4000,
  temperature: 0.7
});

// Save config
fs.writeFileSync(configPath, yaml.dump(config), 'utf8');
console.log('Agent created successfully');
javascript
// 创建自定义Agent配置
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');

const configPath = path.join(process.env.HOME, '.openclaw', 'config.yml');
const config = yaml.load(fs.readFileSync(configPath, 'utf8'));

// 添加新Agent
config.agents = config.agents || [];
config.agents.push({
  name: 'research-assistant',
  model: 'gpt-4',
  system_prompt: '你是一个专业的研究助手,帮助用户查找和总结信息。',
  skills: ['web-search', 'summarize', 'markdown'],
  max_tokens: 4000,
  temperature: 0.7
});

// 保存配置
fs.writeFileSync(configPath, yaml.dump(config), 'utf8');
console.log('Agent created successfully');

Example 5: Monitoring Gateway Status

示例5:监控网关状态

bash
#!/bin/bash
bash
#!/bin/bash

Check if gateway is running

检查网关是否运行

if openclaw gateway status | grep -q "running"; then echo "Gateway is healthy" exit 0 else echo "Gateway is down, restarting..." openclaw gateway restart sleep 5 if openclaw gateway status | grep -q "running"; then echo "Gateway restarted successfully" exit 0 else echo "Failed to restart gateway" exit 1 fi fi
undefined
if openclaw gateway status | grep -q "running"; then echo "Gateway is healthy" exit 0 else echo "Gateway is down, restarting..." openclaw gateway restart sleep 5 if openclaw gateway status | grep -q "running"; then echo "Gateway restarted successfully" exit 0 else echo "Failed to restart gateway" exit 1 fi fi
undefined

Common Patterns

常见配置模式

Pattern 1: Multi-Model Setup

模式1:多模型配置

Configure different models for different tasks:
yaml
agents:
  - name: fast-assistant
    model: gpt-3.5-turbo
    use_case: quick_questions
  
  - name: deep-thinker
    model: claude-3-opus-20240229
    use_case: complex_reasoning
  
  - name: code-helper
    model: gpt-4
    skills: ['code-interpreter', 'github']
为不同任务配置不同模型:
yaml
agents:
  - name: fast-assistant
    model: gpt-3.5-turbo
    use_case: quick_questions
  
  - name: deep-thinker
    model: claude-3-opus-20240229
    use_case: complex_reasoning
  
  - name: code-helper
    model: gpt-4
    skills: ['code-interpreter', 'github']

Pattern 2: Environment-Based Config

模式2:基于环境变量的配置

Use environment variables for secrets:
bash
undefined
使用环境变量存储敏感信息:
bash
undefined

.env file

.env文件

OPENAI_API_KEY=sk-proj-... ANTHROPIC_API_KEY=sk-ant-... TELEGRAM_BOT_TOKEN=123456:ABC... WHATSAPP_PHONE_NUMBER=+1234567890 DASHBOARD_TOKEN=secure-random-token-here
OPENAI_API_KEY=sk-proj-... ANTHROPIC_API_KEY=sk-ant-... TELEGRAM_BOT_TOKEN=123456:ABC... WHATSAPP_PHONE_NUMBER=+1234567890 DASHBOARD_TOKEN=secure-random-token-here

Load in config.yml

在config.yml中加载

llm: api_key: ${OPENAI_API_KEY}
channels:
  • type: telegram token: ${TELEGRAM_BOT_TOKEN}
  • type: whatsapp phone: ${WHATSAPP_PHONE_NUMBER}
undefined
llm: api_key: ${OPENAI_API_KEY}
channels:
  • type: telegram token: ${TELEGRAM_BOT_TOKEN}
  • type: whatsapp phone: ${WHATSAPP_PHONE_NUMBER}
undefined

Pattern 3: Skill Chains

模式3:Skill链式调用

Combine multiple skills for complex workflows:
javascript
// Example: Research and summarize workflow
const workflow = {
  steps: [
    { skill: 'web-search', query: '${user_query}' },
    { skill: 'summarize', input: '${search_results}' },
    { skill: 'markdown', format: 'report', input: '${summary}' }
  ]
};
组合多个Skill实现复杂工作流:
javascript
// 示例:研究与总结工作流
const workflow = {
  steps: [
    { skill: 'web-search', query: '${user_query}' },
    { skill: 'summarize', input: '${search_results}' },
    { skill: 'markdown', format: 'report', input: '${summary}' }
  ]
};

Troubleshooting

故障排查

Gateway Won't Start

网关无法启动

bash
undefined
bash
undefined

Check if port 3000 is already in use

检查3000端口是否被占用

lsof -i :3000 # macOS/Linux netstat -ano | findstr :3000 # Windows
lsof -i :3000 # macOS/Linux netstat -ano | findstr :3000 # Windows

Run diagnostics

运行诊断工具

openclaw doctor
openclaw doctor

Check logs

查看日志

openclaw logs --tail 100
openclaw logs --tail 100

Try alternative port

尝试使用其他端口

openclaw gateway run --port 3001
undefined
openclaw gateway run --port 3001
undefined

Dashboard Connection Issues

控制面板连接问题

  1. Cannot access dashboard remotely:
bash
undefined
  1. 无法远程访问控制面板:
bash
undefined

Start with external access

启动时开启外部访问

openclaw dashboard --host 0.0.0.0 --token your-secure-token
openclaw dashboard --host 0.0.0.0 --token your-secure-token

Or edit config

或编辑配置

openclaw config set gateway.host 0.0.0.0 openclaw config set gateway.dashboard_token your-secure-token openclaw gateway restart

2. **CORS errors:**

```yaml
openclaw config set gateway.host 0.0.0.0 openclaw config set gateway.dashboard_token your-secure-token openclaw gateway restart

2. **CORS错误:**

```yaml

config.yml

config.yml

gateway: cors: enabled: true origins: - https://yourdomain.com - http://localhost:*
undefined
gateway: cors: enabled: true origins: - https://yourdomain.com - http://localhost:*
undefined

LLM Provider Errors

LLM提供商错误

bash
undefined
bash
undefined

Test API connection

测试API连接

curl https://gpt.qt.cool/v1/models
-H "Authorization: Bearer ${OPENAI_API_KEY}"
curl https://gpt.qt.cool/v1/models
-H "Authorization: Bearer ${OPENAI_API_KEY}"

Verify config

验证配置

openclaw config get llm
openclaw config get llm

Switch provider

切换提供商

openclaw config set llm.provider openai-compatible openclaw config set llm.base_url https://api.openai.com/v1
undefined
openclaw config set llm.provider openai-compatible openclaw config set llm.base_url https://api.openai.com/v1
undefined

Daemon Service Issues (Windows)

Windows系统守护进程服务问题

If
gateway install
fails on Windows:
bash
undefined
如果Windows系统中
gateway install
命令失败:
bash
undefined

Use daemon start instead (doesn't require schtasks)

使用gateway start替代(无需schtasks权限)

openclaw gateway start
openclaw gateway start

Or use Docker

或使用Docker

docker run -d -p 3000:3000
-v ~/.openclaw:/root/.openclaw
ghcr.io/1186258278/openclaw-chinese:latest
undefined
docker run -d -p 3000:3000
-v ~/.openclaw:/root/.openclaw
ghcr.io/1186258278/openclaw-chinese:latest
undefined

Memory/Performance Issues

内存/性能问题

bash
undefined
bash
undefined

Check resource usage

查看资源使用情况

openclaw gateway status --verbose
openclaw gateway status --verbose

Limit memory (Node.js)

限制内存(Node.js)

export NODE_OPTIONS="--max-old-space-size=4096" openclaw gateway restart
export NODE_OPTIONS="--max-old-space-size=4096" openclaw gateway restart

Clear cache

清除缓存

openclaw cache clear
undefined
openclaw cache clear
undefined

Update Issues

更新问题

bash
undefined
bash
undefined

Force reinstall

强制重新安装

npm uninstall -g @qingchencloud/openclaw-zh npm install -g @qingchencloud/openclaw-zh@latest
npm uninstall -g @qingchencloud/openclaw-zh npm install -g @qingchencloud/openclaw-zh@latest

Clear npm cache if needed

必要时清除npm缓存

npm cache clean --force
undefined
npm cache clean --force
undefined

Uninstallation

卸载

bash
undefined
bash
undefined

Stop services

停止服务

openclaw gateway stop openclaw gateway uninstall # If installed as service
openclaw gateway stop openclaw gateway uninstall # 如果已安装为系统服务

Uninstall package

卸载包

npm uninstall -g @qingchencloud/openclaw-zh
npm uninstall -g @qingchencloud/openclaw-zh

Remove config (optional)

删除配置文件(可选)

rm -rf ~/.openclaw
undefined
rm -rf ~/.openclaw
undefined

Additional Resources

额外资源