install

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 17 Imported by: 1 module, 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 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
	// 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) Run

func (i *Installer) Run(ctx context.Context, o Options) error

Run installs the selected components.

func (*Installer) SkillPath

func (i *Installer) SkillPath() string

SkillPath is where the Claude Code personal skill is written.

func (*Installer) Uninstall

func (i *Installer) Uninstall(ctx context.Context, o Options) error

Uninstall reverses everything recorded as managed.

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.

Jump to

Keyboard shortcuts

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