1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package cli
import (
"github.com/thepeterstone/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(),
newLogsCmd(),
)
return cmd
}
func Execute() error {
return NewRootCmd().Execute()
}
|