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

Function printHostHints

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

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