feat: new pmg banner (#68)

* feat: new pmg banner

* commit lenght check
This commit is contained in:
Kunal Singh
2025-08-21 23:01:30 +05:30
committed by GitHub
parent 2493fb4dc6
commit cd8fb52c47
6 changed files with 65 additions and 16 deletions
+7
View File
@@ -13,6 +13,7 @@ import (
"github.com/safedep/pmg/config"
"github.com/safedep/pmg/internal/analytics"
"github.com/safedep/pmg/internal/ui"
appVersion "github.com/safedep/pmg/internal/version"
"github.com/spf13/cobra"
)
@@ -97,6 +98,12 @@ func main() {
cmd.AddCommand(setup.NewSetupCommand())
cmd.AddCommand(setup.NewRemoveCommand())
// Print Banner on --help / -h
cmd.SetHelpFunc(func(command *cobra.Command, args []string) {
fmt.Print(ui.GeneratePMGBanner(appVersion.Version, appVersion.Commit))
fmt.Println(command.UsageString())
})
defer analytics.Close()
analytics.TrackCommandRun()