Documentation
¶
Index ¶
- func EnvVarName(prefix, instanceName, suffix string) string
- func GenerateConfig(instances []serviceInstance) (string, error)
- func RunInit(w io.Writer, steps []WizardStep, fw claude.FileWriter) error
- type AgentInstallPrompter
- type DevcontainerPrompter
- type Prompter
- type ServiceType
- type ServicesPrompter
- type StackType
- type WizardStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvVarName ¶
EnvVarName returns the env var name for a given service instance and suffix.
func GenerateConfig ¶
GenerateConfig produces the YAML config from collected service instances.
func RunInit ¶
func RunInit(w io.Writer, steps []WizardStep, fw claude.FileWriter) error
RunInit orchestrates the init wizard by running each step in sequence. Follow-up hints from all steps are printed after the final "Done!" line.
Types ¶
type AgentInstallPrompter ¶ added in v0.9.0
AgentInstallPrompter abstracts TUI interactions for the agent install step.
type DevcontainerPrompter ¶ added in v0.9.0
type DevcontainerPrompter interface {
ConfirmDevcontainer() (bool, error)
ConfirmOverwriteDevcontainer() (bool, error)
ConfirmProxy() (bool, error)
SelectStacks(available []StackType) ([]StackType, error)
}
DevcontainerPrompter abstracts TUI interactions for the devcontainer step.
type Prompter ¶
type Prompter interface {
ServicesPrompter
DevcontainerPrompter
AgentInstallPrompter
}
Prompter is a composite interface embedding all step-specific prompter interfaces.
type ServiceType ¶
type ServiceType struct {
Label string // display name, e.g. "Jira"
ConfigKey string // YAML top-level key, e.g. "jiras"
DefaultURL string // empty means user must provide it
URLRequired bool // if true and DefaultURL is empty, prompt for URL
ExtraFields []string // additional fields beyond name+description, e.g. "user", "org"
EnvVars []string // env var suffixes, e.g. ["KEY"] → JIRA_{NAME}_KEY
EnvPrefix string // e.g. "JIRA"
}
ServiceType describes a configurable service with its YAML key, defaults, and env var pattern.
func ServiceRegistry ¶
func ServiceRegistry() []ServiceType
ServiceRegistry returns all available services.
type ServicesPrompter ¶ added in v0.9.0
type ServicesPrompter interface {
ConfirmOverwrite() (bool, error)
ConfirmAddTrackers() (bool, error)
SelectServices(available []ServiceType) ([]ServiceType, error)
PromptInstance(svc ServiceType) (map[string]string, error)
}
ServicesPrompter abstracts TUI interactions for the services step.
type StackType ¶ added in v0.9.0
type StackType struct {
Label string // display name, e.g. "Go"
FeatureKey string // devcontainer feature reference, e.g. "ghcr.io/devcontainers/features/go:1"
Fixed bool // always included, cannot be deselected (shown as pre-checked)
}
StackType describes a language stack that can be added as a devcontainer feature.
func StackRegistry ¶ added in v0.9.0
func StackRegistry() []StackType
StackRegistry returns all available language stacks.
type WizardStep ¶ added in v0.9.0
type WizardStep interface {
Name() string
Run(w io.Writer, fw claude.FileWriter) (hints []string, err error)
}
WizardStep is a self-contained phase of the init wizard. Run returns optional follow-up hints (e.g. install instructions) to be printed after the wizard finishes, plus any error.
func NewAgentInstallStep ¶ added in v0.9.0
func NewAgentInstallStep(p AgentInstallPrompter) WizardStep
NewAgentInstallStep creates a WizardStep that optionally installs Claude Code integration.
func NewDevcontainerStep ¶ added in v0.9.0
func NewDevcontainerStep(p DevcontainerPrompter) WizardStep
NewDevcontainerStep creates a WizardStep that optionally generates .devcontainer/devcontainer.json.
func NewServicesStep ¶ added in v0.9.0
func NewServicesStep(p ServicesPrompter) WizardStep
NewServicesStep creates a WizardStep that configures services and writes .humanconfig.yaml.