bootstrap

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionHookKey      = "session_hook"
	AnalyticsHookKey    = "analytics_hook"
	SleuthAIQueryMCPKey = "sleuth_ai_query_mcp"
)

Option keys as constants for comparison

Variables

View Source
var AnalyticsHook = Option{
	Key:         AnalyticsHookKey,
	Description: "Analytics hook - Track skill usage for analytics",
	Prompt:      "Install analytics hooks?",
	Default:     true,
	DeclineNote: "Skill usage analytics will not be tracked.",
}

AnalyticsHook is the usage tracking hook option. Installs hooks for all detected clients (Claude Code, Copilot CLI, Cursor).

View Source
var SessionHook = Option{
	Key:         SessionHookKey,
	Description: "Session hook - Auto-update assets when sessions start",
	Prompt:      "Install session hooks? (recommended)",
	Default:     true,
	DeclineNote: "Without this hook, you'll need to run 'sx install' manually.",
}

SessionHook is the session start hook option for auto-update. Installs hooks for all detected clients (Claude Code, Copilot CLI, Cursor).

Functions

func ContainsKey

func ContainsKey(opts []Option, key string) bool

ContainsKey returns true if the options slice contains an option with the given key

Types

type MCPServerConfig

type MCPServerConfig struct {
	Name    string            // Server name (e.g., "sx")
	Command string            // Command to run
	Args    []string          // Arguments
	Env     map[string]string // Environment variables
}

MCPServerConfig contains info to install an MCP server generically

type Option

type Option struct {
	Key         string           // Unique key for config storage
	Description string           // What to show user
	Prompt      string           // Question to ask
	Default     bool             // Suggested answer
	DeclineNote string           // Note shown if declined (optional)
	MCPConfig   *MCPServerConfig // For MCP options - generic install config
}

Option describes a configurable bootstrap item

func Filter

func Filter(opts []Option, isEnabled func(key string) bool) []Option

Filter returns options where isEnabled returns true for the option's key

func SleuthAIQueryMCP

func SleuthAIQueryMCP() Option

SleuthAIQueryMCP returns the Sleuth AI query MCP server option Future: may split into multiple options to enable specific tools

Jump to

Keyboard shortcuts

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