feat(cmd): add ASCII art logo to snrd cli tool

This commit is contained in:
Prad Nukala
2025-11-18 12:19:21 -05:00
parent 99167120dc
commit 28eba5a3f3
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -11,6 +11,7 @@ import (
) )
func main() { func main() {
fmt.Print(sonrLogo())
setupSDKConfig() setupSDKConfig()
// Standard snrd execution // Standard snrd execution
@@ -35,3 +36,18 @@ func SetBech32Prefixes(config *sdk.Config) {
config.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) config.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub)
config.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub) config.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub)
} }
func sonrLogo() string {
lines := []string{
"██████████░ ██████████░ ██████░ ██░ ██████████░",
"██░ ██░ ██░ ██░ ██░ ██░ ██░ ██░",
"██████████░ ██░ ██░ ██░ ██░ ██░ ██████████░",
" ██░ ██░ ██░ ██░ ██░ ██░ ██░ ",
"██████████░ ██████████░ ██░ ██████░ ██░ ██████░",
}
var logo string
for _, line := range lines {
logo += line + "\n"
}
return logo
}
+1
View File
@@ -61,6 +61,7 @@ func NewRootCmd() *cobra.Command {
rootCmd := &cobra.Command{ rootCmd := &cobra.Command{
Use: version.AppName, Use: version.AppName,
Short: version.AppName + " Daemon (server)", Short: version.AppName + " Daemon (server)",
Long: sonrLogo(),
SilenceErrors: true, SilenceErrors: true,
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs // set the default command outputs