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 dev
|
2025-10-28 12:06:05 +00:00
|
|
|
|
|
|
|
|
import (
|
2026-02-16 14:24:37 +00:00
|
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
|
|
|
"forge.lthn.ai/core/go/pkg/i18n"
|
2025-10-28 12:06:05 +00:00
|
|
|
)
|
|
|
|
|
|
2026-01-30 00:22:47 +00:00
|
|
|
// addAPICommands adds the 'api' command and its subcommands to the given parent command.
|
2026-01-31 11:39:19 +00:00
|
|
|
func addAPICommands(parent *cli.Command) {
|
2025-10-28 12:06:05 +00:00
|
|
|
// Create the 'api' command
|
2026-01-31 11:39:19 +00:00
|
|
|
apiCmd := &cli.Command{
|
2026-01-30 00:47:54 +00:00
|
|
|
Use: "api",
|
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.dev.api.short"),
|
2026-01-30 00:47:54 +00:00
|
|
|
}
|
|
|
|
|
parent.AddCommand(apiCmd)
|
2025-10-28 12:06:05 +00:00
|
|
|
|
|
|
|
|
// Add the 'sync' command to 'api'
|
2026-01-30 00:22:47 +00:00
|
|
|
addSyncCommand(apiCmd)
|
2025-10-28 21:42:29 +00:00
|
|
|
|
2026-01-27 21:08:51 +00:00
|
|
|
// TODO: Add the 'test-gen' command to 'api'
|
2026-01-30 00:22:47 +00:00
|
|
|
// addTestGenCommand(apiCmd)
|
2025-10-28 12:06:05 +00:00
|
|
|
}
|