Documentation
¶
Index ¶
- func Inspect(args []string)
- func Install(args []string)
- func Installed(args []string)
- func List(args []string)
- func Login(args []string)
- func PrintUsage()
- func Publish(args []string)
- func ReadDirFiles(dirPath string) (map[string][]byte, error)
- func SaveConfig(cfg *CLIConfig) error
- func Search(args []string)
- func SkillsDir(cfg *CLIConfig) string
- func Uninstall(args []string)
- func Update(args []string)
- func WhoAmI(args []string)
- type CLIConfig
- type Client
- func (c *Client) Download(slug, version string) (io.ReadCloser, error)
- func (c *Client) GetSkill(slug string) (map[string]interface{}, error)
- func (c *Client) GetVersions(slug string) (map[string]interface{}, error)
- func (c *Client) ListSkills(sort string, limit int) (map[string]interface{}, error)
- func (c *Client) Publish(slug, version, summary, tags, changelog string, files map[string][]byte) (map[string]interface{}, error)
- func (c *Client) Search(query string) (map[string]interface{}, error)
- func (c *Client) WhoAmI() (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Login ¶
func Login(args []string)
Login prompts for registry URL and token, verifies, and saves config.
func ReadDirFiles ¶
ReadDirFiles reads all files from a directory path, returning a map of relative path -> content.
func SaveConfig ¶
func SkillsDir ¶
SkillsDir returns the directory where skills are installed. Reads from the loaded config; falls back to ~/.skillhub/skills.
Types ¶
type CLIConfig ¶
type CLIConfig struct {
Registry string `yaml:"registry"`
Token string `yaml:"token"`
SkillsDir string `yaml:"skills_dir,omitempty"`
}
func LoadConfig ¶
type Client ¶
func NewClientFromConfig ¶
func (*Client) Download ¶
func (c *Client) Download(slug, version string) (io.ReadCloser, error)
Download calls GET /api/v1/download and returns the response body (ZIP)
func (*Client) GetVersions ¶
GetVersions calls GET /api/v1/skills/:slug/versions
func (*Client) ListSkills ¶
ListSkills calls GET /api/v1/skills
func (*Client) Publish ¶
func (c *Client) Publish(slug, version, summary, tags, changelog string, files map[string][]byte) (map[string]interface{}, error)
Publish calls POST /api/v1/skills with multipart form
Click to show internal directories.
Click to hide internal directories.