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

Function printHostHints

pkg/cmd/skills/install/install.go:1222–1241  ·  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

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