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 docs provides documentation management commands.
|
|
|
|
|
package docs
|
2026-01-27 21:08:51 +00:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/charmbracelet/lipgloss"
|
2026-01-29 18:13:51 +00:00
|
|
|
"github.com/host-uk/core/cmd/shared"
|
2026-01-27 21:08:51 +00:00
|
|
|
"github.com/leaanthony/clir"
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-30 00:22:47 +00:00
|
|
|
// Style and utility aliases from shared
|
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
|
|
|
var (
|
|
|
|
|
repoNameStyle = shared.RepoNameStyle
|
|
|
|
|
successStyle = shared.SuccessStyle
|
|
|
|
|
errorStyle = shared.ErrorStyle
|
|
|
|
|
dimStyle = shared.DimStyle
|
|
|
|
|
headerStyle = shared.HeaderStyle
|
|
|
|
|
confirm = shared.Confirm
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-30 00:22:47 +00:00
|
|
|
// Package-specific styles
|
2026-01-27 21:08:51 +00:00
|
|
|
var (
|
|
|
|
|
docsFoundStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#22c55e")) // green-500
|
|
|
|
|
|
|
|
|
|
docsMissingStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#6b7280")) // gray-500
|
|
|
|
|
|
|
|
|
|
docsFileStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(lipgloss.Color("#3b82f6")) // blue-500
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// AddDocsCommand adds the 'docs' command to the given parent command.
|
|
|
|
|
func AddDocsCommand(parent *clir.Cli) {
|
|
|
|
|
docsCmd := parent.NewSubCommand("docs", "Documentation management")
|
|
|
|
|
docsCmd.LongDescription("Manage documentation across all repos.\n" +
|
2026-01-29 10:47:49 +00:00
|
|
|
"Scan for docs, check coverage, and sync to core-php/docs/packages/.")
|
2026-01-27 21:08:51 +00:00
|
|
|
|
|
|
|
|
// Add subcommands
|
|
|
|
|
addDocsSyncCommand(docsCmd)
|
|
|
|
|
addDocsListCommand(docsCmd)
|
|
|
|
|
}
|