install

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Embedded

func Embedded() []byte

Embedded returns the embedded skill contents.

func Install

func Install() (string, error)

Install writes the embedded skill to the Claude Code skill location (user scope).

func InstallPluginTo

func InstallPluginTo(scope Scope, baseDir string) (string, bool, error)

func InstallTo

func InstallTo(scope Scope, baseDir string) (string, error)

InstallTo writes the embedded skill to the Claude Code skill location under baseDir.

func PluginDir

func PluginDir(scope Scope, baseDir string) string

func SettingsPath

func SettingsPath(scope Scope, baseDir string) string

func SkillPath

func SkillPath(scope Scope, baseDir string) string

SkillPath returns the Claude Code skill path for the given base directory. For user scope, baseDir should be the user's home directory. For project scope, baseDir should be the project root directory.

func Uninstall

func Uninstall() (string, error)

Uninstall removes the skill from the Claude Code skill location (user scope).

func UninstallFrom

func UninstallFrom(scope Scope, baseDir string) (string, error)

UninstallFrom removes the skill from the Claude Code skill location under baseDir.

func UninstallPluginFrom

func UninstallPluginFrom(scope Scope, baseDir string) (string, error)

Types

type AutoUpdateResult

type AutoUpdateResult struct {
	UpdatedSkill  bool
	UpdatedPlugin bool
}

AutoUpdateResult captures which installed components were updated to match embedded assets.

func AutoUpdateIfInstalled

func AutoUpdateIfInstalled(scope Scope, baseDir string) (AutoUpdateResult, error)

type InstallRequest

type InstallRequest struct {
	Scope   Scope
	BaseDir string
	Skill   bool
	Plugin  bool
}

type InstallResult

type InstallResult struct {
	SkillPath string
	PluginDir string

	UpdatedSkill  bool
	UpdatedPlugin bool

	Settings SettingsChange
}

func InstallAll

func InstallAll(req InstallRequest) (InstallResult, error)

type PluginStatus

type PluginStatus struct {
	Dir             string
	Installed       bool
	UpToDate        bool
	EmbeddedSHA256  string
	InstalledSHA256 string
}

PluginStatus describes the installation state of the embedded plugin.

func GetPluginStatusFor

func GetPluginStatusFor(scope Scope, baseDir string) (PluginStatus, error)

type Scope

type Scope string
const (
	ScopeUser    Scope = "user"
	ScopeProject Scope = "project"
)

type ScopeStatus

type ScopeStatus struct {
	Scope    Scope
	BaseDir  string
	Skill    SkillStatus
	Plugin   PluginStatus
	Settings SettingsStatus
}

ScopeStatus describes installation state for a specific scope.

func GetScopeStatus

func GetScopeStatus(scope Scope, baseDir string) (ScopeStatus, error)

type SettingsChange

type SettingsChange struct {
	Path     string
	Changed  bool
	Rewrote  bool
	BackupTo string
}

func EnsurePluginEnabled

func EnsurePluginEnabled(scope Scope, baseDir string) (SettingsChange, error)

func RemovePluginEnabled

func RemovePluginEnabled(scope Scope, baseDir string) (SettingsChange, error)

type SettingsStatus

type SettingsStatus struct {
	Path          string
	Exists        bool
	PluginEnabled bool
	Error         string
}

SettingsStatus describes plugin registration status for Claude Code.

func GetSettingsStatusFor

func GetSettingsStatusFor(scope Scope, baseDir string) SettingsStatus

type SkillStatus

type SkillStatus struct {
	Path            string
	Installed       bool
	UpToDate        bool
	EmbeddedSHA256  string
	InstalledSHA256 string
}

SkillStatus describes the installation state of the embedded skill.

func GetSkillStatus

func GetSkillStatus() (SkillStatus, error)

GetSkillStatus returns installation status for the Claude Code skill location (user scope).

func GetSkillStatusFor

func GetSkillStatusFor(scope Scope, baseDir string) (SkillStatus, error)

GetSkillStatusFor returns status for baseDir/scope without consulting environment.

type UninstallRequest

type UninstallRequest struct {
	Scope   Scope
	BaseDir string
	Skill   bool
	Plugin  bool
}

type UninstallResult

type UninstallResult struct {
	SkillPath string
	PluginDir string

	Settings SettingsChange
}

func UninstallAll

func UninstallAll(req UninstallRequest) (UninstallResult, error)

Jump to

Keyboard shortcuts

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