go-devops/cmd/setup/cmd_commands.go
Codex da527c657f chore(go-devops): migrate module path to dappco.re/go/devops
Dropped the embedded "core" segment per RFC, aligning with graduated
repos. Updated go.mod + 11 *.go self-imports across cmd/setup/,
cmd/docs/, cmd/gitcmd/, cmd/dev/, deploy/coolify/. `go build ./...`
passes.

Closes tasks.lthn.sh/view.php?id=753

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 20:10:17 +01:00

42 lines
1.3 KiB
Go

// Package setup provides workspace bootstrap and package cloning commands.
//
// 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
//
// 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
// - --all: Skip wizard, clone all packages (non-interactive)
// - --name: Project directory name for bootstrap mode
// - --build: Run build after cloning
//
// Uses gh CLI with HTTPS when authenticated, falls back to SSH.
package setup
import (
"dappco.re/go/core/cli/pkg/cli"
"dappco.re/go/core/i18n"
_ "dappco.re/go/devops/locales"
)
func init() {
cli.RegisterCommands(AddSetupCommands)
}
// AddSetupCommands registers the 'setup' command and all subcommands.
func AddSetupCommands(root *cli.Command) {
setupCmd.Short = i18n.T("cmd.setup.short")
setupCmd.Long = i18n.T("cmd.setup.long")
AddSetupCommand(root)
}