cmd

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is set at build time
	Version = "dev"
)

Functions

func Execute

func Execute() error

Execute runs the root command

func GetConfigFile

func GetConfigFile() string

GetConfigFile returns the config file path

func GetRootCmd

func GetRootCmd() *cobra.Command

GetRootCmd returns the root command for documentation generation

func IsInteractive added in v0.2.0

func IsInteractive() bool

IsInteractive returns true if stdin is a terminal and --yes flag is not set

func IsVerbose

func IsVerbose() bool

IsVerbose returns true if verbose mode is enabled

func IsYesMode

func IsYesMode() bool

IsYesMode returns true if --yes flag is set (CI/CD mode)

func PrintError

func PrintError(msg string, args ...interface{})

PrintError prints a formatted error message

func PrintInfo

func PrintInfo(msg string, args ...interface{})

PrintInfo prints an info message

func PrintSuccess

func PrintSuccess(msg string, args ...interface{})

PrintSuccess prints a success message

func PrintVerbose

func PrintVerbose(msg string, args ...interface{})

PrintVerbose prints a message only in verbose mode

func PrintVerboseCommand added in v0.7.0

func PrintVerboseCommand(command string)

PrintVerboseCommand prints a command in verbose mode with sensitive values masked

func PrintWarning

func PrintWarning(msg string, args ...interface{})

PrintWarning prints a warning message

func PromptSelect added in v0.2.0

func PromptSelect(message string, options []string) int

PromptSelect displays numbered options and returns the selected index Returns -1 if cancelled (user enters "0" or empty)

Types

type ServerConnection added in v0.7.0

type ServerConnection struct {
	Client  *ssh.Client
	Project *config.ProjectConfig
	Server  *config.ServerConfig
	Global  *config.GlobalConfig
}

ServerConnection holds a connected SSH client along with project and server config.

func ConnectToServer added in v0.7.0

func ConnectToServer(serverName string, opts ...ssh.ClientOption) (*ServerConnection, error)

ConnectToServer validates the server name, loads project + global config, and establishes an SSH connection. The caller must defer conn.Client.Close().

func ConnectToServerNoProject added in v0.7.0

func ConnectToServerNoProject(serverName string, opts ...ssh.ClientOption) (*ServerConnection, error)

ConnectToServerNoProject validates the server name, loads global config only, and establishes an SSH connection. Used for commands that don't require a project config (e.g., server setup, app list). The caller must defer conn.Client.Close().

Jump to

Keyboard shortcuts

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