// Package ipapi provides the main application structure and CLI.
package ipapi

import (
	"os"

	"github.com/spf13/cobra"
)

// CLIEntry is the main entry point for the CLI application.
func CLIEntry() {
	rootCmd := &cobra.Command{
		Use:   "ipapi",
		Short: "IP API is a simple IP information REST API",
		Long:  `IP API provides GeoIP information for IPv4 and IPv6 addresses.`,
	}

	rootCmd.AddCommand(daemonCmd())

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