package cli import ( "github.com/claudomator/claudomator/internal/config" "github.com/spf13/cobra" ) var ( cfgFile string verbose bool cfg *config.Config ) func NewRootCmd() *cobra.Command { cfg = config.Default() cmd := &cobra.Command{ Use: "claudomator", Short: "Automation toolkit for Claude Code", Long: "Claudomator captures tasks, dispatches them to Claude Code, and reports results.", } cmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default $HOME/.claudomator/config.toml)") cmd.PersistentFlags().StringVar(&cfg.DataDir, "data-dir", cfg.DataDir, "data directory") cmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output") cmd.AddCommand( newRunCmd(), newServeCmd(), newListCmd(), newStatusCmd(), newInitCmd(), ) return cmd } func Execute() error { return NewRootCmd().Execute() }