Documentation
¶
Overview ¶
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Package cli provides the command-line interface for ReleasePilot.
Index ¶
- func Cleanup()
- func Execute() error
- func ExecuteContext(ctx context.Context) error
- func IsCIMode() bool
- func IsJSONOutput() bool
- func SetVersionInfo(version, commit, date string)
- type ApproveOptions
- type BlastOptions
- type BumpOptions
- type CommandOptions
- type ComponentHealth
- type HealthOptions
- type HealthReport
- type HealthStatus
- type MetricsOptions
- type NotesOptions
- type Options
- func (o *Options) Cleanup()
- func (o *Options) IsCI() bool
- func (o *Options) IsDryRun() bool
- func (o *Options) IsJSON() bool
- func (o *Options) IsVerbose() bool
- func (o *Options) PrintError(msg string)
- func (o *Options) PrintInfo(msg string)
- func (o *Options) PrintSubtle(msg string)
- func (o *Options) PrintSuccess(msg string)
- func (o *Options) PrintTitle(msg string)
- func (o *Options) PrintWarning(msg string)
- func (o *Options) SetVersion(version, commit, date string)
- type PlanOptions
- type PublishOptions
- type Styles
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
func Cleanup()
Cleanup closes any open resources. Should be called before program exit.
func ExecuteContext ¶
ExecuteContext runs the root command with a context for graceful shutdown.
func SetVersionInfo ¶
func SetVersionInfo(version, commit, date string)
SetVersionInfo sets the version information from main.
Types ¶
type ApproveOptions ¶
type ApproveOptions struct {
CommandOptions
Edit bool
}
ApproveOptions holds options for the approve command.
type BlastOptions ¶
type BlastOptions struct {
CommandOptions
Paths []string
OutputFormat string
}
BlastOptions holds options for the blast command.
type BumpOptions ¶
type BumpOptions struct {
CommandOptions
ReleaseType string
Prerelease string
BuildMetadata string
SkipTag bool
SkipPush bool
ForceVersion string
GenerateNotes bool
UpdateChangelog bool
NoGitTag bool
NoCommit bool
}
BumpOptions holds options for the bump command.
type CommandOptions ¶
type CommandOptions struct {
*Options
}
CommandOptions holds options for a specific command. Embed this in command-specific option structs.
type ComponentHealth ¶
type ComponentHealth struct {
Name string `json:"name"`
Status HealthStatus `json:"status"`
Message string `json:"message,omitempty"`
Details map[string]string `json:"details,omitempty"`
Latency time.Duration `json:"latency_ms,omitempty"`
}
ComponentHealth represents the health of a single component.
type HealthOptions ¶
type HealthOptions struct {
CommandOptions
}
HealthOptions holds options for the health command.
type HealthReport ¶
type HealthReport struct {
Status HealthStatus `json:"status"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
Components []ComponentHealth `json:"components"`
Environment map[string]string `json:"environment,omitempty"`
}
HealthReport contains the full health check results.
type HealthStatus ¶
type HealthStatus string
HealthStatus represents the overall health status.
const ( // HealthStatusHealthy indicates all checks passed. HealthStatusHealthy HealthStatus = "healthy" // HealthStatusDegraded indicates some non-critical checks failed. HealthStatusDegraded HealthStatus = "degraded" // HealthStatusUnhealthy indicates critical checks failed. HealthStatusUnhealthy HealthStatus = "unhealthy" )
type MetricsOptions ¶
type MetricsOptions struct {
CommandOptions
}
MetricsOptions holds options for the metrics command.
type NotesOptions ¶
type NotesOptions struct {
CommandOptions
NoAI bool
OutputFile string
Template string
Format string
FromVersion string
}
NotesOptions holds options for the notes command.
type Options ¶
type Options struct {
// Version information
Version VersionInfo
// Global flags
ConfigFile string
Verbose bool
DryRun bool
JSONOutput bool
NoColor bool
LogLevel string
Model string
CIMode bool
// Runtime state
Config *config.Config
Logger *log.Logger
LogFile *os.File
Styles Styles
// I/O streams (for testing)
Stdout io.Writer
Stderr io.Writer
Stdin io.Reader
}
Options holds the CLI runtime options and dependencies. This struct encapsulates the global state for better testability and dependency injection.
func NewOptions ¶
func NewOptions() *Options
NewOptions creates a new Options instance with default values.
func (*Options) PrintError ¶
PrintError prints an error message.
func (*Options) PrintSubtle ¶
PrintSubtle prints subtle/muted text.
func (*Options) PrintSuccess ¶
PrintSuccess prints a success message.
func (*Options) PrintWarning ¶
PrintWarning prints a warning message.
func (*Options) SetVersion ¶
SetVersion sets the version information.
type PlanOptions ¶
type PlanOptions struct {
CommandOptions
FromRef string
ToRef string
ShowAll bool
Minimal bool
}
PlanOptions holds options for the plan command.
type PublishOptions ¶
type PublishOptions struct {
CommandOptions
SkipPlugins []string
OnlyPlugins []string
Force bool
}
PublishOptions holds options for the publish command.
type Styles ¶
type Styles struct {
Title lipgloss.Style
Success lipgloss.Style
Error lipgloss.Style
Warning lipgloss.Style
Info lipgloss.Style
Subtle lipgloss.Style
Bold lipgloss.Style
}
Styles holds the CLI styling configuration.
type VersionInfo ¶
VersionInfo holds version metadata.