Add comprehensive package-level documentation to all CLI command packages: - cmd/core.go, core_ci.go, core_dev.go: Main CLI entry points - cmd/shared: Lipgloss styles and utility functions - cmd/ai: AI agent task management and Claude integration - cmd/dev: Multi-repo git workflows and GitHub integration - cmd/build, cmd/ci: Build and release automation - cmd/sdk: OpenAPI validation and compatibility - cmd/go: Go development tools with enhanced output - cmd/php: Laravel development, build, and deployment - cmd/docs: Documentation sync across repos - cmd/doctor: Environment validation - cmd/test: Test runner with coverage - cmd/pkg: GitHub package management - cmd/setup: Workspace initialisation - cmd/vm: LinuxKit VM management Each docblock now describes: - Package purpose and commands - Key features and configuration - Package naming notes where relevant (gocmd, testcmd) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.5 KiB
Go
48 lines
1.5 KiB
Go
// 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
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/charmbracelet/lipgloss"
|
|
"github.com/leaanthony/clir"
|
|
)
|
|
|
|
// Terminal styles using Tailwind color palette.
|
|
var (
|
|
// coreStyle is used for primary headings and the CLI name.
|
|
coreStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color("#3b82f6")). // blue-500
|
|
Bold(true)
|
|
|
|
// subPkgStyle is used for subcommand names and secondary headings.
|
|
subPkgStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color("#e2e8f0")). // gray-200
|
|
Bold(true)
|
|
|
|
// linkStyle is used for URLs and clickable references.
|
|
linkStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color("#3b82f6")). // blue-500
|
|
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()
|
|
}
|