> ## Documentation Index
> Fetch the complete documentation index at: https://labs.prompthon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw Mac 设置

> 在 OpenClaw onboarding 之前准备 Node 22、npm、Codex 和模型默认值。

<div className="not-prose my-4 rounded-md border border-gray-200 bg-gray-50 p-2 text-sm dark:border-gray-800 dark:bg-gray-900/40">
  <div className="mb-2 px-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">需要帮助？</div>

  <div className="flex flex-wrap gap-2">
    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://discord.gg/sDE2HhGTg4" target="_blank" rel="noreferrer">
      <Icon icon="discord" iconType="brands" size={14} />

      <span>在 Discord 提问</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/issues/new/choose" target="_blank" rel="noreferrer">
      <Icon icon="github" iconType="brands" size={14} />

      <span>提交 GitHub Issue</span>
    </a>

    <a className="inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 no-underline shadow-sm hover:border-gray-300 hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950/60 dark:text-gray-200 dark:hover:bg-gray-900" href="https://github.com/Prompthon-IO/agent-systems-handbook/blob/main/zh-Hans/SUPPORT.md" target="_blank" rel="noreferrer">
      <Icon icon="life-ring" size={14} />

      <span>支持指南</span>
    </a>
  </div>
</div>

这条设置路线面向从本地 terminal 运行 OpenClaw 的 macOS 用户。

## 安装 Node 和 NVM

可以从 [nodejs.org](https://nodejs.org/en) 下载 Node，也可以通过 `nvm` 安装。

使用 `nvm` 时运行：

```bash theme={null}
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.zshrc
nvm install 22
nvm use 22
nvm alias default 22
```

检查 Node 和 npm：

```bash theme={null}
node -v
npm -v
```

## 安装 Codex

全局安装 Codex：

```bash theme={null}
npm i -g @openai/codex
```

登录并检查 CLI 是否可用：

```bash theme={null}
codex login
codex --version
```

## 设置 OpenClaw 默认模型

如果你的机器已经安装 OpenClaw，可以设置工作坊 profile 使用的模型：

```bash theme={null}
openclaw models set openai-codex/gpt-5.5
```

如果还没有安装 OpenClaw，请先继续到 [账号与 Onboarding](/zh-Hans/workshops/openclaw/accounts-and-onboarding)，在那里安装 OpenClaw，然后按需回到这里设置模型。
