Package Exports
- openclawapi
- openclawapi/bin/openclawapi.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openclawapi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
openclawapi - AI 模型配置
配置 OpenClaw 连接 AI 模型(Claude、GPT 等),一条命令搞定。
快速开始
方式一:交互式(推荐新手)
npx openclawapi@latest按提示选择节点和模型即可。
方式二:一键配置 Claude
# macOS/Linux
OPENCLAW_CLAUDE_KEY="你的Key" npx openclawapi@latest preset-claude
# Windows PowerShell
$env:OPENCLAW_CLAUDE_KEY="你的Key"; npx openclawapi@latest preset-claude
# Windows CMD
set OPENCLAW_CLAUDE_KEY=你的Key && npx openclawapi@latest preset-claude方式三:一键配置 Codex
# macOS/Linux
OPENCLAW_CODEX_KEY="你的Key" npx openclawapi@latest preset-codex
# Windows PowerShell
$env:OPENCLAW_CODEX_KEY="你的Key"; npx openclawapi@latest preset-codex
# Windows CMD
set OPENCLAW_CODEX_KEY=你的Key && npx openclawapi@latest preset-codex方式四:完全自动化(无交互)
# macOS/Linux
OPENCLAW_CLAUDE_KEY="你的Key" npx openclawapi@latest preset-claude --model claude-opus-4-5 --set-primary true --force --test true
# Windows PowerShell
$env:OPENCLAW_CLAUDE_KEY="你的Key"; npx openclawapi@latest preset-claude --model claude-opus-4-5 --set-primary true --force --test true
# Windows CMD
set OPENCLAW_CLAUDE_KEY=你的Key && npx openclawapi@latest preset-claude --model claude-opus-4-5 --set-primary true --force --test true
# macOS/Linux
OPENCLAW_CODEX_KEY="你的Key" npx openclawapi@latest preset-codex --model gpt-5.2 --set-primary true --force --test true
# Windows PowerShell
$env:OPENCLAW_CODEX_KEY="你的Key"; npx openclawapi@latest preset-codex --model gpt-5.2 --set-primary true --force --test true
# Windows CMD
set OPENCLAW_CODEX_KEY=你的Key && npx openclawapi@latest preset-codex --model gpt-5.2 --set-primary true --force --test true配置入口(无需记忆)
节点/模型/API 类型配置在:
Service/OpenClawApi/config/API节点设置.md
CLI 会自动读取该文件内的 JSON5 配置块。只需修改这个文件即可。
如需自定义路径,可设置:
OPENCLAW_PRESET_PATH=/path/to/你的配置.md
文档入口
更详细说明在:
Service/OpenClawApi/docs/README.md