MCPcopy Create free account
hub / github.com/cli/cli / printHostHints

Function printHostHints

pkg/cmd/skills/install/install.go:1221–1240  ·  view source on GitHub ↗

printHostHints prints any agent-specific post-install guidance for the hosts that were installed to. Most agents need no extra steps; this is currently used for Kiro CLI, which requires skills to be registered as resources on a custom agent. The path in the example is derived from the actual install

(w io.Writer, cs *iostreams.ColorScheme, hosts []*registry.AgentHost, installed []string, installDir, gitRoot string)

Source from the content-addressed store, hash-verified

1219// resources on a custom agent. The path in the example is derived from
1220// the actual install directory so it matches the chosen scope or --dir.
1221func printHostHints(w io.Writer, cs *iostreams.ColorScheme, hosts []*registry.AgentHost, installed []string, installDir, gitRoot string) {
1222 if len(installed) == 0 {
1223 return
1224 }
1225 for _, h := range hosts {
1226 if h.ID == "kiro-cli" {
1227 fmt.Fprintln(w)
1228 fmt.Fprint(w, heredoc.Docf(`
1229 %s Kiro CLI: register these skills on a custom agent by adding them to
1230 .kiro/agents/<agent>.json under "resources", for example:
1231
1232 {
1233 "resources": ["skill://%s/**/SKILL.md"]
1234 }
1235 `, cs.WarningIcon(), kiroResourcePath(installDir, gitRoot)))
1236 fmt.Fprintln(w)
1237 return
1238 }
1239 }
1240}
1241
1242// kiroResourcePath returns a slash-separated path suitable for use in the
1243// "resources" field of a Kiro agent config. When the install directory is

Callers 3

installRunFunction · 0.85
runLocalInstallFunction · 0.85
Test_printHostHintsFunction · 0.85

Calls 2

kiroResourcePathFunction · 0.85
WarningIconMethod · 0.80

Tested by 1

Test_printHostHintsFunction · 0.68