MCPcopy Create free account
hub / github.com/diillson/chatcli / ShowHelp

Method ShowHelp

cli/skill_handler.go:1152–1192  ·  view source on GitHub ↗

ShowHelp displays usage information.

()

Source from the content-addressed store, hash-verified

1150
1151// ShowHelp displays usage information.
1152func (sh *SkillHandler) ShowHelp() {
1153 fmt.Println()
1154 fmt.Printf(" %s\n", colorize(i18n.T("skill.help.header")+":", ColorCyan))
1155 fmt.Printf(" %s\n\n", colorize(strings.Repeat("─", 50), ColorGray))
1156
1157 commands := []struct {
1158 cmd string
1159 desc string
1160 }{
1161 {"/skill search <query>", i18n.T("skill.help.search")},
1162 {"/skill install <name> [--from <reg>]", i18n.T("skill.help.install")},
1163 {"/skill uninstall <name>", i18n.T("skill.help.uninstall")},
1164 {"/skill list", i18n.T("skill.help.list")},
1165 {"/skill info <name> [--from <reg>]", i18n.T("skill.help.info")},
1166 {"/skill registries", i18n.T("skill.help.registries")},
1167 {"/skill registry enable|disable <name>", i18n.T("skill.help.registry_toggle")},
1168 {"/skill prefer [name] [source]", i18n.T("skill.help.prefer")},
1169 {"/skill pin <name>", i18n.T("skill.help.pin")},
1170 {"/skill unpin <name>", i18n.T("skill.help.unpin")},
1171 {"/skill pinned", i18n.T("skill.help.pinned")},
1172 {"/skill help", i18n.T("skill.help.show_help")},
1173 }
1174
1175 // Find max command length for alignment
1176 maxLen := 0
1177 for _, c := range commands {
1178 if len(c.cmd) > maxLen {
1179 maxLen = len(c.cmd)
1180 }
1181 }
1182
1183 for _, c := range commands {
1184 padded := fmt.Sprintf("%-*s", maxLen, c.cmd)
1185 fmt.Printf(" %s %s\n", colorize(padded, ColorCyan), c.desc)
1186 }
1187
1188 fmt.Printf("\n %s: %s\n",
1189 i18n.T("skill.help.skills_dir"), colorize(sh.registryMgr.GetInstallDir(), ColorGray))
1190 fmt.Printf(" %s: %s\n\n",
1191 i18n.T("skill.registries.config"), colorize(sh.registryMgr.GetConfigPath(), ColorGray))
1192}
1193
1194// Pin marks a skill to be auto-injected into every turn for the rest of the
1195// session, regardless of triggers/paths. Pinning is rejected for skills with

Callers 2

HandleCommandMethod · 0.95

Calls 4

TFunction · 0.92
colorizeFunction · 0.85
GetConfigPathMethod · 0.80
GetInstallDirMethod · 0.45

Tested by

no test coverage detected