initui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadCompleteMsg added in v0.2.0

type DownloadCompleteMsg struct {
	RepoPath string
}

DownloadCompleteMsg signals completion of the download repo stage. This message carries the repository path to the parent InitModel.

type DownloadErrorMsg added in v0.2.0

type DownloadErrorMsg struct {
	Err error
}

DownloadErrorMsg signals an error during the download repo stage. This message carries the error to the parent InitModel.

type DownloadRepoModel added in v0.2.0

type DownloadRepoModel struct {
	// contains filtered or unexported fields
}

func NewDownloadRepoModel added in v0.2.0

func NewDownloadRepoModel(
	template string,
	directory string,
	bluelinkStyles *stylespkg.Styles,
	git git.Git,
) *DownloadRepoModel

func (DownloadRepoModel) Init added in v0.2.0

func (m DownloadRepoModel) Init() tea.Cmd

func (DownloadRepoModel) Update added in v0.2.0

func (m DownloadRepoModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (DownloadRepoModel) View added in v0.2.0

func (m DownloadRepoModel) View() string

type InitGitRepoCompleteMsg added in v0.2.0

type InitGitRepoCompleteMsg struct{}

InitGitRepoCompleteMsg signals completion of the git init step.

type InitModel

type InitModel struct {
	Error error
	// contains filtered or unexported fields
}

func NewInitApp

func NewInitApp(
	initialState InitialState,
	bluelinkStyles *stylespkg.Styles,
	gitService git.Git,
	preparer project.Preparer,
	headless bool,
	headlessWriter io.Writer,
) (*InitModel, error)

func (InitModel) Init

func (m InitModel) Init() tea.Cmd

func (InitModel) Update

func (m InitModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (InitModel) View

func (m InitModel) View() string

type InitialState

type InitialState struct {
	Template                 string
	IsDefaultTemplate        bool
	ProjectName              string
	BlueprintFormat          string
	IsDefaultBlueprintFormat bool
	NoGit                    *bool
	IsDefaultNoGit           bool
	Directory                string
	SkipPrompts              bool
}

InitialState is the initial state for the init TUI app to initialise a new project.

type InputDirectoryCompleteMsg added in v0.2.0

type InputDirectoryCompleteMsg struct {
	Directory string
}

InputDirectoryCompleteMsg signals completion of the directory input stage. This message carries the directory value to the parent InitModel.

type InputDirectoryInitialValues added in v0.2.0

type InputDirectoryInitialValues struct {
	Directory string
}

InputDirectoryInitialValues holds the initial values for the directory input passed from InitialState.

type InputDirectoryModel added in v0.2.0

type InputDirectoryModel struct {
	// contains filtered or unexported fields
}

InputDirectoryModel handles the directory input stage where users provide the directory for the project.

func NewInputDirectoryModel added in v0.2.0

func NewInputDirectoryModel(
	initialValues InputDirectoryInitialValues,
	projectName string,
	bluelinkStyles *stylespkg.Styles,
) *InputDirectoryModel

NewInputDirectoryModel creates a new InputDirectoryModel with the given initial values.

func (InputDirectoryModel) Init added in v0.2.0

func (m InputDirectoryModel) Init() tea.Cmd

func (InputDirectoryModel) Update added in v0.2.0

func (m InputDirectoryModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (InputDirectoryModel) View added in v0.2.0

func (m InputDirectoryModel) View() string

type InputFormCompleteMsg

type InputFormCompleteMsg struct {
	ProjectName     string
	BlueprintFormat string
	NoGit           bool
}

InputFormCompleteMsg signals completion of the input form stage. This message carries all the form values to the parent InitModel.

type InputFormInitialValues

type InputFormInitialValues struct {
	ProjectName              string
	BlueprintFormat          string
	IsDefaultBlueprintFormat bool
	NoGit                    *bool
	IsDefaultNoGit           bool
	SkipPrompts              bool
}

InputFormInitialValues holds the initial values for the input form passed from InitialState.

type InputFormModel

type InputFormModel struct {
	// contains filtered or unexported fields
}

InputFormModel handles the input form stage where users provide project name, blueprint format, and git initialization preference.

func NewInputFormModel

func NewInputFormModel(
	initialValues InputFormInitialValues,
	bluelinkStyles *stylespkg.Styles,
) *InputFormModel

NewInputFormModel creates a new InputFormModel with the given initial values.

func (InputFormModel) Init

func (m InputFormModel) Init() tea.Cmd

func (InputFormModel) Update

func (m InputFormModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (InputFormModel) View

func (m InputFormModel) View() string

type PrepareCompleteMsg added in v0.2.0

type PrepareCompleteMsg struct{}

PrepareCompleteMsg signals completion of the prepare project stage.

type PrepareErrorMsg added in v0.2.0

type PrepareErrorMsg struct {
	Err error
}

PrepareErrorMsg signals an error during the prepare project stage.

type PrepareProjectModel added in v0.2.0

type PrepareProjectModel struct {
	// contains filtered or unexported fields
}

func NewPrepareProjectModel added in v0.2.0

func NewPrepareProjectModel(
	projectName string,
	blueprintFormat string,
	noGit bool,
	directory string,
	bluelinkStyles *stylespkg.Styles,
	git git.Git,
	preparer project.Preparer,
) *PrepareProjectModel

func (PrepareProjectModel) Init added in v0.2.0

func (m PrepareProjectModel) Init() tea.Cmd

func (PrepareProjectModel) Update added in v0.2.0

func (m PrepareProjectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (PrepareProjectModel) View added in v0.2.0

func (m PrepareProjectModel) View() string

type RemoveGitHistoryCompleteMsg added in v0.2.0

type RemoveGitHistoryCompleteMsg struct{}

RemoveGitHistoryCompleteMsg signals completion of the remove git history step.

type RemoveMaintainerFilesCompleteMsg added in v0.2.0

type RemoveMaintainerFilesCompleteMsg struct{}

RemoveMaintainerFilesCompleteMsg signals completion of the remove maintainer files step.

type SelectBlueprintFormatCompleteMsg added in v0.2.0

type SelectBlueprintFormatCompleteMsg struct{}

SelectBlueprintFormatCompleteMsg signals completion of the blueprint format selection step.

type SelectTemplateModel

type SelectTemplateModel struct {
	// contains filtered or unexported fields
}

func NewSelectTemplateModel

func NewSelectTemplateModel(
	bluelinkStyles *stylespkg.Styles,
	autoSelect bool,
) (*SelectTemplateModel, error)

func (SelectTemplateModel) Init

func (m SelectTemplateModel) Init() tea.Cmd

func (SelectTemplateModel) Update

func (m SelectTemplateModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SelectTemplateModel) View

func (m SelectTemplateModel) View() string

type SelectTemplateMsg

type SelectTemplateMsg struct {
	Template string
}

type SubstitutePlaceholdersCompleteMsg added in v0.2.0

type SubstitutePlaceholdersCompleteMsg struct{}

SubstitutePlaceholdersCompleteMsg signals completion of the placeholder substitution step.

Jump to

Keyboard shortcuts

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