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"
}
相关推荐
Muscleheng1 小时前
Spring Ai SpringBoot集成DeepSeek
ai·spring ai·deepseek
云边云科技_云网融合1 小时前
零信任安全:数字化时代的企业防护新范式
人工智能·安全·ai
Z-D-K1 小时前
考验AI的“自我“-AI对《红楼梦》后40回的改写(32)
人工智能·ai·aigc·交互·agi
阿洛学长2 小时前
Cursor下载安装使用教程(最新详细图文)
人工智能·gpt·深度学习·ai·ai编程
俊哥V2 小时前
每日 AI 研究简报 · 2026-07-03
人工智能·ai
林澈在路上2 小时前
最新版权清晰 AI音乐写歌工具软件App推荐 商用全场景实测指南
数据库·人工智能·ai·aigc·音频
奇牙coding2 小时前
企业大模型 API 真实账单深度测算:deepseek-v4-pro、gpt-5.4、claude-opus-4.8 成本对比与接入方案(2026)
gpt·ai
程序喵大人3 小时前
【AI专栏】图解Transformer - 第01章:建立直觉
人工智能·深度学习·ai·transformer
Bruce_Liuxiaowei4 小时前
2026年7月第1周网络安全形势周报
人工智能·安全·web安全·ai·智能体