1818
1919# Get version dynamically
2020
21- # ASCII art logo - simplified with light shades
22- ASCII_ART = """
23- ███░ ███░ ██████░ ██████░ ███░ ███░
24- ████░ ████░ ██░░░░░░ ██░░░██░ ████░ ████░
25- ██░████░██░ ██░ ██████░░ ██░████░██░
26- ██░░██░░██░ ██░ ██░░░░░ ██░░██░░██░
27- ██░ ░░░ ██░ ░██████░ ██░ ██░ ░░░ ██░
28- ░░░ ░░░ ░░░░░░░ ░░░ ░░░ ░░░
29-
30- """
31-
32- # Create an elegant logo with ocean-to-sunset gradient using rich.text.Text
33- header_text = Text ()
34-
35- # Create gradient ASCII art using rich-gradient with purple-to-pink colors
36- gradient_colors = ["#8F87F1" , "#C68EFD" , "#E9A5F1" , "#FED2E2" ]
37-
38- # Create a console with narrower width to force gradient calculation over ASCII width
39- temp_console = Console (width = 50 ) # Close to ASCII art width
40-
41- # Create gradient and render it with the narrow console
42- ascii_gradient = Gradient (ASCII_ART , colors = gradient_colors )
43-
44- # Capture the rendered gradient
45- with temp_console .capture () as capture :
46- temp_console .print (ascii_gradient , justify = "center" )
47- rendered_ascii = capture .get ()
48-
49- # Add to header text
50- header_text = Text .from_ansi (rendered_ascii )
51-
52- header_text .append ("\n " )
53-
54- # Add solid color text for title and tagline - harmonized with gradient
55- header_text .append ("Model Context Protocol Manager" , style = "#8F87F1 bold" )
56- header_text .append (" v" , style = "#C68EFD" )
57- header_text .append (__version__ , style = "#E9A5F1 bold" )
58- header_text .append ("\n " )
59- header_text .append ("Open Source with " , style = "#FED2E2" )
60- header_text .append ("♥" , style = "#E9A5F1" )
61- header_text .append (" by Path Integral Institute" , style = "#FED2E2" )
62-
63- footer_text = Text ()
64- footer_text .append ("" )
65-
6621
6722# Export header and footer for use in main command
6823def get_header_text ():
24+ # ASCII art logo - simplified with light shades
25+ ASCII_ART = """
26+ ███░ ███░ ██████░ ██████░ ███░ ███░
27+ ████░ ████░ ██░░░░░░ ██░░░██░ ████░ ████░
28+ ██░████░██░ ██░ ██████░░ ██░████░██░
29+ ██░░██░░██░ ██░ ██░░░░░ ██░░██░░██░
30+ ██░ ░░░ ██░ ░██████░ ██░ ██░ ░░░ ██░
31+ ░░░ ░░░ ░░░░░░░ ░░░ ░░░ ░░░
32+
33+ """
34+
35+ # Create an elegant logo with ocean-to-sunset gradient using rich.text.Text
36+ header_text = Text ()
37+
38+ # Create gradient ASCII art using rich-gradient with purple-to-pink colors
39+ gradient_colors = ["#8F87F1" , "#C68EFD" , "#E9A5F1" , "#FED2E2" ]
40+
41+ # Create a console with narrower width to force gradient calculation over ASCII width
42+ temp_console = Console (width = 80 ) # Close to ASCII art width
43+
44+ # Create gradient and render it with the narrow console
45+ ascii_gradient = Gradient (ASCII_ART , colors = gradient_colors ) # type: ignore
46+
47+ # Capture the rendered gradient
48+ with temp_console .capture () as capture :
49+ temp_console .print (ascii_gradient , justify = "center" )
50+ rendered_ascii = capture .get ()
51+
52+ # Add to header text
53+ header_text = Text .from_ansi (rendered_ascii )
54+
55+ header_text .append ("\n " )
56+
57+ # Add solid color text for title and tagline - harmonized with gradient
58+ prose = Text ()
59+ prose .append ("Model Context Protocol Manager" , style = "#8F87F1 bold" )
60+ prose .append (" v" , style = "#C68EFD" )
61+ prose .append (__version__ , style = "#E9A5F1 bold" )
62+ prose .append ("\n " )
63+ prose .append ("Open Source with " , style = "#FED2E2" )
64+ prose .append ("♥" , style = "#E9A5F1" )
65+ prose .append (" by Path Integral Institute" , style = "#FED2E2" )
66+
67+ with temp_console .capture () as capture :
68+ temp_console .print (prose , justify = "center" )
69+ rendered_text = capture .get ().rstrip ()
70+
71+ header_text .append (Text .from_ansi (rendered_text ))
6972 return header_text
7073
7174
72- def get_footer_text ():
73- return footer_text
74-
75-
7675# Add subtle footer to all commands using Text object to avoid literal markup
7776global_footer_text = Text ()
7877global_footer_text .append ("💬 Report bugs or request features: " , style = "#8B7DB8" )
@@ -85,8 +84,8 @@ def get_footer_text():
8584click .rich_click .SHOW_METAVARS_COLUMN = False
8685click .rich_click .APPEND_METAVARS_HELP = True
8786click .rich_click .SHOW_ARGUMENTS = True
88- click .rich_click .SHOW_HELP_FOR_ORPHAN_COMMAND = False
89- click .rich_click .GROUP_COMMANDS_BEFORE_USAGE = True
87+ # click.rich_click.SHOW_HELP_FOR_ORPHAN_COMMAND = False
88+ # click.rich_click.GROUP_COMMANDS_BEFORE_USAGE = True
9089
9190# Command groups for organized help
9291click .rich_click .COMMAND_GROUPS = {
@@ -147,15 +146,15 @@ def get_footer_text():
147146click .rich_click .STYLE_COMMAND = "bold cyan"
148147click .rich_click .STYLE_SWITCH = "bold green"
149148click .rich_click .STYLE_METAVAR = "bold yellow"
150- click .rich_click .STYLE_METAVAR_BRACKET = "dim"
149+ # click.rich_click.STYLE_METAVAR_BRACKET = "dim"
151150click .rich_click .STYLE_HELPTEXT = ""
152151click .rich_click .STYLE_HELPTEXT_FIRST_LINE = "bold"
153152click .rich_click .STYLE_OPTION_HELP = ""
154153click .rich_click .STYLE_USAGE = "bold"
155154click .rich_click .STYLE_USAGE_COMMAND = "bold cyan"
156155
157156# Layout
158- click .rich_click .ALIGN_ERRORS_LEFT = True
157+ # click.rich_click.ALIGN_ERRORS_LEFT = True
159158click .rich_click .WIDTH = None # Use terminal width
160159click .rich_click .MAX_WIDTH = 100 # Maximum width for better readability
161160
0 commit comments