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

Function printHostHints

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

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