package main

import (
	"os"

	"tercul/cmd/cli/commands"

	"github.com/spf13/cobra"
)

func main() {
	rootCmd := &cobra.Command{
		Use:   "tercul",
		Short: "Tercul CLI - Command-line tools for the Tercul backend",
		Long: `Tercul CLI provides various command-line tools for managing and operating
the Tercul backend, including data migration, indexing, and maintenance tasks.`,
	}

	// Add subcommands
	rootCmd.AddCommand(commands.NewServeCommand())
	rootCmd.AddCommand(commands.NewWorkerCommand())
	rootCmd.AddCommand(commands.NewEnrichCommand())
	rootCmd.AddCommand(commands.NewBleveMigrateCommand())

	if err := rootCmd.Execute(); err != nil {
		os.Exit(1)
	}
}
