create-openclaw-plugin
v0.1.2
Published
Scaffold a new OpenClaw plugin in seconds. One command to generate a complete plugin project with TypeScript, tsup, and all required config files.
Maintainers
Readme
create-openclaw-plugin
🔌 一行命令创建 OpenClaw Plugin 项目
使用
npx create-openclaw-plugin my-plugin自动生成完整的插件项目结构:
my-plugin/
├── src/index.ts # 插件源码(含示例 Tool)
├── openclaw.plugin.json # 插件清单
├── package.json # npm 包描述
├── tsconfig.json # TypeScript 配置
├── tsup.config.ts # 构建配置
└── README.md # 说明文档生成后
cd my-plugin
npm install
npm run build
openclaw plugins install .
openclaw gateway restart5 步完成从创建到运行!
命名规则
| 输入 | 生成的插件 ID |
|------|-------------|
| my-weather | openclaw-plugin-my-weather |
| openclaw-plugin-weather | openclaw-plugin-weather(已有前缀不重复加)|
| translator | openclaw-plugin-translator |
特性
- ✅ 零配置 — 一行命令,无需手动创建任何文件
- ✅ 三处 ID 自动一致 — package.json / manifest / 代码中的 ID 自动对齐
- ✅ TypeScript + tsup — 开箱即用的构建链
- ✅ CJS 格式 — 兼容 OpenClaw extensions 运行时
- ✅ 含示例 Tool — 生成即可构建运行,改业务逻辑就行
什么是 OpenClaw Plugin
OpenClaw Plugin 让你向 AI Agent 注册自定义 Tool(工具)。Agent 在对话中自动识别意图并调用 Tool,实现:
- 调用外部 API(天气、翻译、内部系统等)
- 接入消息平台
- 精确数据计算
- 操作系统资源
相关文档
License
MIT
