mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
- Refactor cmd/api/main.go into 'tercul serve' command - Refactor cmd/worker/main.go into 'tercul worker' command - Refactor cmd/tools/enrich/main.go into 'tercul enrich' command - Add 'tercul bleve-migrate' command for Bleve index migration - Extract common initialization logic into cmd/cli/internal/bootstrap - Update Dockerfile to build unified CLI - Update README with new CLI usage This consolidates all entry points into a single, maintainable CLI structure.
29 lines
666 B
Go
29 lines
666 B
Go
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)
|
|
}
|
|
}
|