Skip to content

Commit f0e554c

Browse files
committed
update tips UI copy, use library for colors to improve readability
1 parent 14207bf commit f0e554c

File tree

7 files changed

+36
-8
lines changed

7 files changed

+36
-8
lines changed

cmd/docker-mcp/catalog/ls.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func humanPrintCatalog(cfg Config) {
4949
fmt.Printf("%s: %s\n", name, catalog.DisplayName)
5050
}
5151
if hints.Enabled() {
52-
fmt.Println("\033[36mTip: Use \033[1;3m'docker mcp catalog show <name>'\033[0;36m to browse a catalog's servers\033[0m")
52+
hints.TipCyan.Print("Tip: To browse a catalog's servers, use ")
53+
hints.TipCyanBoldItalic.Print("docker mcp catalog show <catalog-name>")
54+
fmt.Println()
5355
}
5456
}

cmd/docker-mcp/catalog/show.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ func Show(ctx context.Context, name string, format Format, mcpOAuthDcrEnabled bo
155155
fmt.Printf(" %d servers total\n", serverCount)
156156
fmt.Println()
157157
if hints.Enabled() {
158-
fmt.Println("\033[36mTip: \033[1;3mdocker mcp server inspect <server-name>\033[0;36m to view server details, \033[1;3mdocker mcp server enable <server-name>\033[0;36m to add servers\033[0m")
158+
hints.TipCyan.Print("Tip: To view server details, use ")
159+
hints.TipCyanBoldItalic.Print("docker mcp server inspect <server-name>")
160+
hints.TipCyan.Print(". To add servers, use ")
161+
hints.TipCyanBoldItalic.Println("docker mcp server enable <server-name>")
159162
}
160163

161164
return nil

cmd/docker-mcp/client/connect.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ func Connect(ctx context.Context, cwd string, config Config, vendor string, glob
3636
}
3737
fmt.Printf("You might have to restart '%s'.\n", vendor)
3838
if hints.Enabled() {
39-
fmt.Println("\033[36mTip: Your client is now connected! Try \033[1;3m'docker mcp tools ls'\033[0;36m to see available tools\033[0m")
39+
hints.TipCyan.Print("Tip: Your client is now connected! Use ")
40+
hints.TipCyanBoldItalic.Print("docker mcp tools ls")
41+
hints.TipCyan.Println(" to see your available tools")
42+
fmt.Println()
4043
}
4144
return nil
4245
}

cmd/docker-mcp/commands/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ func serverCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command {
4444
} else {
4545
fmt.Fprintln(cmd.OutOrStdout(), strings.Join(list, ", "))
4646
if hints.Enabled() {
47-
fmt.Fprintln(cmd.OutOrStdout(), "\033[36mTip: Connect to a client (IE: Claude/Cursor) to use these servers with \033[1;3m'docker mcp client connect <client-name>'\033[0m")
47+
hints.TipCyan.Fprint(cmd.OutOrStdout(), "Tip: To use these servers, connect to a client (IE: claude/cursor) with ")
48+
hints.TipCyanBoldItalic.Fprintln(cmd.OutOrStdout(), "docker mcp client connect <client-name>")
4849
fmt.Fprintln(cmd.OutOrStdout(), "")
4950
}
5051
}

cmd/docker-mcp/hints/hints.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package hints
33
import (
44
"github.com/docker/cli/cli/config"
55
"github.com/docker/cli/cli/config/configfile"
6+
"github.com/fatih/color"
67
)
78

89
func Enabled() bool {
@@ -18,6 +19,12 @@ func Enabled() bool {
1819
return true
1920
}
2021

22+
var (
23+
TipCyan = color.New(color.FgCyan)
24+
TipCyanBoldItalic = color.New(color.FgCyan, color.Bold, color.Italic)
25+
TipGreen = color.New(color.FgGreen)
26+
)
27+
2128
func getDockerConfigFile() *configfile.ConfigFile {
2229
configFile, err := config.Load("")
2330
if err != nil {

cmd/docker-mcp/server/enable.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,18 @@ func update(ctx context.Context, docker docker.Client, add []string, remove []st
9696
}
9797

9898
if len(add) > 0 && hints.Enabled() {
99-
fmt.Println("\033[36mTip: \033[32m✓\033[0m \033[36mServer enabled. Run \033[1;3m'docker mcp server ls'\033[0;36m to view all enabled servers\033[0m")
99+
hints.TipCyan.Print("Tip: ")
100+
hints.TipGreen.Print("✓")
101+
hints.TipCyan.Print(" Server enabled. To view all enabled servers, use ")
102+
hints.TipCyanBoldItalic.Println("docker mcp server ls")
100103
fmt.Println()
101104
}
102105

103106
if len(remove) > 0 && hints.Enabled() {
104-
fmt.Println("\033[36mTip: \033[32m✓\033[0m \033[36mServer disabled. Run \033[1;3m'docker mcp server ls'\033[0;36m to see remaining enabled servers\033[0m")
107+
hints.TipCyan.Print("Tip: ")
108+
hints.TipGreen.Print("✓")
109+
hints.TipCyan.Print(" Server disabled. To see remaining enabled servers, use ")
110+
hints.TipCyanBoldItalic.Println("docker mcp server ls")
105111
fmt.Println()
106112
}
107113

cmd/docker-mcp/tools/list.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ func List(ctx context.Context, version string, gatewayArgs []string, debug bool,
5353
fmt.Println(" -", tool.Name, "-", toolDescription(tool))
5454
}
5555
if hints.Enabled() {
56-
fmt.Println("\033[36mTip: Use \033[1;3m'docker mcp tools inspect <tool-name>'\033[0;36m to see tool details, or \033[1;3m'docker mcp tools call <tool-name>'\033[0;36m to test it\033[0m")
56+
hints.TipCyan.Print("Tip: For tool details, use ")
57+
hints.TipCyanBoldItalic.Print("docker mcp tools inspect <tool-name>")
58+
hints.TipCyan.Print(". To test the tool, use ")
59+
hints.TipCyanBoldItalic.Println("docker mcp tools call <tool-name>")
60+
fmt.Println()
5761
}
5862
}
5963
case "count":
@@ -62,7 +66,9 @@ func List(ctx context.Context, version string, gatewayArgs []string, debug bool,
6266
} else {
6367
fmt.Println(len(response.Tools), "tools")
6468
if hints.Enabled() {
65-
fmt.Println("\033[36mTip: Run \033[1;3m'docker mcp tools ls'\033[0;36m to see all available tools\033[0m")
69+
hints.TipCyan.Print("Tip: To see all available tools, use ")
70+
hints.TipCyanBoldItalic.Println("docker mcp tools ls")
71+
fmt.Println()
6672
}
6773
}
6874
case "inspect":

0 commit comments

Comments
 (0)