cli/cmd/forge/cmd_forge.go
Claude 7bb3488f0e
refactor: flatten commands, extract php/ci variants to own repos
- Remove internal/cmd/php/ (now core/php repo)
- Remove internal/cmd/ci/ and internal/cmd/sdk/ (now core/ci repo)
- Remove internal/variants/ build tag system entirely
- Move all 30 remaining command packages from internal/cmd/ to cmd/
- Rewrite main.go with direct imports (no more variant selection)
- Update all cross-references from internal/cmd/ to cmd/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:41:05 +00:00

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)
}