cli

package
v0.38.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright © 2025 KubeRocketAI Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	TableCyanColor      = "14"
	TableGrayColor      = "245"
	TableLightGrayColor = "241"
	TableCellWidth      = 20
	DescriptionMaxLen   = 50
	DescriptionTruncLen = 47
	NoneValue           = "None"
)

Table styling constants

Variables

This section is empty.

Functions

func CreateStyledTable added in v0.38.0

func CreateStyledTable() *table.Table

CreateStyledTable creates a lipgloss table with consistent styling

func TruncateDescription added in v0.38.0

func TruncateDescription(description string) string

TruncateDescription truncates description if it's too long

Types

type ErrorHandler

type ErrorHandler struct{}

ErrorHandler provides colorized error handling for CLI commands

func NewErrorHandler

func NewErrorHandler() *ErrorHandler

NewErrorHandler creates a new error handler with color support

func (*ErrorHandler) HandleError

func (e *ErrorHandler) HandleError(err error, message string)

HandleError prints a colorized error message and exits with code 1

func (*ErrorHandler) HandleErrorWithCode

func (e *ErrorHandler) HandleErrorWithCode(err error, message string, code int)

HandleErrorWithCode prints a colorized error message and exits with specified code

func (*ErrorHandler) PrintAgentValidationError added in v0.28.0

func (e *ErrorHandler) PrintAgentValidationError(invalidAgents []string, availableAgents []string)

PrintAgentValidationError prints enhanced agent validation errors with recovery guidance

func (*ErrorHandler) PrintError

func (e *ErrorHandler) PrintError(message string)

PrintError prints a colorized error message without exiting

func (*ErrorHandler) PrintErrorWithGuidance added in v0.28.0

func (e *ErrorHandler) PrintErrorWithGuidance(message string, guidance []string)

PrintErrorWithGuidance prints a colorized error message with recovery guidance

func (*ErrorHandler) PrintInstallationError added in v0.28.0

func (e *ErrorHandler) PrintInstallationError(err error, phase string)

PrintInstallationError prints enhanced installation errors with recovery guidance

func (*ErrorHandler) PrintTaskValidationError added in v0.28.0

func (e *ErrorHandler) PrintTaskValidationError(agentName string, invalidTasks []string, availableTasks []string)

PrintTaskValidationError prints enhanced task validation errors with specific guidance

func (*ErrorHandler) PrintWarning

func (e *ErrorHandler) PrintWarning(message string)

PrintWarning prints a colorized warning message

type OutputHandler

type OutputHandler struct{}

OutputHandler provides colorized output functions for CLI commands

func NewOutputHandler

func NewOutputHandler() *OutputHandler

NewOutputHandler creates a new output handler with color support

func (*OutputHandler) Bold added in v0.26.0

func (o *OutputHandler) Bold(text string) string

Bold returns text formatted in bold

func (*OutputHandler) Newline added in v0.26.0

func (o *OutputHandler) Newline()

Newline prints a newline character

func (*OutputHandler) PrintBlue added in v0.26.0

func (o *OutputHandler) PrintBlue(text string) string

PrintBlue prints text in blue color

func (*OutputHandler) PrintBold added in v0.26.0

func (o *OutputHandler) PrintBold(message string)

PrintBold prints text in bold

func (*OutputHandler) PrintCyan added in v0.26.0

func (o *OutputHandler) PrintCyan(text string) string

PrintCyan prints text in cyan color

func (*OutputHandler) PrintError

func (o *OutputHandler) PrintError(message string)

PrintError prints an error message with red color

func (*OutputHandler) PrintFrameworkInsights added in v0.38.5

func (o *OutputHandler) PrintFrameworkInsights(insights *validation.FrameworkInsights, issueCount int)

PrintFrameworkInsights prints comprehensive framework insights with styled output

func (*OutputHandler) PrintGreenBold added in v0.26.0

func (o *OutputHandler) PrintGreenBold(text string) string

PrintGreenBold prints text in green bold

func (*OutputHandler) PrintInfo

func (o *OutputHandler) PrintInfo(message string)

PrintInfo prints an info message with blue color

func (*OutputHandler) PrintMagenta added in v0.26.0

func (o *OutputHandler) PrintMagenta(text string) string

PrintMagenta prints text in magenta color

func (*OutputHandler) PrintProgress

func (o *OutputHandler) PrintProgress(message string)

PrintProgress prints a progress message with cyan color

func (*OutputHandler) PrintSuccess

func (o *OutputHandler) PrintSuccess(message string)

PrintSuccess prints a success message with green color

func (*OutputHandler) PrintWarning

func (o *OutputHandler) PrintWarning(message string)

PrintWarning prints a warning message with yellow color

func (*OutputHandler) PrintYellow added in v0.26.0

func (o *OutputHandler) PrintYellow(text string) string

PrintYellow prints text in yellow color

func (*OutputHandler) Printf added in v0.26.0

func (o *OutputHandler) Printf(format string, args ...any)

Printf provides formatted printing with style support

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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