Documentation
¶
Overview ¶
Package cli provides command-line interface definitions using Cobra, including all subcommands and their flag definitions.
Index ¶
- func EnsureInitialized(ctx context.Context, writer io.Writer) (string, error)
- func HandlePassthrough(args []string) bool
- func HandlePassthroughWithResult(args []string, exit bool, out, errWriter io.Writer) (bool, error)
- func NewDoctorUI(out output.Output, _ output.Logger) (*tui.Runner, doctor.Handler)
- func NewRootCmd(version, commit, date string) *cobra.Command
- func NewUndoUI(out output.Output, _ output.Logger) (*tui.Runner, undo.Handler)
- type InteractiveUndoHandler
- func (h *InteractiveUndoHandler) Complete(_ bool, message string)
- func (h *InteractiveUndoHandler) IsInteractive() bool
- func (h *InteractiveUndoHandler) OnSnapshotList(_ []engine.SnapshotInfo)
- func (h *InteractiveUndoHandler) OnStep(description string, status handler.StepStatus)
- func (h *InteractiveUndoHandler) PromptConfirm(message string, defaultYes bool) (bool, error)
- func (h *InteractiveUndoHandler) SelectSnapshot(snapshots []engine.SnapshotInfo) (string, error)
- func (h *InteractiveUndoHandler) Start()
- type SimpleDoctorHandler
- type SimpleUndoHandler
- func (h *SimpleUndoHandler) Complete(_ bool, message string)
- func (h *SimpleUndoHandler) OnSnapshotList(_ []engine.SnapshotInfo)
- func (h *SimpleUndoHandler) OnStep(description string, status handler.StepStatus)
- func (h *SimpleUndoHandler) PromptConfirm(_ string, _ bool) (bool, error)
- func (h *SimpleUndoHandler) SelectSnapshot(_ []engine.SnapshotInfo) (string, error)
- func (h *SimpleUndoHandler) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureInitialized ¶
EnsureInitialized initializes stackit if not already initialized. Returns the repo root path. This is used by commands that need stackit to be initialized but want to auto-initialize for convenience.
func HandlePassthrough ¶
HandlePassthrough checks if the command should be passed through to git and executes it if so. Returns true if the command was handled (and the program should exit).
func HandlePassthroughWithResult ¶
HandlePassthroughWithResult is like HandlePassthrough but returns an error instead of exiting if exit is false.
func NewDoctorUI ¶
NewDoctorUI creates a runner and handler pair for doctor operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit. Currently returns nil runner as there's no TUI component yet.
func NewRootCmd ¶
NewRootCmd creates the root cobra command
Types ¶
type InteractiveUndoHandler ¶
type InteractiveUndoHandler struct {
common.BaseHandler
}
InteractiveUndoHandler provides interactive TUI for undo operations
func NewInteractiveUndoHandler ¶
func NewInteractiveUndoHandler(out output.Output) *InteractiveUndoHandler
NewInteractiveUndoHandler creates a new InteractiveUndoHandler
func (*InteractiveUndoHandler) Complete ¶
func (h *InteractiveUndoHandler) Complete(_ bool, message string)
Complete is called when undo finishes
func (*InteractiveUndoHandler) IsInteractive ¶
func (h *InteractiveUndoHandler) IsInteractive() bool
IsInteractive returns true for the interactive handler
func (*InteractiveUndoHandler) OnSnapshotList ¶
func (h *InteractiveUndoHandler) OnSnapshotList(_ []engine.SnapshotInfo)
OnSnapshotList is called with available snapshots
func (*InteractiveUndoHandler) OnStep ¶
func (h *InteractiveUndoHandler) OnStep(description string, status handler.StepStatus)
OnStep is called for each undo step
func (*InteractiveUndoHandler) PromptConfirm ¶
func (h *InteractiveUndoHandler) PromptConfirm(message string, defaultYes bool) (bool, error)
PromptConfirm prompts user for confirmation
func (*InteractiveUndoHandler) SelectSnapshot ¶
func (h *InteractiveUndoHandler) SelectSnapshot(snapshots []engine.SnapshotInfo) (string, error)
SelectSnapshot prompts user to select a snapshot
func (*InteractiveUndoHandler) Start ¶
func (h *InteractiveUndoHandler) Start()
Start is called at the beginning of undo
type SimpleDoctorHandler ¶
type SimpleDoctorHandler struct {
common.BaseHandler
// contains filtered or unexported fields
}
SimpleDoctorHandler provides streaming text output for doctor operations
func NewSimpleDoctorHandler ¶
func NewSimpleDoctorHandler(out output.Output) *SimpleDoctorHandler
NewSimpleDoctorHandler creates a new SimpleDoctorHandler
func (*SimpleDoctorHandler) Complete ¶
func (h *SimpleDoctorHandler) Complete(_, _, _ int)
Complete is called when doctor finishes
func (*SimpleDoctorHandler) OnCategory ¶
func (h *SimpleDoctorHandler) OnCategory(category doctor.Category)
OnCategory is called when starting a new category of checks
func (*SimpleDoctorHandler) OnCheck ¶
func (h *SimpleDoctorHandler) OnCheck(_ string, status doctor.CheckStatus, message string)
OnCheck is called for each individual check result
func (*SimpleDoctorHandler) Start ¶
func (h *SimpleDoctorHandler) Start(fix bool)
Start is called at the beginning of doctor
type SimpleUndoHandler ¶
type SimpleUndoHandler struct {
common.BaseHandler
}
SimpleUndoHandler provides streaming text output for undo operations
func NewSimpleUndoHandler ¶
func NewSimpleUndoHandler(out output.Output) *SimpleUndoHandler
NewSimpleUndoHandler creates a new SimpleUndoHandler
func (*SimpleUndoHandler) Complete ¶
func (h *SimpleUndoHandler) Complete(_ bool, message string)
Complete is called when undo finishes
func (*SimpleUndoHandler) OnSnapshotList ¶
func (h *SimpleUndoHandler) OnSnapshotList(_ []engine.SnapshotInfo)
OnSnapshotList is called with available snapshots
func (*SimpleUndoHandler) OnStep ¶
func (h *SimpleUndoHandler) OnStep(description string, status handler.StepStatus)
OnStep is called for each undo step
func (*SimpleUndoHandler) PromptConfirm ¶
func (h *SimpleUndoHandler) PromptConfirm(_ string, _ bool) (bool, error)
PromptConfirm is not supported in non-interactive mode
func (*SimpleUndoHandler) SelectSnapshot ¶
func (h *SimpleUndoHandler) SelectSnapshot(_ []engine.SnapshotInfo) (string, error)
SelectSnapshot is not supported in non-interactive mode
func (*SimpleUndoHandler) Start ¶
func (h *SimpleUndoHandler) Start()
Start is called at the beginning of undo
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package branch provides CLI commands for managing branches in a stack.
|
Package branch provides CLI commands for managing branches in a stack. |
|
Package common provides shared helper functions for CLI commands.
|
Package common provides shared helper functions for CLI commands. |
|
Package dashboard provides the interactive shippable work TUI.
|
Package dashboard provides the interactive shippable work TUI. |
|
Package integrations provides commands for managing various integrations
|
Package integrations provides commands for managing various integrations |
|
Package navigation provides CLI commands for navigating branches in a stack.
|
Package navigation provides CLI commands for navigating branches in a stack. |
|
Package shell provides shell integration for stackit.
|
Package shell provides shell integration for stackit. |
|
Package stack provides CLI commands for operating on entire stacks.
|
Package stack provides CLI commands for operating on entire stacks. |
|
merge
Package merge provides CLI commands for merging stacked PRs.
|
Package merge provides CLI commands for merging stacked PRs. |
|
Package worktree provides CLI commands for managing stackit-managed worktrees.
|
Package worktree provides CLI commands for managing stackit-managed worktrees. |