cli/internal/cmd/pkgcmd/cmd_pkg.go
Claude 23b82482f2 refactor: rename module from github.com/host-uk/core to forge.lthn.ai/core/cli
Move module identity to our own Forgejo instance. All import paths
updated across 434 Go files, sub-module go.mod files, and go.work.

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

39 lines
935 B
Go

// Package pkgcmd provides package management commands for core-* repos.
package pkgcmd
import (
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/core/cli/pkg/i18n"
"github.com/spf13/cobra"
)
func init() {
cli.RegisterCommands(AddPkgCommands)
}
// Style and utility aliases
var (
repoNameStyle = cli.RepoStyle
successStyle = cli.SuccessStyle
errorStyle = cli.ErrorStyle
dimStyle = cli.DimStyle
ghAuthenticated = cli.GhAuthenticated
gitClone = cli.GitClone
)
// AddPkgCommands adds the 'pkg' command and subcommands for package management.
func AddPkgCommands(root *cobra.Command) {
pkgCmd := &cobra.Command{
Use: "pkg",
Short: i18n.T("cmd.pkg.short"),
Long: i18n.T("cmd.pkg.long"),
}
root.AddCommand(pkgCmd)
addPkgSearchCommand(pkgCmd)
addPkgInstallCommand(pkgCmd)
addPkgListCommand(pkgCmd)
addPkgUpdateCommand(pkgCmd)
addPkgOutdatedCommand(pkgCmd)
addPkgRemoveCommand(pkgCmd)
}