MCPcopy Index your code
hub / github.com/cli/cli / printHostHints

Function printHostHints

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

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