MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / managementCommand

Method managementCommand

internal/cli/management.go:31–48  ·  view source on GitHub ↗

managementCommand returns the prompt/skill/agent/plugin command tree with four subcommands modeled after `gh skill`: search, list, update, install.

(group, alias string, state *globalState)

Source from the content-addressed store, hash-verified

29// managementCommand returns the prompt/skill/agent/plugin command tree with
30// four subcommands modeled after `gh skill`: search, list, update, install.
31func (a *App) managementCommand(group, alias string, state *globalState) *cobra.Command {
32 kind := groupKind(group)
33 aliases := []string{}
34 if alias != "" {
35 aliases = []string{alias}
36 }
37 cmd := &cobra.Command{
38 Use: group,
39 Aliases: aliases,
40 Short: "Manage " + group + " configurations",
41 }
42 cmd.AddCommand(entitySearchCommand(kind))
43 cmd.AddCommand(entityListCommand(kind))
44 cmd.AddCommand(entityUpdateCommand(kind))
45 cmd.AddCommand(entityInstallCommand(kind))
46 cmd.AddCommand(entityUninstallCommand(kind))
47 return cmd
48}
49
50func groupKind(group string) entities.Kind {
51 switch group {

Callers 1

rootCommandMethod · 0.95

Calls 6

groupKindFunction · 0.85
entitySearchCommandFunction · 0.85
entityListCommandFunction · 0.85
entityUpdateCommandFunction · 0.85
entityInstallCommandFunction · 0.85
entityUninstallCommandFunction · 0.85

Tested by

no test coverage detected