agent-spawner by austineral/agent-spawner
npx skills add https://github.com/austineral/agent-spawner --skill agent-spawner通过对话方式部署一个新的 OpenClaw 代理。官方安装,继承当前代理的配置。用户无需编辑任何文件。
cat ~/.openclaw/openclaw.json
cat ~/.openclaw/.env 2>/dev/null
env | grep -iE 'API_KEY|TOKEN'
ls ~/.openclaw/extensions/
ls <workspace>/skills/
识别:
auth.profiles — 可能是 Anthropic、OpenAI、Gemini、自定义等。ANTHROPIC_API_KEY、GEMINI_API_KEY、OPENAI_API_KEY)agents.defaults.modeltools.* 中的任何内容(搜索 API 等)Deploy a new OpenClaw agent conversationally. Official install, carry over config from the current agent. User never edits a file.
cat ~/.openclaw/openclaw.json
cat ~/.openclaw/.env 2>/dev/null
env | grep -iE 'API_KEY|TOKEN'
ls ~/.openclaw/extensions/
ls <workspace>/skills/
Identify:
auth.profiles in config — could be Anthropic, OpenAI, Gemini, custom, etc.ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY)agents.defaults.model广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
plugins.installs — 名称和 npm 规范openclaw skills list 以查看哪些是捆绑的,哪些是仅工作区的。仅继承非捆绑技能。不要询问密钥、插件、技能、端口或配置。继承所有内容,使用默认值。
如果用户提供频道令牌(Telegram 机器人、Discord 机器人等),也一并设置。频道是可选的 — 不要主动询问,但如果提供则接受。
收集答案后,在执行任何操作之前展示完整计划。在一个摘要中显示所有内容:
计划如下:
📦 部署方式:在 <target> 上使用 Docker
📛 名称:<agent-name>
🌐 端口:<port>
从当前代理继承:
✅ 提供商:Anthropic (API 密钥)
✅ 模型:anthropic/claude-sonnet-4-20250514
✅ Brave Search API 密钥
✅ 插件:openclaw-agent-reach
✅ 技能:agent-spawner, weather
✅ 心跳间隔:30m
新代理将在收到第一条消息时引导建立其自身身份。
可以开始了吗?
仅列出实际存在的项目。在继续之前等待明确的确认。如果用户想要更改,进行调整并重新确认。
git clone https://github.com/openclaw/openclaw.git <agent-name>
cd <agent-name>
设置环境变量并运行非交互式引导。匹配步骤 1 中检测到的提供商:
首先检查端口冲突:
docker ps --format '{{.Ports}}' | grep -oP '\d+(?=->)' | sort -n
选择一个未使用的网关端口和桥接端口(按惯例,桥接端口 = 网关端口 + 1)。
export OPENCLAW_IMAGE=alpine/openclaw:latest
export OPENCLAW_CONFIG_DIR=~/.openclaw-<agent-name>
export OPENCLAW_WORKSPACE_DIR=~/.openclaw-<agent-name>/workspace
export OPENCLAW_GATEWAY_PORT=<unused port>
export OPENCLAW_BRIDGE_PORT=<unused port, typically gateway + 1>
export OPENCLAW_GATEWAY_BIND=lan
mkdir -p $OPENCLAW_CONFIG_DIR/workspace
引导标志因提供商而异。 使用匹配的 --auth-choice 和密钥标志:
| 提供商 | --auth-choice | 密钥标志 |
|---|---|---|
| Anthropic | apiKey | --anthropic-api-key |
| Gemini | gemini-api-key | --gemini-api-key |
| OpenAI | apiKey | (设置 OPENAI_API_KEY 环境变量) |
| 自定义 | custom-api-key | --custom-api-key + --custom-base-url + --custom-model-id |
docker compose run --rm openclaw-cli onboard --non-interactive --accept-risk \
--mode local \
--auth-choice <detected> \
--<provider>-api-key "$API_KEY" \
--gateway-port 18789 \
--gateway-bind lan \
--skip-skills
docker compose up -d openclaw-gateway
官方 compose 使用绑定挂载 — 主机用户拥有文件,没有权限问题。
引导时关于网关连接的错误是预期的(尚未运行)。配置已写入。
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
openclaw onboard --non-interactive --accept-risk \
--mode local \
--auth-choice <detected> \
--<provider>-api-key "$API_KEY" \
--gateway-port 18789 \
--gateway-bind lan \
--install-daemon \
--daemon-runtime node \
--skip-skills
CLI 别名:
OC="docker compose exec openclaw-gateway node /app/openclaw.mjs"OC="openclaw"配置(仅修补当前代理实际拥有的内容):
$OC config set agents.defaults.model "<model>"
$OC config set agents.defaults.heartbeat.every "30m"
# 工具密钥 — 仅当它们存在于当前配置中时
$OC config set tools.web.search.apiKey "<key>"
插件(来自当前配置中的 plugins.installs):
$OC plugins install <npm-spec>
# 对每个插件重复此操作
技能(从当前代理复制非捆绑技能):
# Docker — 源技能在你的容器内,使用 docker cp
docker cp <your-container>:/home/node/.openclaw/workspace/skills/ /tmp/skills-transfer/
docker cp /tmp/skills-transfer/ <new-container>:/home/node/.openclaw/workspace/skills/
# 或者,如果远程部署,首先使用 scp 将它们复制到目标主机
# 裸机
cp -r <source-workspace>/skills/ ~/.openclaw/workspace/skills/
重启:
docker compose restart openclaw-gateway # Docker
openclaw gateway restart # 裸机
读取网关令牌:
grep -A1 '"token"' $OPENCLAW_CONFIG_DIR/openclaw.json
告知用户:
http://<host>:<port>/openclaw 不在 PATH 中。使用 node /app/openclaw.mjs。--accept-risk。alpine/openclaw:latest — 预构建的官方镜像。OPENCLAW_CONFIG_DIR、OPENCLAW_GATEWAY_PORT 和 OPENCLAW_BRIDGE_PORT。在部署前检查 docker ps 以查看已使用的端口。~/.openclaw/ 卷中(extensions/ 和 workspace/skills/)。每周安装数
1
仓库
首次出现
1 天前
安全审计
安装于
amp1
cline1
openclaw1
opencode1
cursor1
kimi-cli1
tools.*plugins.installs — names and npm specsopenclaw skills list to see what's bundled vs workspace-only. Only carry over non-bundled skills.Don't ask about keys, plugins, skills, ports, or config. Carry everything over, use defaults.
If the user provides channel tokens (Telegram bot, Discord bot, etc.), set those up too. Channels are optional — don't ask, but accept if offered.
After gathering answers, present the full plan before doing anything. Show everything in one summary:
Here's the plan:
📦 Deploy: Docker on <target>
📛 Name: <agent-name>
🌐 Port: <port>
Carrying over from current agent:
✅ Provider: Anthropic (API key)
✅ Model: anthropic/claude-sonnet-4-20250514
✅ Brave Search API key
✅ Plugins: openclaw-agent-reach
✅ Skills: agent-spawner, weather
✅ Heartbeat: 30m
The new agent will bootstrap its own identity on first message.
Good to go?
Only list items that actually exist. Wait for explicit confirmation before proceeding. If the user wants changes, adjust and re-confirm.
git clone https://github.com/openclaw/openclaw.git <agent-name>
cd <agent-name>
Set env and run non-interactive onboard. Match the provider detected in step 1:
Check for port conflicts first:
docker ps --format '{{.Ports}}' | grep -oP '\d+(?=->)' | sort -n
Pick a gateway port AND bridge port that aren't in use (bridge = gateway + 1 by convention).
export OPENCLAW_IMAGE=alpine/openclaw:latest
export OPENCLAW_CONFIG_DIR=~/.openclaw-<agent-name>
export OPENCLAW_WORKSPACE_DIR=~/.openclaw-<agent-name>/workspace
export OPENCLAW_GATEWAY_PORT=<unused port>
export OPENCLAW_BRIDGE_PORT=<unused port, typically gateway + 1>
export OPENCLAW_GATEWAY_BIND=lan
mkdir -p $OPENCLAW_CONFIG_DIR/workspace
Onboard flags vary by provider. Use the matching --auth-choice and key flag:
| Provider | --auth-choice | Key flag |
|---|---|---|
| Anthropic | apiKey | --anthropic-api-key |
| Gemini | gemini-api-key | --gemini-api-key |
| OpenAI | apiKey | (set OPENAI_API_KEY env) |
| Custom | custom-api-key | --custom-api-key + --custom-base-url + --custom-model-id |
docker compose run --rm openclaw-cli onboard --non-interactive --accept-risk \
--mode local \
--auth-choice <detected> \
--<provider>-api-key "$API_KEY" \
--gateway-port 18789 \
--gateway-bind lan \
--skip-skills
docker compose up -d openclaw-gateway
Official compose uses bind mounts — host user owns files, no permission issues.
Onboard error about gateway connection is expected (not running yet). Config is written.
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
openclaw onboard --non-interactive --accept-risk \
--mode local \
--auth-choice <detected> \
--<provider>-api-key "$API_KEY" \
--gateway-port 18789 \
--gateway-bind lan \
--install-daemon \
--daemon-runtime node \
--skip-skills
CLI alias:
OC="docker compose exec openclaw-gateway node /app/openclaw.mjs"OC="openclaw"Config (only patch what the current agent actually has):
$OC config set agents.defaults.model "<model>"
$OC config set agents.defaults.heartbeat.every "30m"
# Tool keys — only if they exist in current config
$OC config set tools.web.search.apiKey "<key>"
Plugins (from plugins.installs in current config):
$OC plugins install <npm-spec>
# Repeat for each plugin
Skills (copy non-bundled skills from current agent):
# Docker — source skills are inside your container, use docker cp
docker cp <your-container>:/home/node/.openclaw/workspace/skills/ /tmp/skills-transfer/
docker cp /tmp/skills-transfer/ <new-container>:/home/node/.openclaw/workspace/skills/
# Or if deploying remotely, scp them to the target host first
# Bare metal
cp -r <source-workspace>/skills/ ~/.openclaw/workspace/skills/
Restart:
docker compose restart openclaw-gateway # Docker
openclaw gateway restart # bare metal
Read the gateway token:
grep -A1 '"token"' $OPENCLAW_CONFIG_DIR/openclaw.json
Tell the user:
http://<host>:<port>/openclaw not in PATH inside Docker. Use node /app/openclaw.mjs.--accept-risk required for non-interactive onboard.alpine/openclaw:latest — pre-built official image.OPENCLAW_CONFIG_DIR, OPENCLAW_GATEWAY_PORT, AND OPENCLAW_BRIDGE_PORT. Check docker ps for used ports before deploying.~/.openclaw/ volume (extensions/ and workspace/skills/).Weekly Installs
1
Repository
First Seen
1 day ago
Security Audits
Installed on
amp1
cline1
openclaw1
opencode1
cursor1
kimi-cli1
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
117,000 周安装