cli/cmd/pkgcmd/cmd_pkg.go
Snider 945be23adc
Some checks failed
Deploy / build (push) Failing after 4s
Security Scan / security (push) Successful in 12s
refactor: use core/go-i18n module instead of core/go/pkg/i18n
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 09:09:06 +00:00

35 lines
875 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/go-i18n"
"github.com/spf13/cobra"
)
// 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)
}