hookinstall

package
v0.60.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentBoth   = "both"
	AgentClaude = "claude"
	AgentCodex  = "codex"

	DefaultTimeout = 10 * time.Second
)
View Source
const SessionStartScript = `` /* 5902-byte string literal not displayed */

Variables

This section is empty.

Functions

func DefaultClaudeConfig

func DefaultClaudeConfig() (string, error)

func DefaultCodexConfig

func DefaultCodexConfig() (string, error)

func DefaultScriptPath

func DefaultScriptPath() (string, error)

Types

type FileResult

type FileResult struct {
	Path    string `json:"path"`
	Changed bool   `json:"changed"`
	Backup  string `json:"backup,omitempty"`
}

type Options

type Options struct {
	Agent        string
	ScriptPath   string
	BinaryPath   string
	ClaudeConfig string
	CodexConfig  string
	Timeout      time.Duration
	DryRun       bool
}

func NormalizeOptions

func NormalizeOptions(opts Options) (Options, error)

type Result

type Result struct {
	Agent              string                 `json:"agent"`
	Script             FileResult             `json:"script"`
	Configs            map[string]FileResult  `json:"configs"`
	Commands           map[string]string      `json:"commands"`
	Snippets           map[string]interface{} `json:"snippets"`
	TimeoutSeconds     int                    `json:"timeout_seconds"`
	HookTimeoutSeconds int                    `json:"hook_timeout_seconds"`
	DryRun             bool                   `json:"dry_run"`
}

func Install

func Install(opts Options) (Result, error)

Jump to

Keyboard shortcuts

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