package main import ( "fmt" "github.com/spf13/cobra" ) var ( // Version information, set via ldflags during build version = "dev" buildDate = "unknown" ) var rootCmd = &cobra.Command{ Use: "relspec", Short: "RelSpec - Database schema conversion and analysis tool", Long: `RelSpec is a database relations specification tool that provides bidirectional conversion between various database schema formats. It reads database schemas from multiple sources (live databases, DBML, DCTX, DrawDB, etc.) and writes them to various formats (GORM, Bun, JSON, YAML, SQL, etc.).`, PersistentPreRun: func(cmd *cobra.Command, args []string) { fmt.Printf("RelSpec %s (built: %s)\n\n", version, buildDate) }, } func init() { rootCmd.AddCommand(convertCmd) rootCmd.AddCommand(diffCmd) rootCmd.AddCommand(inspectCmd) rootCmd.AddCommand(scriptsCmd) rootCmd.AddCommand(templCmd) rootCmd.AddCommand(editCmd) rootCmd.AddCommand(mergeCmd) rootCmd.AddCommand(splitCmd) rootCmd.AddCommand(versionCmd) }