MCPcopy Create free account
hub / github.com/compozy/agh / newSkillInstallCommand

Function newSkillInstallCommand

internal/cli/skill_commands.go:508–532  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

506}
507
508func newSkillInstallCommand(deps commandDeps) *cobra.Command {
509 version := ""
510 cmd := &cobra.Command{
511 Use: "install <slug>",
512 Short: "Install a marketplace skill",
513 Example: ` # Install the latest marketplace version of a skill
514 agh skill install @acme/code-review`,
515 Args: exactOneNonBlankArg(),
516 RunE: func(cmd *cobra.Command, args []string) error {
517 slug, err := normalizeSkillSlug(args[0])
518 if err != nil {
519 return err
520 }
521
522 item, err := installMarketplaceSkillForCommand(cmd.Context(), deps, slug, version)
523 if err != nil {
524 return err
525 }
526
527 return writeCommandOutput(cmd, skillInstallBundle(item))
528 },
529 }
530 cmd.Flags().StringVar(&version, "version", "", "Marketplace version to install")
531 return cmd
532}
533
534func newSkillRemoveCommand(deps commandDeps) *cobra.Command {
535 return &cobra.Command{

Callers 1

newSkillCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
normalizeSkillSlugFunction · 0.85
writeCommandOutputFunction · 0.85
skillInstallBundleFunction · 0.85

Tested by

no test coverage detected