修改git过滤文件

This commit is contained in:
zyj
2026-03-04 10:14:12 +08:00
parent a9f9330744
commit 89d64cb117
12 changed files with 570 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
package commands
import (
"fmt"
"github.com/spf13/cobra"
)
func newInitCmd() *cobra.Command {
var (
profile string
template string
force bool
)
cmd := &cobra.Command{
Use: "init",
Short: "初始化 DevPack 配置",
Long: `初始化 DevPack创建配置目录和默认配置文件。`,
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("🚀 Initializing DevPack...")
// TODO: Implement init logic
// 1. Create ~/.devpack/ directory
// 2. Create config.yaml
// 3. Create profiles/ directory
// 4. Create packs/ directory
// 5. Create logs/ directory
fmt.Println("✅ DevPack initialized successfully!")
fmt.Println("\nRun 'devpack scan' to scan your current environment.")
return nil
},
}
cmd.Flags().StringVarP(&profile, "profile", "p", "", "创建并使用指定名称的 Profile")
cmd.Flags().StringVarP(&template, "template", "t", "standard", "使用预设模板 (minimal|standard|full)")
cmd.Flags().BoolVar(&force, "force", false, "覆盖已有配置")
return cmd
}