2026-01-29 19:09:51 +00:00
|
|
|
// Package setup provides workspace bootstrap and package cloning commands.
|
2026-01-29 18:27:33 +00:00
|
|
|
//
|
2026-01-29 19:09:51 +00:00
|
|
|
// Two modes of operation:
|
|
|
|
|
//
|
|
|
|
|
// REGISTRY MODE (repos.yaml exists):
|
|
|
|
|
// - Clones all repositories defined in repos.yaml into packages/
|
|
|
|
|
// - Skips repos that already exist
|
|
|
|
|
// - Supports filtering by type with --only
|
|
|
|
|
//
|
|
|
|
|
// BOOTSTRAP MODE (no repos.yaml):
|
|
|
|
|
// - Clones core-devops to set up the workspace foundation
|
|
|
|
|
// - Presents an interactive wizard to select packages (unless --all)
|
|
|
|
|
// - Clones selected packages
|
2026-01-29 18:27:33 +00:00
|
|
|
//
|
|
|
|
|
// Flags:
|
|
|
|
|
// - --registry: Path to repos.yaml (auto-detected if not specified)
|
|
|
|
|
// - --only: Filter by repo type (foundation, module, product)
|
|
|
|
|
// - --dry-run: Preview what would be cloned
|
2026-01-29 19:09:51 +00:00
|
|
|
// - --all: Skip wizard, clone all packages (non-interactive)
|
|
|
|
|
// - --name: Project directory name for bootstrap mode
|
|
|
|
|
// - --build: Run build after cloning
|
2026-01-29 18:27:33 +00:00
|
|
|
//
|
|
|
|
|
// Uses gh CLI with HTTPS when authenticated, falls back to SSH.
|
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 setup
|
|
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
import "github.com/spf13/cobra"
|
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
|
|
|
|
|
|
|
|
// AddCommands registers the 'setup' command and all subcommands.
|
2026-01-30 00:47:54 +00:00
|
|
|
func AddCommands(root *cobra.Command) {
|
|
|
|
|
AddSetupCommand(root)
|
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
|
|
|
}
|