التثبيت باستخدام Node.js
الطريقة الموصى بها لتثبيت OpenClaw. يتطلب Node.js 18 أو أحدث.
البداية السريعة
# تثبيت عالميًا npm install -g openclaw # أو باستخدام npx (بدون تثبيت) npx openclaw gateway start
تثبيت Node.js
إذا لم يكن Node.js مثبتًا:
macOS
# باستخدام Homebrew brew install node # أو باستخدام nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 20
Linux
# Ubuntu/Debian curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs # باستخدام nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 20
Windows
حمّل المثبّت من nodejs.org
التحقق من التثبيت
# التحقق من إصدار Node.js node --version # التحقق من إصدار npm npm --version # التحقق من تثبيت OpenClaw openclaw --version
التثبيت المحلي
للاستخدام في مشروع محدد:
# في مجلد مشروعك npm init -y npm install openclaw # تشغيل من المشروع npx openclaw gateway start
مدراء الحزم البديلة
yarn
yarn global add openclaw
pnpm
pnpm add -g openclaw
التحديث
# تحديث إلى أحدث إصدار npm update -g openclaw # أو تثبيت إصدار محدد npm install -g openclaw@1.5.0 # عرض الإصدارات المتاحة npm view openclaw versions
متطلبات النظام
- Node.js 18.0.0 أو أحدث (موصى بـ 20.x LTS)
- npm 9.0.0 أو أحدث
- 4GB RAM كحد أدنى
- 2GB مساحة حرة على القرص
استكشاف الأخطاء
EACCES: permission denied
مشكلة صلاحيات npm. الحل:
mkdir ~/.npm-global npm config set prefix '~/.npm-global' echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc
إصدار Node.js قديم
قم بالترقية:
nvm install 20 && nvm use 20
بطء التثبيت
استخدم registry أسرع:
npm config set registry https://registry.npmmirror.com