openclaw源码安装

From source (development)

Prefer pnpm for builds from source. Bun is optional for running TypeScript directly.

复制代码
git clone https://github.com/openclaw/openclaw.git
cd openclaw

pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build

pnpm openclaw onboard --install-daemon

# Dev loop (auto-reload on TS changes)
pnpm gateway:watch

1:install

如果没有pnpm,回报

pnpm : 无法将"pnpm"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确

,然后再试一次。

所在位置 行:1 字符: 1

复制代码
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\Administrator> nvm ls

  * 22.22.1 (Currently using 64-bit executable)
PS C:\Users\Administrator> node -v
v22.22.1
PS C:\Users\Administrator> H:
PS H:\> cd .\openclaw\
PS H:\openclaw> cd .\openclaw\
PS H:\openclaw\openclaw> pnpm install
pnpm : 无法将"pnpm"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确
,然后再试一次。
所在位置 行:1 字符: 1
+ pnpm install
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (pnpm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS H:\openclaw\openclaw> npm install -g pnpm

added 1 package in 5s
PS H:\openclaw\openclaw> pnpm install
Scope: all 37 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +1231
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading openclaw@2026.3.2: 26.48 MB/26.48 MB, done
Downloading @lydell/node-pty-win32-x64@1.2.0-beta.3: 7.30 MB/7.30 MB, done
Downloading koffi@2.15.1: 18.25 MB/18.25 MB, done
Downloading @napi-rs/canvas-win32-x64-msvc@0.1.95: 15.75 MB/15.75 MB, done
Downloading @img/sharp-win32-x64@0.34.5: 8.69 MB/8.69 MB, done
Downloading @wasm-audio-decoders/opus-ml@0.0.2: 6.39 MB/6.39 MB, done
Downloading ogg-opus-decoder@1.7.3: 6.87 MB/6.87 MB, done
Downloading node-llama-cpp@3.16.2: 28.41 MB/28.41 MB, done
Downloading @node-llama-cpp/win-x64@3.16.2: 7.07 MB/7.07 MB, done
Downloading pdfjs-dist@5.5.207: 10.31 MB/10.31 MB, done
Downloading @lancedb/lancedb-win32-x64-msvc@0.26.2: 50.24 MB/50.24 MB, done
 WARN  Tarball download average speed 33 KiB/s (size 196 KiB) is below 50 KiB/s: https://codeload.github.com/tloncorp/api-beta/tar.gz/7eede1c1a756977b09f96aa14a92e2b06318ae87 (GET)
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: H:\.pnpm-store\v10
  Virtual store is at:             node_modules/.pnpm
../../.pnpm-store/v10/tmp/_tmp_6236_bce4956f82322931be13910ce72061e0 [@tloncorp/api@0.0.2]: Running npm-install script..../../.pnpm-store/v10/tmp/_tmp_6236_bce4956f82322931be13910ce72061e0 [@tloncorp/api@0.0.2]: Running npm-install script, done in 4m 21.6sescript/native-preview-win32-x64@7.0.0-dev.20260307.1: 9.72 MB/9.72 MB, done
Downloading @rolldown/binding-win32-x64-msvc@1.0.0-rc.7: 8.48 MB/8.48 MB, done
Downloading @oxlint-tsgolint/win32-x64@0.16.0: 12.52 MB/12.52 MB, done
Progress: resolved 1231, reused 0, downloaded 1225, added 1228, done
node_modules/.pnpm/protobufjs@7.5.4/node_modules/protobufjs: Running postinstall script, done in 220ms
node_modules/.pnpm/koffi@2.15.1/node_modules/koffi: Running install script...
node_modules/.pnpm/koffi@2.15.1/node_modules/koffi: Running install script, done in 515ms
node_modules/.pnpm/esbuild@0.27.3/node_modules/esbuild: Running postinstall script, done in 889ms259ms
node_modules/.pnpm/sharp@0.34.5/node_modules/sharp: Running install script, done in 270ms
node_modules/.pnpm/node-llama-cpp@3.16.2_typescript@5.9.3/node_modules/node-llama-cpp: Running postinstall script...
node_modules/.pnpm/node-llama-cpp@3.16.2_typescript@5.9.3/node_modules/node-llama-cpp: Running postinstall script, done node_modules/.pnpm/@matrix-org+matrix-sdk-crypto-nodejs@0.4.0/node_modules/@matrix-org/matrix-sdk-crypto-nodejs: Running postinstall script, done in 10m 30.4s
node_modules/.pnpm/@whiskeysockets+baileys@7.0_f116e6060e428c73be68680ef2311927/node_modules/@whiskeysockets/baileys: Runode_modules/.pnpm/@whiskeysockets+baileys@7.0_f116e6060e428c73be68680ef2311927/node_modules/@whiskeysockets/baileys: Running preinstall script, done in 140ms

dependencies:
+ @agentclientprotocol/sdk 0.15.0
+ @aws-sdk/client-bedrock 3.1004.0
+ @buape/carbon 0.0.0-beta-20260216184201
+ @clack/prompts 1.1.0
+ @discordjs/voice 0.19.0
+ @grammyjs/runner 2.0.3
+ @grammyjs/transformer-throttler 1.2.1
+ @homebridge/ciao 1.3.5
+ @larksuiteoapi/node-sdk 1.59.0
+ @line/bot-sdk 10.6.0
+ @lydell/node-pty 1.2.0-beta.3
+ @mariozechner/pi-agent-core 0.55.3
+ @mariozechner/pi-ai 0.55.3
+ @mariozechner/pi-coding-agent 0.55.3
+ @mariozechner/pi-tui 0.55.3
+ @mozilla/readability 0.6.0
+ @napi-rs/canvas 0.1.95
+ @sinclair/typebox 0.34.48
+ @slack/bolt 4.6.0
+ @slack/web-api 7.14.1
+ @whiskeysockets/baileys 7.0.0-rc.9
+ ajv 8.18.0
+ chalk 5.6.2
+ chokidar 5.0.0
+ cli-highlight 2.1.11
+ commander 14.0.3
+ croner 10.0.1
+ discord-api-types 0.38.41
+ dotenv 17.3.1
+ express 5.2.1
+ file-type 21.3.0
+ grammy 1.41.1
+ https-proxy-agent 7.0.6
+ ipaddr.js 2.3.0
+ jiti 2.6.1
+ json5 2.2.3
+ jszip 3.10.1
+ linkedom 0.18.12
+ long 5.3.2
+ markdown-it 14.1.1
+ node-edge-tts 1.2.10
+ node-llama-cpp 3.16.2
+ opusscript 0.1.1
+ osc-progress 0.3.0
+ pdfjs-dist 5.5.207
+ playwright-core 1.58.2
+ qrcode-terminal 0.12.0
+ sharp 0.34.5
+ sqlite-vec 0.1.7-alpha.2
+ tar 7.5.10
+ tslog 4.10.2
+ undici 7.22.0
+ ws 8.19.0
+ yaml 2.8.2
+ zod 4.3.6

devDependencies:
+ @grammyjs/types 3.25.0
+ @lit-labs/signals 0.2.0
+ @lit/context 1.1.6
+ @types/express 5.0.6
+ @types/markdown-it 14.1.2
+ @types/node 25.3.5
+ @types/qrcode-terminal 0.12.2
+ @types/ws 8.18.1
+ @typescript/native-preview 7.0.0-dev.20260307.1
+ @vitest/coverage-v8 4.0.18
+ jscpd 4.0.8
+ lit 3.3.2
+ oxfmt 0.36.0
+ oxlint 1.51.0
+ oxlint-tsgolint 0.16.0
+ signal-utils 0.21.1
+ tsdown 0.21.0
+ tsx 4.21.0
+ typescript 5.9.3
+ vitest 4.0.18

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: @discordjs/opus, @tloncorp/tlon-skill.                            │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

. prepare$ command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.h...
│ ϵͳ�Ҳ���ָ����·����
└─ Done in 53ms
Done in 19m 56.8s using pnpm v10.23.0

2:编译

复制代码
Administrator@WIN-20260306MXX MINGW64 /h/openclaw/openclaw (master)
$ pnpm ui:build

> openclaw@2026.3.8 ui:build H:\openclaw\openclaw
> node scripts/ui.js build


> openclaw-control-ui@ build H:\openclaw\openclaw\ui
> vite build

vite v7.3.1 building client environment for production...
✓ 185 modules transformed.
../dist/control-ui/index.html                   0.69 kB │ gzip:   0.37 kB
../dist/control-ui/assets/index-E0j6Tkrc.css   94.25 kB │ gzip:  16.32 kB
../dist/control-ui/assets/zh-TW-cW5xB87I.js     3.69 kB │ gzip:   2.22 kB │ map:
     6.16 kB
../dist/control-ui/assets/pt-BR-D2dJb9G8.js     4.16 kB │ gzip:   2.03 kB │ map:
     6.69 kB
../dist/control-ui/assets/de-DuUYLvt1.js        4.31 kB │ gzip:   2.11 kB │ map:
     6.87 kB
../dist/control-ui/assets/zh-CN-BgJ8_lE3.js     9.94 kB │ gzip:   4.85 kB │ map:
    16.78 kB
../dist/control-ui/assets/es-DHtyqUQZ.js       11.92 kB │ gzip:   4.79 kB │ map:
    19.06 kB
../dist/control-ui/assets/index-wxM3V0HM.js   657.64 kB │ gzip: 166.77 kB │ map:
 1,847.57 kB
✓ built in 2.82s

Administrator@WIN-20260306MXX MINGW64 /h/openclaw/openclaw (master)

$ pnpm build

> openclaw@2026.3.8 build H:\openclaw\openclaw
> pnpm canvas:a2ui:bundle && node scripts/tsdown-build.mjs && node scripts/copy-
plugin-sdk-root-alias.mjs && pnpm build:plugin-sdk:dts && node --import tsx scri
pts/write-plugin-sdk-entry-dts.ts && node --import tsx scripts/canvas-a2ui-copy.
ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scrip
ts/copy-export-html-templates.ts && node --import tsx scripts/write-build-info.t
s && node --import tsx scripts/write-cli-startup-metadata.ts && node --import ts
x scripts/write-cli-compat.ts


> openclaw@2026.3.8 canvas:a2ui:bundle H:\openclaw\openclaw
> bash scripts/bundle-a2ui.sh

<DIR>/a2ui.bundle.js  chunk │ size: 457.10 kB

√ rolldown v1.0.0-rc.8 Finished in 93.45 ms

> openclaw@2026.3.8 build:plugin-sdk:dts H:\openclaw\openclaw
> tsc -p tsconfig.plugin-sdk.dts.json

[copy-hook-metadata] Copied 4 hook metadata files.
[copy-export-html-templates] Copied 5 export-html assets.

Administrator@WIN-20260306MXX MINGW64 /h/openclaw/openclaw (master)
相关推荐
跳动的世界线3 小时前
OpenClaw小龙虾 通过腾讯云部署方案实现
云计算·腾讯云·openclaw·open claw·小龙虾
lihua555553 小时前
OpenClaw安装与使用(Windows11)
openclaw
安逸sgr3 小时前
16-OpenClaw数据分析与可视化
人工智能·数据挖掘·数据分析·大模型·aigc·agent·openclaw
telllong4 小时前
OpenClaw 完全指南:多渠道 AI Agent 网关
人工智能·agent·openclaw
小码农叔叔4 小时前
【AI智能体】腾讯云服务器部署OpenClaw对接飞书实战详解
openclaw·openclaw部署·openclaw搭建·服务器搭建openclaw·openclaw配置飞书
●VON4 小时前
OpenClaw 技能扩展实战指南:从安装 Skills 到 Tavily 联网 + 多维表格自动化
运维·自动化·开发·openclaw·龙虾
nix.gnehc4 小时前
OpenClaw WebSocket Channel开发实战:从零打造自定义 AI 通信通道
ai·channel·openclaw
默 语4 小时前
OpenClaw龙虾图鉴:16只AI Agent选型指南
人工智能·openclaw
查查君的手记1 天前
【OpenClaw】博查搜索 Skill 正式上线|中文联网搜索底座,本地部署更稳更快
openclaw·博查搜索·clawhub·bocha