cli/cmd/core.go

49 lines
1.5 KiB
Go
Raw Normal View History

// Package cmd implements the core CLI application.
//
// The CLI provides commands for:
// - Multi-repo development workflows (dev)
// - AI agent task management (ai)
// - Go and PHP development tools (go, php)
// - Build and release automation (build, ci)
// - SDK validation and API compatibility (sdk)
// - Package and environment management (pkg, vm)
// - Documentation and testing (docs, test)
// - Environment health checks (doctor)
// - Repository setup and cloning (setup)
//
// Two build variants exist:
// - Default build: Full development toolset
// - CI build (-tags ci): Minimal release toolset
2025-10-27 05:07:22 +00:00
package cmd
import (
"github.com/charmbracelet/lipgloss"
"github.com/leaanthony/clir"
2025-10-27 05:07:22 +00:00
)
// Terminal styles using Tailwind color palette.
2025-10-27 05:07:22 +00:00
var (
// coreStyle is used for primary headings and the CLI name.
2025-10-27 05:07:22 +00:00
coreStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#3b82f6")). // blue-500
2025-10-27 05:07:22 +00:00
Bold(true)
// subPkgStyle is used for subcommand names and secondary headings.
2025-10-27 05:07:22 +00:00
subPkgStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#e2e8f0")). // gray-200
2025-10-27 05:07:22 +00:00
Bold(true)
// linkStyle is used for URLs and clickable references.
2025-10-27 05:07:22 +00:00
linkStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#3b82f6")). // blue-500
2025-10-27 05:07:22 +00:00
Underline(true)
)
// Execute initialises and runs the CLI application.
// Commands are registered based on build tags (see core_ci.go and core_dev.go).
func Execute() error {
app := clir.NewCli("core", "CLI tool for development and production", "0.1.0")
registerCommands(app)
return app.Run()
2025-10-27 05:07:22 +00:00
}