refactor(cli): restructure cmd packages into subdirectories
- Move CLI commands into subdirectories matching command hierarchy:
dev/, go/, php/, build/, ci/, sdk/, pkg/, vm/, docs/, setup/, doctor/, test/, ai/
- Create shared/ package for common styles and utilities
- Add new `core ai` root command with claude subcommand
- Update package declarations and imports across all files
- Create commands.go entry points for each package
- Remove GUI-related files (moved to core-gui repo)
This makes the filesystem structure match the CLI command structure,
improving context capture and code organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:02:43 +00:00
|
|
|
// Package gocmd provides Go development commands.
|
|
|
|
|
//
|
|
|
|
|
// Note: Package named gocmd because 'go' is a reserved keyword.
|
|
|
|
|
package gocmd
|
2026-01-29 12:22:01 +00:00
|
|
|
|
|
|
|
|
import (
|
2026-01-30 10:32:05 +00:00
|
|
|
"github.com/host-uk/core/pkg/cli"
|
feat(i18n): add translation keys to all CLI commands
Replace hardcoded strings with i18n.T() calls across all cmd/* packages:
- ai, build, ci, dev, docs, doctor, go, php, pkg, sdk, setup, test, vm
Adds 500+ translation keys to en.json for command descriptions,
flag descriptions, labels, messages, and error strings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 02:37:57 +00:00
|
|
|
"github.com/host-uk/core/pkg/i18n"
|
2026-01-30 00:47:54 +00:00
|
|
|
"github.com/spf13/cobra"
|
2026-01-29 12:22:01 +00:00
|
|
|
)
|
|
|
|
|
|
refactor(cli): restructure cmd packages into subdirectories
- Move CLI commands into subdirectories matching command hierarchy:
dev/, go/, php/, build/, ci/, sdk/, pkg/, vm/, docs/, setup/, doctor/, test/, ai/
- Create shared/ package for common styles and utilities
- Add new `core ai` root command with claude subcommand
- Update package declarations and imports across all files
- Create commands.go entry points for each package
- Remove GUI-related files (moved to core-gui repo)
This makes the filesystem structure match the CLI command structure,
improving context capture and code organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:02:43 +00:00
|
|
|
// Style aliases for shared styles
|
|
|
|
|
var (
|
2026-01-30 10:32:05 +00:00
|
|
|
successStyle = cli.SuccessStyle
|
|
|
|
|
errorStyle = cli.ErrorStyle
|
|
|
|
|
dimStyle = cli.DimStyle
|
refactor(cli): restructure cmd packages into subdirectories
- Move CLI commands into subdirectories matching command hierarchy:
dev/, go/, php/, build/, ci/, sdk/, pkg/, vm/, docs/, setup/, doctor/, test/, ai/
- Create shared/ package for common styles and utilities
- Add new `core ai` root command with claude subcommand
- Update package declarations and imports across all files
- Create commands.go entry points for each package
- Remove GUI-related files (moved to core-gui repo)
This makes the filesystem structure match the CLI command structure,
improving context capture and code organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:02:43 +00:00
|
|
|
)
|
|
|
|
|
|
2026-01-29 12:22:01 +00:00
|
|
|
// AddGoCommands adds Go development commands.
|
2026-01-30 00:47:54 +00:00
|
|
|
func AddGoCommands(root *cobra.Command) {
|
|
|
|
|
goCmd := &cobra.Command{
|
|
|
|
|
Use: "go",
|
feat(i18n): add translation keys to all CLI commands
Replace hardcoded strings with i18n.T() calls across all cmd/* packages:
- ai, build, ci, dev, docs, doctor, go, php, pkg, sdk, setup, test, vm
Adds 500+ translation keys to en.json for command descriptions,
flag descriptions, labels, messages, and error strings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 02:37:57 +00:00
|
|
|
Short: i18n.T("cmd.go.short"),
|
|
|
|
|
Long: i18n.T("cmd.go.long"),
|
2026-01-30 00:47:54 +00:00
|
|
|
}
|
2026-01-29 12:22:01 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
root.AddCommand(goCmd)
|
2026-01-29 12:22:01 +00:00
|
|
|
addGoTestCommand(goCmd)
|
2026-01-29 13:07:46 +00:00
|
|
|
addGoCovCommand(goCmd)
|
2026-01-29 12:22:01 +00:00
|
|
|
addGoFmtCommand(goCmd)
|
|
|
|
|
addGoLintCommand(goCmd)
|
2026-01-29 13:00:55 +00:00
|
|
|
addGoInstallCommand(goCmd)
|
2026-01-29 12:22:01 +00:00
|
|
|
addGoModCommand(goCmd)
|
|
|
|
|
addGoWorkCommand(goCmd)
|
|
|
|
|
}
|