Documentation
¶
Overview ¶
Package install puts beekeeper in place on a machine and takes it away again: the Claude Code hooks, the platform's standby service and memory guard, and a starter config. A manifest in the state directory records what install wrote, so uninstall removes exactly that; what install finds in place and did not write, it keeps as it is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install writes the hooks, the standby service, the memory guard and a starter config where they are missing, and updates what an earlier install wrote; a second run changes nothing.
func Starter ¶
func Starter() []byte
Starter is the example config with every key commented out: the defaults apply until a key is set.
Types ¶
type Env ¶
type Env struct {
// Exe is the absolute path of the binary the hooks and the standby
// service run.
Exe string
// Settings is Claude Code's user settings file, Config beekeeper's
// config file, StateDir its state directory (the manifest's).
Settings, Config, StateDir string
Setup platform.Setup
Spec platform.SetupSpec
// Run runs one service manager command.
Run func(ctx context.Context, argv []string) error
Out io.Writer
// DryRun prints every step and takes none.
DryRun bool
}
Env is the machine install and uninstall act on.
type Hook ¶
type Hook struct {
Event string `json:"event"`
Entry json.RawMessage `json:"entry"`
}
Hook is one entry of a hook event's list in Claude Code's settings.
type Manifest ¶
type Manifest struct {
// Files are the files install wrote and the SHA-256 of their content.
Files map[string]string `json:"files,omitempty"`
// Dirs are the directories install created.
Dirs []string `json:"dirs,omitempty"`
// Services are the definitions of the units install started: the
// standby service, the keeper's timer.
Services []string `json:"services,omitempty"`
// Service is the standby service's definition as earlier installs
// recorded it, read into Services.
Service string `json:"service,omitempty"`
// Hooks are the settings entries install added.
Hooks []Hook `json:"hooks,omitempty"`
// SettingsKeys are the settings keys install created ("hooks",
// "hooks.PreToolUse"); SettingsCreated says it created the file.
SettingsKeys []string `json:"settingsKeys,omitempty"`
SettingsCreated bool `json:"settingsCreated,omitempty"`
}
Manifest is what install wrote, read by the next install and uninstall.