## Summary - Extract PHP/Laravel commands to `core/php` repo (42 files, standalone module) - Extract CI/release + SDK commands to `core/ci` repo (10 files) - Remove `internal/variants/` build tag system entirely - Move all 30 remaining command packages from `internal/cmd/` to top-level `cmd/` - Rewrite `main.go` with direct imports — no more variant selection - PHP and CI are now optional via commented import lines in main.go Co-authored-by: Claude <developers@lethean.io> Reviewed-on: #2 Co-authored-by: Charon <charon@lthn.ai> Co-committed-by: Charon <charon@lthn.ai>
53 lines
1.4 KiB
Go
53 lines
1.4 KiB
Go
// Package forge provides CLI commands for managing a Forgejo instance.
|
|
//
|
|
// Commands:
|
|
// - config: Configure Forgejo connection (URL, token)
|
|
// - status: Show instance status and version
|
|
// - repos: List repositories
|
|
// - issues: List and create issues
|
|
// - prs: List pull requests
|
|
// - migrate: Migrate repos from external services
|
|
// - sync: Sync GitHub repos to Forgejo upstream branches
|
|
// - orgs: List organisations
|
|
// - labels: List and create labels
|
|
package forge
|
|
|
|
import (
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
)
|
|
|
|
func init() {
|
|
cli.RegisterCommands(AddForgeCommands)
|
|
}
|
|
|
|
// Style aliases from shared package.
|
|
var (
|
|
successStyle = cli.SuccessStyle
|
|
errorStyle = cli.ErrorStyle
|
|
warningStyle = cli.WarningStyle
|
|
dimStyle = cli.DimStyle
|
|
valueStyle = cli.ValueStyle
|
|
repoStyle = cli.RepoStyle
|
|
numberStyle = cli.NumberStyle
|
|
infoStyle = cli.InfoStyle
|
|
)
|
|
|
|
// AddForgeCommands registers the 'forge' command and all subcommands.
|
|
func AddForgeCommands(root *cli.Command) {
|
|
forgeCmd := &cli.Command{
|
|
Use: "forge",
|
|
Short: "Forgejo instance management",
|
|
Long: "Manage repositories, issues, pull requests, and organisations on your Forgejo instance.",
|
|
}
|
|
root.AddCommand(forgeCmd)
|
|
|
|
addConfigCommand(forgeCmd)
|
|
addStatusCommand(forgeCmd)
|
|
addReposCommand(forgeCmd)
|
|
addIssuesCommand(forgeCmd)
|
|
addPRsCommand(forgeCmd)
|
|
addMigrateCommand(forgeCmd)
|
|
addSyncCommand(forgeCmd)
|
|
addOrgsCommand(forgeCmd)
|
|
addLabelsCommand(forgeCmd)
|
|
}
|