@lambertkeith/spec-go 0.2.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -0
- package/dist/{index.js → cli/index.js} +800 -385
- package/dist/cli/index.js.map +1 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +591 -0
- package/dist/mcp/index.js.map +1 -0
- package/package.json +8 -4
- package/dist/index.js.map +0 -1
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
快速创建项目并自动初始化 GitHub 仓库的 CLI 脚手架工具。
|
|
4
4
|
|
|
5
|
+
**✨ 新功能**: 现在支持 MCP Server,可通过 Claude Code 直接调用!
|
|
6
|
+
|
|
5
7
|
## 快速开始
|
|
6
8
|
|
|
9
|
+
### CLI 使用
|
|
10
|
+
|
|
7
11
|
```bash
|
|
8
12
|
# 使用 npx (推荐)
|
|
9
13
|
npx @lambertkeith/spec-go my-app
|
|
@@ -13,6 +17,17 @@ npm install -g @lambertkeith/spec-go
|
|
|
13
17
|
spec-go my-app
|
|
14
18
|
```
|
|
15
19
|
|
|
20
|
+
### MCP Server 使用
|
|
21
|
+
|
|
22
|
+
通过 Claude Code 使用自然语言创建项目:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
"帮我创建一个 React TypeScript 项目"
|
|
26
|
+
"列出所有可用的项目模板"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
📖 **完整 MCP 使用指南**: 查看 [MCP_GUIDE.md](./MCP_GUIDE.md)
|
|
30
|
+
|
|
16
31
|
## 用法
|
|
17
32
|
|
|
18
33
|
### 交互式创建
|
|
@@ -158,6 +173,51 @@ my-app/
|
|
|
158
173
|
- uv (Python 模板)
|
|
159
174
|
- Maven (Spring Boot 模板)
|
|
160
175
|
|
|
176
|
+
## 功能特性
|
|
177
|
+
|
|
178
|
+
- 🚀 **14 个精选模板**: 涵盖 Node.js、React、Vue、Python、Java 等主流技术栈
|
|
179
|
+
- 🎯 **交互式 CLI**: 友好的命令行交互体验
|
|
180
|
+
- 🤖 **MCP Server**: 通过 Claude Code 使用自然语言创建项目
|
|
181
|
+
- 🔧 **GitHub 集成**: 一键创建仓库并推送代码
|
|
182
|
+
- 📦 **自动依赖安装**: 支持 pnpm、npm、yarn、uv、Maven
|
|
183
|
+
- 🎨 **模板变量替换**: 自动替换项目名称等变量
|
|
184
|
+
- 🔄 **Workspace 支持**: 前后端分离项目使用 monorepo 结构
|
|
185
|
+
|
|
186
|
+
## MCP Server
|
|
187
|
+
|
|
188
|
+
spec-go 提供 MCP Server,让你可以通过 Claude Code 使用自然语言来创建项目。
|
|
189
|
+
|
|
190
|
+
### 快速配置
|
|
191
|
+
|
|
192
|
+
1. 构建项目:
|
|
193
|
+
```bash
|
|
194
|
+
pnpm build
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
2. 配置 Claude Code (`~/.claude/settings.json`):
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"mcpServers": {
|
|
201
|
+
"spec-go": {
|
|
202
|
+
"command": "node",
|
|
203
|
+
"args": ["/path/to/create-idp/dist/mcp/index.js"]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
3. 重启 Claude Code
|
|
210
|
+
|
|
211
|
+
### 可用工具
|
|
212
|
+
|
|
213
|
+
- `create_project` - 使用模板创建新项目
|
|
214
|
+
- `list_templates` - 列出所有可用模板
|
|
215
|
+
- `validate_project_name` - 验证项目名称
|
|
216
|
+
- `init_git_repo` - 初始化 Git 仓库
|
|
217
|
+
- `create_github_repo` - 创建 GitHub 仓库并推送
|
|
218
|
+
|
|
219
|
+
📖 **详细文档**: [MCP_GUIDE.md](./MCP_GUIDE.md)
|
|
220
|
+
|
|
161
221
|
## 许可证
|
|
162
222
|
|
|
163
223
|
MIT
|