Replace leaanthony/clir with spf13/cobra across all command packages. This provides better subcommand handling, built-in shell completion, and a more widely-used CLI framework. Changes: - Update cmd/core.go with cobra root command and completion support - Convert all subcommand packages to use *cobra.Command - Use init() functions for flag registration instead of inline setup - Maintain all existing functionality and flag behaviors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
63 lines
1.6 KiB
Go
63 lines
1.6 KiB
Go
//go:build !ci
|
|
|
|
// core_dev.go registers commands for the full development binary.
|
|
//
|
|
// Build with: go build (default)
|
|
//
|
|
// This is the default build variant with all development tools:
|
|
// - dev: Multi-repo git workflows (commit, push, pull, sync)
|
|
// - ai: AI agent task management
|
|
// - go: Go module and build tools
|
|
// - php: Laravel/Composer development tools
|
|
// - build: Cross-platform compilation
|
|
// - ci: Release publishing
|
|
// - sdk: API compatibility checks
|
|
// - pkg: Package management
|
|
// - vm: LinuxKit VM management
|
|
// - docs: Documentation generation
|
|
// - setup: Repository cloning and setup
|
|
// - doctor: Environment health checks
|
|
// - test: Test runner with coverage
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/host-uk/core/cmd/ai"
|
|
"github.com/host-uk/core/cmd/build"
|
|
"github.com/host-uk/core/cmd/ci"
|
|
"github.com/host-uk/core/cmd/dev"
|
|
"github.com/host-uk/core/cmd/docs"
|
|
"github.com/host-uk/core/cmd/doctor"
|
|
gocmd "github.com/host-uk/core/cmd/go"
|
|
"github.com/host-uk/core/cmd/php"
|
|
"github.com/host-uk/core/cmd/pkg"
|
|
"github.com/host-uk/core/cmd/sdk"
|
|
"github.com/host-uk/core/cmd/setup"
|
|
testcmd "github.com/host-uk/core/cmd/test"
|
|
"github.com/host-uk/core/cmd/vm"
|
|
)
|
|
|
|
func init() {
|
|
// Multi-repo workflow
|
|
dev.AddCommands(rootCmd)
|
|
|
|
// AI agent tools
|
|
ai.AddCommands(rootCmd)
|
|
|
|
// Language tooling
|
|
gocmd.AddCommands(rootCmd)
|
|
php.AddCommands(rootCmd)
|
|
|
|
// Build and release
|
|
build.AddCommands(rootCmd)
|
|
ci.AddCommands(rootCmd)
|
|
sdk.AddCommands(rootCmd)
|
|
|
|
// Environment management
|
|
pkg.AddCommands(rootCmd)
|
|
vm.AddCommands(rootCmd)
|
|
docs.AddCommands(rootCmd)
|
|
setup.AddCommands(rootCmd)
|
|
doctor.AddCommands(rootCmd)
|
|
testcmd.AddCommands(rootCmd)
|
|
}
|