bootstrap

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 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"
	CursorSessionHookKey = "cursor_session_hook"
)

Option keys as constants for comparison

Variables

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

AnalyticsHook is the Claude Code PostToolUse hook option for usage tracking. Integrates with Claude Code's native PostToolUse hook in ~/.claude/settings.json.

View Source
var CursorBeforeSubmitHook = Option{
	Key:         CursorSessionHookKey,
	Description: "Cursor beforeSubmitPrompt hook - Auto-update assets once per conversation",
	Prompt:      "Install hook? (recommended)",
	Default:     true,
	DeclineNote: "Without this hook, you'll need to run 'sx install' manually.",
}

CursorBeforeSubmitHook is the Cursor hook option for auto-update. Integrates with Cursor's beforeSubmitPrompt hook in ~/.cursor/hooks.json. Runs once per conversation (tracked via conversation IDs).

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

SessionHook is the Claude Code SessionStart hook option for auto-update. Integrates with Claude Code's native SessionStart hook in ~/.claude/settings.json.

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