Documentation
¶
Overview ¶
Package install sets up git aliases, shell completion (with git integration), agent MCP registration and the optional Claude Code skill, and removes exactly what it installed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SkillContent ¶
func SkillContent() string
SkillContent exposes the embedded skill (docs/tests).
Types ¶
type Installer ¶
type Installer struct {
Git *git.Client
Runner exec.Runner
// Exe is the absolute path of the git-stack binary for agent registration.
Exe string
Env shell.Env
// CodexHome is Codex's config directory ($CODEX_HOME); empty means
// ~/.codex.
CodexHome string
// CobraScript generates cobra's completion script for a shell.
CobraScript func(sh shell.Shell) (string, error)
// Prompter is nil when non-interactive.
Prompter app.Prompter
// Report receives the human readable report (the CLI passes ui.Reporter).
Report Report
// Agents overrides the agent list (tests).
Agents []agents.Agent
}
Installer performs the work.
func (*Installer) CodexSkillPath ¶ added in v0.3.1
CodexSkillPath is where the Codex user skill is written.
func (*Installer) Refresh ¶ added in v0.3.1
Refresh brings what an earlier install set up in line with this binary, without prompting: `git stack update` runs it with the new binary once the swap is done. It only touches what is already there (aliases and files recorded as managed, agent registrations that exist) and only reports what it changed; when nothing changed it prints nothing.
Aliases this version adds are installed when the aliases were; an alias you have set to something else is left alone. A completion file or skill is only rewritten while it is still ours.
type Options ¶
type Options struct {
Aliases bool
Completion bool
Agents bool
// Skill is nil to ask (or skip when non-interactive), otherwise explicit.
Skill *bool
Shells []shell.Shell
DryRun bool
Force bool
}
Options selects what to install.
type Report ¶
type Report interface {
Success(format string, args ...any)
Info(format string, args ...any)
Warn(format string, args ...any)
}
Report is where the installer's lines go; see docs/style.md. Info lines are the table of what was (or would be) done, Warn is for dry runs and things that were skipped or kept, Success closes a run.