openclaw和claude code的配置文件参考

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"
}
相关推荐
感谢地心引力3 天前
我用 Doubao-Seed-2.1-pro 做了一个深度融入 AI 功能的本地知识库软件
ai·开源·seed·markdown·豆包
阿昌喜欢吃黄桃3 天前
提示词工程:User Prompt 与 System Prompt
ai·prompt·提示词·提示词工程
AI产品测评官3 天前
海内外AI招聘工具分赛道横向对比:五大品类的技术路线与选型参考
人工智能·ai·求职招聘
俊哥V3 天前
每日 AI 研究简报 · 2026-09-21
人工智能·ai
omenkk73 天前
上下文工程:优化系统提示词,利用 KV Cache 降低 Token 成本
ai
代码方舟3 天前
零信任架构实战:基于天远手机在网状态V即时版构建自动化通信分发网关
人工智能·ai·工具分享
鸽芷咕3 天前
Claude Code 报 429 “Rate limit reached“?先分清是限速还是额度用完,对症下药
人工智能·报错解决·编程工具·claude code
MicrosoftReactor3 天前
技术速递|GitHub Copilot App 入门指南:使用 Diff、终端和浏览器
ai·copilot·agent
TechEdu2026063 天前
[人工智能]人工智能时代的零日漏洞与零日攻击
人工智能·网络安全·ai·信息安全