-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
35 lines (28 loc) · 830 Bytes
/
main.go
File metadata and controls
35 lines (28 loc) · 830 Bytes
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
package main
import (
"fmt"
"os"
"github.com/Majorfi/smartgit/cmd"
"github.com/spf13/cobra"
)
var version = "dev"
func main() {
rootCmd := &cobra.Command{
Use: "sg",
Short: "SmartGit — AI-powered git workflow CLI",
Long: "SmartGit augments your git workflow with AI-generated commit messages, branch names, and PR descriptions.",
SilenceUsage: true,
}
rootCmd.Version = version
rootCmd.SetVersionTemplate(fmt.Sprintf("sg version %s\n", version))
rootCmd.AddCommand(cmd.NewCommitCmd())
rootCmd.AddCommand(cmd.NewStartCmd())
rootCmd.AddCommand(cmd.NewStatusCmd())
rootCmd.AddCommand(cmd.NewInitCmd())
rootCmd.AddCommand(cmd.NewPRCmd())
rootCmd.AddCommand(cmd.NewDoctorCmd())
rootCmd.AddCommand(cmd.NewInstallCmd())
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}