Documentation
¶
Index ¶
- Variables
- func IsMarketplaceReference(input string) bool
- func NewAddCommand() *cobra.Command
- func NewConfigCommand() *cobra.Command
- func NewInitCommand() *cobra.Command
- func NewInstallCommand() *cobra.Command
- func NewProfileCommand() *cobra.Command
- func NewRemoveCommand() *cobra.Command
- func NewReportUsageCommand() *cobra.Command
- func NewServeCommand() *cobra.Command
- func NewUninstallCommand() *cobra.Command
- func NewUpdateCommand() *cobra.Command
- func NewUpdateTemplatesCommand() *cobra.Command
- func NewVaultCommand() *cobra.Command
- func RunDefaultCommand(cmd *cobra.Command, args []string) error
- func ValidateMarketplaceReference(ref MarketplaceReference) error
- func WithPrompter(ctx context.Context, prompter Prompter) context.Context
- type AssetInfo
- type AssetStatus
- type AssetUninstallPlan
- type ClientInfo
- type ConfigInfo
- type ConfigOutput
- type DirectoryInfo
- type MarketplaceReference
- type PlatformInfo
- type PostToolUseEvent
- type Prompter
- type ScopeAssets
- type StdPrompter
- type UninstallOptions
- type UninstallPlan
- type UninstallResult
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
var ErrAssetNotFound = errors.New("asset not found")
ErrAssetNotFound is returned when no asset is found in the lock file
Functions ¶
func IsMarketplaceReference ¶ added in v0.8.0
IsMarketplaceReference checks if input matches the plugin@marketplace pattern
func NewConfigCommand ¶
NewConfigCommand creates the config command
func NewInstallCommand ¶
NewInstallCommand creates the install command
func NewProfileCommand ¶ added in v0.7.0
NewProfileCommand creates the profile command with subcommands
func NewRemoveCommand ¶
NewRemoveCommand creates the remove command
func NewReportUsageCommand ¶
NewReportUsageCommand creates the report-usage command
func NewServeCommand ¶
NewServeCommand creates the serve command
func NewUninstallCommand ¶
NewUninstallCommand creates the uninstall command
func NewUpdateCommand ¶
NewUpdateCommand creates the update command
func NewUpdateTemplatesCommand ¶
NewUpdateTemplatesCommand creates the update-templates command (hidden)
func NewVaultCommand ¶ added in v0.6.0
NewVaultCommand creates a new vault command
func RunDefaultCommand ¶
RunDefaultCommand runs the default command (install if lock file exists)
func ValidateMarketplaceReference ¶ added in v0.8.0
func ValidateMarketplaceReference(ref MarketplaceReference) error
ValidateMarketplaceReference validates that a marketplace reference doesn't contain path traversal characters
Types ¶
type AssetStatus ¶
type AssetStatus string
AssetStatus represents the installation status of an asset
const ( StatusInstalled AssetStatus = "installed" // Installed and matches lock file StatusOutdated AssetStatus = "outdated" // Installed but different version StatusNotInstalled AssetStatus = "not_installed" // In lock file but not installed StatusOrphaned AssetStatus = "orphaned" // Installed but not in lock file )
type AssetUninstallPlan ¶
type AssetUninstallPlan struct {
Name string
Version string
Type asset.Type
IsGlobal bool
Clients []string // client IDs that have this installed
LockEntry *lockfile.Asset
}
AssetUninstallPlan contains info needed to uninstall one asset
type ClientInfo ¶
type ConfigInfo ¶
type ConfigOutput ¶
type ConfigOutput struct {
Version VersionInfo `json:"version"`
Platform PlatformInfo `json:"platform"`
Config ConfigInfo `json:"config"`
Directories DirectoryInfo `json:"directories"`
Clients []ClientInfo `json:"clients"`
CurrentScope *scope.Scope `json:"currentScope,omitempty"`
Assets []ScopeAssets `json:"assets"`
RecentLogs []string `json:"recentLogs"`
}
ConfigOutput represents the full config output for JSON serialization
type DirectoryInfo ¶
type MarketplaceReference ¶ added in v0.8.0
MarketplaceReference represents a parsed plugin@marketplace reference
func ParseMarketplaceReference ¶ added in v0.8.0
func ParseMarketplaceReference(input string) MarketplaceReference
ParseMarketplaceReference splits plugin@marketplace into its parts
type PlatformInfo ¶
type PostToolUseEvent ¶
type PostToolUseEvent struct {
ToolName string `json:"tool_name"`
ToolInput map[string]any `json:"tool_input"`
}
PostToolUseEvent represents the JSON payload from Claude Code PostToolUse hook
type Prompter ¶
type Prompter interface {
Prompt(message string) (string, error)
PromptWithDefault(message, defaultValue string) (string, error)
Confirm(message string) (bool, error)
}
Prompter provides an interface for interactive prompts This abstraction allows for: 1. Easy testing via mocking 2. Future UI improvements (e.g., switching to a TUI library) without changing all call sites
type ScopeAssets ¶
type StdPrompter ¶
type StdPrompter struct {
// contains filtered or unexported fields
}
StdPrompter implements Prompter using standard I/O
func NewStdPrompter ¶
func NewStdPrompter(in io.Reader, out io.Writer) *StdPrompter
NewStdPrompter creates a new standard I/O prompter
func (*StdPrompter) Confirm ¶
func (p *StdPrompter) Confirm(message string) (bool, error)
Confirm asks a yes/no question
func (*StdPrompter) Prompt ¶
func (p *StdPrompter) Prompt(message string) (string, error)
Prompt displays a prompt and reads user input
func (*StdPrompter) PromptWithDefault ¶
func (p *StdPrompter) PromptWithDefault(message, defaultValue string) (string, error)
PromptWithDefault displays a prompt with a default value
type UninstallOptions ¶
UninstallOptions contains options for the uninstall command
type UninstallPlan ¶
type UninstallPlan struct {
Assets []AssetUninstallPlan
GitContext *gitutil.GitContext
TargetBase string // tracking base for updating tracker
}
UninstallPlan contains the complete uninstall plan
type UninstallResult ¶
UninstallResult tracks what was uninstalled
type VersionInfo ¶
Source Files
¶
- add.go
- add_config.go
- add_lockfile.go
- add_marketplace.go
- add_scope.go
- add_scope_display.go
- add_single_file.go
- commands.go
- config.go
- hooks.go
- init.go
- init_import.go
- install.go
- install_assets.go
- install_cleanup.go
- install_context.go
- install_hooks.go
- install_lockfile.go
- output.go
- profile.go
- prompter.go
- remove.go
- report_usage.go
- serve.go
- uninstall.go
- update.go
- update_templates.go
- vault.go