nodejs安装
官方下载安装:https://nodejs.org/zh-cn/download/
OpenClaw 和 Claude Code 的安装都需要依赖 Node.js 环境。
openclaw的配置文件: ~/.openclaw/openclaw.json
json
{
"models": {
"mode": "merge",
"providers": {
"模型提供者": {
"baseUrl": "你的模型url",
"apiKey": "你的模型skey",
"api": "openai-completions",
"models": [
{
"id": "模型名",
"name": "模型名",
"api": "openai-completions",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 32768,
"compat": {
"maxTokensField": "max_tokens"
}
}
]
}
}
},
"agents": {
"defaults": {
"workspace": "~\.openclaw\\workspace",
"model": {
"primary": "模型提供者/模型名"
},
"thinkingDefault": "off",
"maxConcurrent": 4
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "你的token"
},
"port": 18789,
"bind": "loopback",
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"controlUi": {
"dangerouslyDisableDeviceAuth": true,
"allowInsecureAuth": true,
"allowedOrigins": ["null"]
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send",
"sms.search"
]
}
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "messaging"
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
},
"session-memory": {
"enabled": true
},
"command-logger": {
"enabled": true
},
"bootstrap-extra-files": {
"enabled": true
},
"compaction-notifier": {
"enabled": true
}
}
}
},
"wizard": {
"lastRunAt": "2026-05-22T13:23:18.730Z",
"lastRunVersion": "2026.5.20",
"lastRunCommand": "doctor",
"lastRunMode": "local"
},
"meta": {
"lastTouchedVersion": "2026.5.20",
"lastTouchedAt": "2026-05-22T13:23:20.190Z"
}
}
claude code的配置文件:~/.claude/setting.json
json
{
"env": {
"on_proxy": "127.0.0.1",
"NO_PROXY": "127.0.0.1",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"DISABLE_ERROR_REPORTING": "1",
"DISABLE_NON_EDDENTIAL_MODEL_CALLS": "1",
"DISABLE_TELEMETRY": "1",
"ANTHROPIC_AUTH_TOKEN": "你的模型skey",
"ANTHROPIC_BASE_URL": "你的模型url,需要能支持anthropic的",
"DISABLE_COST_WARNINGS": "1",
"API_TIMEOUT_MS": "600000",
"CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
"CLAUDE_AUTOCMPACT_PCT_OVERRIDE": "25"
},
"availableModels": [
"MiniMax-M2.5"
],
"alwaysThinkingEnabled": false,
"model": "MiniMax-M2.5"
}