feat: 增强命令帮助文档,添加详细说明和示例

This commit is contained in:
Rogee
2025-09-12 10:33:57 +08:00
parent a96df4d628
commit ee15e0932a
17 changed files with 217 additions and 52 deletions

View File

@@ -8,6 +8,14 @@ func CommandInit(root *cobra.Command) {
cmd := &cobra.Command{
Use: "new [project|module]",
Short: "new project/module",
Long: `脚手架命令组:创建项目与常用组件模板。
持久化参数(所有子命令通用):
- --force, -f 覆盖已存在文件/目录
- --dry-run 仅预览渲染与写入,不落盘
- --dir 指定输出基目录(默认 .
子命令project、provider、event、jobmodule 已弃用)`,
}
cmd.PersistentFlags().BoolP("force", "f", false, "Force overwrite existing files or directories")