cli

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cli provides command-line interface implementations for skills-pkg.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCmd

type AddCmd struct {
	Name           string `arg:"" help:"Skill name"`
	Source         string `default:"git" enum:"git,go-mod" help:"Source type"`
	URL            string `required:"" help:"Source URL (Git URL or Go module path)"`
	Version        string `` /* 130-byte string literal not displayed */
	SubDir         string `help:"Subdirectory within the source to extract (default: skills/{name})"`
	PrintSkillInfo bool   `name:"print-skill-info" help:"After installation, print skill metadata in agent-readable format"`
}

AddCmd represents the add command

func (*AddCmd) Run

func (c *AddCmd) Run(ctx *kong.Context) error

Run executes the add command Requirements: 6.3, 12.1, 12.2, 12.3

type AddInstallTargetCmd

type AddInstallTargetCmd struct {
	Target []string `arg:"" optional:"" help:"Install target directory path (can be specified multiple times)"`
	Agent  []string `` /* 155-byte string literal not displayed */
	Global bool     `help:"Use user-level directory instead of project-level directory (requires --agent)" short:"g" default:"false"`
}

AddInstallTargetCmd represents the add-install-target command

func (*AddInstallTargetCmd) Run

func (c *AddInstallTargetCmd) Run(ctx *kong.Context) error

Run executes the add-install-target command

type InitCmd

type InitCmd struct {
	Agent      []string `` /* 447-byte string literal not displayed */
	InstallDir []string `help:"Custom install directory (can be specified multiple times)" short:"d"`
	Global     bool     `help:"Use user-level directory instead of project-level directory (requires --agent)" short:"g" default:"false"`
}

InitCmd represents the init command Requirements: 1.1, 1.2, 1.3, 1.4, 1.5, 12.1, 12.2, 12.3, 12.4

func (*InitCmd) Run

func (c *InitCmd) Run(ctx *kong.Context) error

Run executes the init command This method initializes a new .skillspkg.toml configuration file with the specified install directories. It handles custom install directories (--install-dir) and agent-specific directories (--agent). Requirements: 1.1, 1.2, 1.3, 1.4, 1.5, 12.1, 12.2, 12.3, 12.4

type InstallCmd

type InstallCmd struct {
	Skills []string `arg:"" optional:"" help:"Skill names to install (if not specified, installs all skills from configuration)"`
}

InstallCmd represents the install command

func (*InstallCmd) Run

func (c *InstallCmd) Run(ctx *kong.Context) error

Run executes the install command Requirements: 6.1, 6.2, 6.3, 12.1, 12.2, 12.3, 12.4

type ListCmd

type ListCmd struct {
}

ListCmd represents the list command

func (*ListCmd) Run

func (c *ListCmd) Run(ctx *kong.Context) error

Run executes the list command Requirements: 8.1, 8.2, 8.3, 8.4, 12.1, 12.2, 12.3

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger provides logging functionality with verbose support

func NewLogger

func NewLogger(verbose bool) *Logger

NewLogger creates a new Logger instance

func (*Logger) Error

func (l *Logger) Error(format string, args ...any)

Error prints an error message to stderr

func (*Logger) Info

func (l *Logger) Info(format string, args ...any)

Info prints an informational message to stdout

func (*Logger) IsVerbose

func (l *Logger) IsVerbose() bool

IsVerbose returns whether verbose mode is enabled

func (*Logger) SetVerbose

func (l *Logger) SetVerbose(verbose bool)

SetVerbose enables or disables verbose logging

func (*Logger) Verbose

func (l *Logger) Verbose(format string, args ...any)

Verbose prints a verbose debug message to stdout if verbose mode is enabled

type SearchCmd

type SearchCmd struct {
	Query string `arg:"" optional:"" help:"Search query for skills"`
	Limit int    `default:"10" help:"Maximum number of results to show"`
}

SearchCmd searches for available skills on skills.sh.

func (*SearchCmd) Run

func (c *SearchCmd) Run(ctx *kong.Context) error

type SetupCICmd

type SetupCICmd struct {
	GitHubActions bool `help:"Generate GitHub Actions workflow for skills auto-update" name:"github-actions"`
	Renovate      bool `help:"Add Renovate custom manager configuration for skills auto-update" name:"renovate"`
}

SetupCICmd represents the setup-ci command

func (*SetupCICmd) Run

func (c *SetupCICmd) Run(ctx *kong.Context) error

Run executes the setup-ci command

type UninstallCmd

type UninstallCmd struct {
	SkillName string `arg:"" help:"Name of the skill to remove from configuration and all install targets"`
}

UninstallCmd represents the uninstall command

func (*UninstallCmd) Run

func (c *UninstallCmd) Run(ctx *kong.Context) error

Run executes the uninstall command Requirements: 9.1, 9.2, 9.3, 9.4, 12.1, 12.2, 12.3

type UpdateCmd

type UpdateCmd struct {
	Output string   `help:"Output format (text, json)" default:"text" enum:"text,json"`
	Skills []string `arg:"" optional:"" help:"Skill names to update (if not specified, updates all skills to their latest versions)"`
	DryRun bool     `help:"Show what would be updated without making changes" name:"dry-run"`
}

UpdateCmd represents the update command

func (*UpdateCmd) Run

func (c *UpdateCmd) Run(ctx *kong.Context) error

Run executes the update command Requirements: 7.1, 7.2, 7.6, 12.1, 12.2, 12.3

type VerifyCmd

type VerifyCmd struct {
}

VerifyCmd represents the verify command

func (*VerifyCmd) Run

func (c *VerifyCmd) Run(ctx *kong.Context) error

Run executes the verify command Requirements: 5.4, 5.5, 5.6, 12.1, 12.2, 12.3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL