Files
forge/internal/cmd/root.go
zhaoyupeng da6a846550 feat: 许多变化
1. make apps 逻辑大变更, vendor 成标准传入 args
  2. nginx -> app-helper
2026-01-12 20:01:45 +08:00

29 lines
527 B
Go

package cmd
import (
"context"
"github.com/spf13/cobra"
"yizhisec.com/hsv2/forge/internal/opt"
)
var rootCmd = &cobra.Command{
Use: "forge",
Short: "Forge is a tool for building and installing hsv2",
Long: `A tool for managing build and installation workflows for hsv2.`,
}
func Execute(ctx context.Context) error {
return rootCmd.ExecuteContext(ctx)
}
func init() {
rootCmd.PersistentFlags().BoolVar(&opt.Cfg.Debug, "debug", false, "Enable debug mode")
rootCmd.AddCommand(
makeCmd(),
installCmd(),
)
}