install

package
v0.171.0-rc.21 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 AgyHook added in v0.171.0

func AgyHook(exe string) json.RawMessage

AgyHook is the named hook entry install writes under project.Name in agy's hooks.json (~/.gemini/config/hooks.json).

func AgySkillsDir added in v0.171.0

func AgySkillsDir(stateDir string) string

AgySkillsDir is the directory under stateDir where install writes the embedded skills that ~/.gemini/config/skills.json points at.

func AgySkillsEntry added in v0.171.0

func AgySkillsEntry(skillsDir string) json.RawMessage

AgySkillsEntry is the JSON object install adds to the "entries" list of agy's skills.json (~/.gemini/config/skills.json).

func CheckAgyHooks added in v0.171.0

func CheckAgyHooks(path, exe, home string) string

CheckAgyHooks checks that agy's hooks.json at path holds the PreToolUse entry for project.Name (running exe when exe is non-empty); it returns a one-line finding for `beekeeper doctor`, or "" when healthy or path is empty.

func CheckAgySkills added in v0.171.0

func CheckAgySkills(path, stateDir, home string) string

CheckAgySkills checks that agy's skills.json at path registers AgySkillsDir(stateDir) and that the skill files there match what this binary embeds. It returns a one-line finding for `beekeeper doctor`, or "" when healthy or path is empty.

func Install

func Install(ctx context.Context, e Env) error

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.

func Uninstall

func Uninstall(ctx context.Context, e Env, purge bool) error

Uninstall removes what install wrote and nothing else: a file changed since is kept. A path that is the person's symlink stays: a target install wrote through it goes, its unit stopped without disabling it. Config and state stay unless purge.

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, AgyHooks agy's
	// user hooks file (~/.gemini/config/hooks.json; empty when agy is
	// not installed), AgySkills agy's user skills manifest
	// (~/.gemini/config/skills.json; empty when agy is not installed),
	// Config beekeeper's config file, StateDir its state directory (the
	// manifest's).
	Settings, AgyHooks, AgySkills, 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.

func Hooks

func Hooks(exe string) []Hook

Hooks are the entries install adds for the binary exe: the guard before every tool call it rewrites or refuses, the permission requests of the agents beekeeper starts, the value scan of every tool result, and the agent shell's prelude at every session's start.

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"`
	// AgyHook is the entry install added under project.Name in AgyHooks;
	// AgyHooksCreated says it created the file.
	AgyHook         json.RawMessage `json:"agyHook,omitempty"`
	AgyHooksCreated bool            `json:"agyHooksCreated,omitempty"`
	// AgySkills is the entry install added under "entries" in AgySkills;
	// AgySkillsDir is the directory of embedded skills it points at;
	// AgySkillsEntries says install created the "entries" key, and
	// AgySkillsCreated says it created the file.
	AgySkills        json.RawMessage `json:"agySkills,omitempty"`
	AgySkillsDir     string          `json:"agySkillsDir,omitempty"`
	AgySkillsEntries bool            `json:"agySkillsEntries,omitempty"`
	AgySkillsCreated bool            `json:"agySkillsCreated,omitempty"`
}

Manifest is what install wrote, read by the next install and uninstall.

Jump to

Keyboard shortcuts

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