安装 OpenClaw CLI
使用 npm install -g openclaw@latest 全局安装,或使用主页提供的单行 curl 安装脚本
安装 OpenClaw CLI 是 CoddyKit 上的免费 OpenClaw Academy 课时。 这是第 2 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 OpenClaw Academy 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 OpenClaw Academy 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
Time to Install
With your prerequisites ready, installing OpenClaw is one short step. The install puts the openclaw command on your machine so you can run it from anywhere.
The npm Way
The standard method uses npm, which comes bundled with Node. It downloads OpenClaw from the npm registry and sets it up for you.
Install Globally
Run this command to install OpenClaw. The -g flag installs it globally, so the openclaw command works from any folder.
npm install -g openclaw@latestWhat @latest Means
The @latest tag tells npm to grab the newest published release. You always start on the current version instead of an old cached one.
The One-Line Script
Prefer not to use npm directly? The homepage offers a curl install script that does the setup for you in a single line.
curl -fsSL https://openclaw.ai/install.sh | bashReading the curl Flags
In that one-liner, -fsSL makes curl fail quietly on errors and follow redirects, then bash runs the downloaded script. Both methods reach the same place.
npm or curl
Either path works, so pick what fits you. The choice is just preference: npm if you manage Node packages, curl for a quick hands-off setup.
Why Install Once, Run Anywhere
A global install registers a single openclaw command. From then on you type openclaw in any terminal without reinstalling per project.
Confirm It Landed
After installing, check that the command exists. Running openclaw --version prints the installed version and proves the install worked.
openclaw --versionIf the Command Is Missing
If your shell cannot find openclaw, the global npm bin folder may not be on your PATH. Reopening the terminal often picks up the new command.
Installed, Not Configured Yet
Installing only places the tool on disk. The next stage, onboarding, is where you actually wire up the daemon and your channels.
Quick Check
Which command installs OpenClaw globally via npm?
Recap
You can now install OpenClaw two ways: npm install -g openclaw@latest or the curl one-liner. A quick --version check confirms it is ready to onboard. ⚙️
常见问题解答
「安装 OpenClaw CLI」课时是免费的吗?
是的 — 「安装 OpenClaw CLI」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 OpenClaw Academy 课程的其余内容,请升级到 CoddyKit PRO。 OpenClaw Academy 课程共包含 4 节课。
「安装 OpenClaw CLI」这节课中我会学到什么?
使用 npm install -g openclaw@latest 全局安装,或使用主页提供的单行 curl 安装脚本 你通过在浏览器中直接运行的动手代码来练习 OpenClaw Academy,全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 OpenClaw Academy 需要有经验吗?
无需任何先前经验。CoddyKit 上的 OpenClaw Academy 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 2 节课,共 4 节。
「安装 OpenClaw CLI」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 OpenClaw Academy 课中编写并运行代码吗?
能。每节 OpenClaw Academy 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。