2025-10-27 05:07:22 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/charmbracelet/lipgloss"
|
2025-10-28 12:06:05 +00:00
|
|
|
"github.com/leaanthony/clir"
|
2025-10-27 05:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Define some global lipgloss styles for a Tailwind dark theme
|
|
|
|
|
var (
|
|
|
|
|
coreStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#3b82f6")). // Tailwind blue-500
|
|
|
|
|
Bold(true)
|
|
|
|
|
|
|
|
|
|
subPkgStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#e2e8f0")). // Tailwind gray-200
|
|
|
|
|
Bold(true)
|
|
|
|
|
|
|
|
|
|
linkStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#3b82f6")). // Tailwind blue-500
|
|
|
|
|
Underline(true)
|
|
|
|
|
)
|
|
|
|
|
|
2025-10-28 12:06:05 +00:00
|
|
|
// Execute creates the root CLI application and runs it.
|
|
|
|
|
func Execute() error {
|
2026-01-29 18:15:22 +00:00
|
|
|
app := clir.NewCli("core", "CLI tool for development and production", "0.1.0")
|
2025-10-27 05:07:22 +00:00
|
|
|
|
2026-01-29 12:35:27 +00:00
|
|
|
// Register commands based on build tags
|
|
|
|
|
registerCommands(app)
|
2025-10-27 05:07:22 +00:00
|
|
|
|
2026-01-29 11:28:58 +00:00
|
|
|
return app.Run()
|
2025-10-27 05:07:22 +00:00
|
|
|
}
|