Documentation
¶
Index ¶
- Variables
- func GetLocalFilesForBrowser(path string) ([]transfer.FileInfo, error)
- func NewAddForm(hostname string, styles Styles, width, height int, configFile string) *addFormModel
- func NewEditForm(hostName string, styles Styles, width, height int, configFile string) (*editFormModel, error)
- func NewFileSelector(title string, styles Styles, width, height int) (*fileSelectorModel, error)
- func NewFileSelectorFromBase(title string, styles Styles, width, height int, baseConfigFile string) (*fileSelectorModel, error)
- func NewHelpForm(styles Styles, width, height int) *helpModel
- func NewInfoForm(hostName string, styles Styles, width, height int, configFile string) (*infoFormModel, error)
- func NewK8sAddForm(styles Styles, width, height int) *k8sAddFormModel
- func NewK8sEditForm(hostName string, styles Styles, width, height int) (*k8sEditFormModel, error)
- func NewMoveForm(hostName string, styles Styles, width, height int, configFile string) (*moveFormModel, error)
- func NewPortForwardForm(hostName string, styles Styles, width, height int, configFile string, ...) *portForwardModel
- func NewQuickTransfer(hostName string, styles Styles, width, height int, configFile string) *quickTransferModel
- func NewRemoteBrowser(host, startPath, configFile string, mode BrowserMode, styles Styles, ...) *remoteBrowserModel
- func NewThemePicker(styles Styles, width, height int, appConfig *config.AppConfig) *themePickerModel
- func NewTransferForm(hostName string, styles Styles, width, height int, configFile string, ...) *transferFormModel
- func RunAddForm(hostname string, configFile string) error
- func RunEditForm(hostName string, configFile string) error
- func RunInfoForm(hostName string, configFile string) error
- func RunInteractiveMode(hosts []config.SSHHost, configFile, currentVersion string) error
- func RunMoveForm(hostName string, configFile string) error
- func RunQuickTransfer(hostName, configFile string) error
- func RunRemoteBrowser(host, startPath, configFile string, mode BrowserMode) (string, bool, error)
- func RunTransferForm(hostName, configFile string) error
- func RunTransferFormWithDirection(hostName, configFile string, direction transfer.Direction) error
- func SetTheme(index int)
- func SetThemeByName(name string)
- type BrowserMode
- type HostEntry
- type Model
- type PortForwardType
- type QuickTransferState
- type SortMode
- type Styles
- type Theme
- type UploadType
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
var ( PrimaryColor = "#00ADD8" SecondaryColor = "240" ErrorColor = "1" SuccessColor = "36" )
Current theme colors (set by SetTheme)
var CurrentThemeIndex = 0
CurrentThemeIndex tracks the active theme
var Themes = []Theme{
{
Name: "Default",
Primary: "#00ADD8",
Secondary: "240",
Accent: "#00ADD8",
Error: "1",
Success: "36",
Background: "",
Foreground: "",
SelectionBg: "#00ADD8",
SelectionFg: "229",
Muted: "#626262",
},
{
Name: "Dracula",
Primary: "#BD93F9",
Secondary: "#6272A4",
Accent: "#FF79C6",
Error: "#FF5555",
Success: "#50FA7B",
Background: "#282A36",
Foreground: "#F8F8F2",
SelectionBg: "#44475A",
SelectionFg: "#F8F8F2",
Muted: "#6272A4",
},
{
Name: "Nord",
Primary: "#88C0D0",
Secondary: "#4C566A",
Accent: "#81A1C1",
Error: "#BF616A",
Success: "#A3BE8C",
Background: "#2E3440",
Foreground: "#ECEFF4",
SelectionBg: "#434C5E",
SelectionFg: "#ECEFF4",
Muted: "#4C566A",
},
{
Name: "Monokai",
Primary: "#F92672",
Secondary: "#75715E",
Accent: "#A6E22E",
Error: "#F92672",
Success: "#A6E22E",
Background: "#272822",
Foreground: "#F8F8F2",
SelectionBg: "#49483E",
SelectionFg: "#F8F8F2",
Muted: "#75715E",
},
{
Name: "Solarized",
Primary: "#268BD2",
Secondary: "#586E75",
Accent: "#2AA198",
Error: "#DC322F",
Success: "#859900",
Background: "#002B36",
Foreground: "#839496",
SelectionBg: "#073642",
SelectionFg: "#93A1A1",
Muted: "#586E75",
},
{
Name: "Gruvbox",
Primary: "#FE8019",
Secondary: "#928374",
Accent: "#FABD2F",
Error: "#FB4934",
Success: "#B8BB26",
Background: "#282828",
Foreground: "#EBDBB2",
SelectionBg: "#3C3836",
SelectionFg: "#EBDBB2",
Muted: "#928374",
},
{
Name: "Tokyo Night",
Primary: "#7AA2F7",
Secondary: "#565F89",
Accent: "#BB9AF7",
Error: "#F7768E",
Success: "#9ECE6A",
Background: "#1A1B26",
Foreground: "#C0CAF5",
SelectionBg: "#283457",
SelectionFg: "#C0CAF5",
Muted: "#565F89",
},
{
Name: "Catppuccin",
Primary: "#CBA6F7",
Secondary: "#6C7086",
Accent: "#F5C2E7",
Error: "#F38BA8",
Success: "#A6E3A1",
Background: "#1E1E2E",
Foreground: "#CDD6F4",
SelectionBg: "#313244",
SelectionFg: "#CDD6F4",
Muted: "#6C7086",
},
{
Name: "One Dark",
Primary: "#61AFEF",
Secondary: "#5C6370",
Accent: "#C678DD",
Error: "#E06C75",
Success: "#98C379",
Background: "#282C34",
Foreground: "#ABB2BF",
SelectionBg: "#3E4451",
SelectionFg: "#ABB2BF",
Muted: "#5C6370",
},
{
Name: "Cyberpunk",
Primary: "#00FFFF",
Secondary: "#FF00FF",
Accent: "#FFFF00",
Error: "#FF0000",
Success: "#00FF00",
Background: "#0D0D0D",
Foreground: "#FFFFFF",
SelectionBg: "#FF00FF",
SelectionFg: "#000000",
Muted: "#808080",
},
}
Available themes
Functions ¶
func GetLocalFilesForBrowser ¶
GetLocalFilesForBrowser returns files in a directory for the file browser
func NewAddForm ¶
NewAddForm creates a new add form model
func NewEditForm ¶
func NewEditForm(hostName string, styles Styles, width, height int, configFile string) (*editFormModel, error)
NewEditForm creates a new edit form model that supports both single and multi-host editing
func NewFileSelector ¶
NewFileSelector creates a new file selector for choosing config files
func NewFileSelectorFromBase ¶
func NewFileSelectorFromBase(title string, styles Styles, width, height int, baseConfigFile string) (*fileSelectorModel, error)
NewFileSelectorFromBase creates a new file selector starting from a specific base config file
func NewHelpForm ¶
NewHelpForm creates a new help form model
func NewInfoForm ¶
func NewInfoForm(hostName string, styles Styles, width, height int, configFile string) (*infoFormModel, error)
NewInfoForm creates a new info form model for displaying host details in read-only mode
func NewK8sAddForm ¶ added in v1.0.2
NewK8sAddForm creates a new k8s add form
func NewK8sEditForm ¶ added in v1.0.2
NewK8sEditForm creates a new k8s edit form with existing host data
func NewMoveForm ¶
func NewMoveForm(hostName string, styles Styles, width, height int, configFile string) (*moveFormModel, error)
NewMoveForm creates a new move form for moving a host to another config file
func NewPortForwardForm ¶
func NewPortForwardForm(hostName string, styles Styles, width, height int, configFile string, historyManager *history.HistoryManager) *portForwardModel
NewPortForwardForm creates a new port forward form model
func NewQuickTransfer ¶
func NewQuickTransfer(hostName string, styles Styles, width, height int, configFile string) *quickTransferModel
NewQuickTransfer creates a new quick transfer model
func NewRemoteBrowser ¶
func NewRemoteBrowser(host, startPath, configFile string, mode BrowserMode, styles Styles, width, height int) *remoteBrowserModel
NewRemoteBrowser creates a new remote file browser
func NewThemePicker ¶ added in v1.0.2
func NewTransferForm ¶
func NewTransferForm(hostName string, styles Styles, width, height int, configFile string, direction transfer.Direction) *transferFormModel
NewTransferForm creates a new transfer form model
func RunAddForm ¶
RunAddForm provides backward compatibility for standalone add form
func RunEditForm ¶
RunEditForm runs the edit form as a standalone program
func RunInfoForm ¶
RunInfoForm provides a standalone info form for testing
func RunInteractiveMode ¶
RunInteractiveMode starts the interactive TUI interface
func RunMoveForm ¶
RunMoveForm provides backward compatibility for standalone move form
func RunQuickTransfer ¶
RunQuickTransfer runs the quick transfer UI
func RunRemoteBrowser ¶
func RunRemoteBrowser(host, startPath, configFile string, mode BrowserMode) (string, bool, error)
RunRemoteBrowser runs the remote browser as a standalone TUI and returns the selected path
func RunTransferForm ¶
RunTransferForm runs the transfer form as a standalone TUI
func RunTransferFormWithDirection ¶
RunTransferFormWithDirection runs the transfer form with a preset direction
func SetThemeByName ¶ added in v1.0.2
func SetThemeByName(name string)
SetThemeByName applies a theme by name
Types ¶
type BrowserMode ¶
type BrowserMode int
BrowserMode defines whether we're selecting files or directories
const ( BrowseFiles BrowserMode = iota BrowseDirectories )
type HostEntry ¶ added in v1.0.2
type HostEntry struct {
Name string
IsK8s bool
SSHHost *config.SSHHost
K8sHost *config.K8sHost
Tags []string
Hostname string // For display: SSH hostname or K8s namespace/pod
}
HostEntry represents a unified host entry that can be either SSH or K8s
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the state of the user interface
type PortForwardType ¶
type PortForwardType int
PortForwardType defines the type of port forwarding
const ( LocalForward PortForwardType = iota RemoteForward DynamicForward )
func (PortForwardType) String ¶
func (p PortForwardType) String() string
type QuickTransferState ¶
type QuickTransferState int
QuickTransferState represents the current state of the quick transfer flow
const ( QTStateChooseDirection QuickTransferState = iota QTStateChooseUploadType // File or Folder selection (only for uploads) QTStateChooseDownloadType // File or Folder selection (for downloads) QTStateSelectingLocal QTStateSelectingRemote QTStateTransferring QTStateDone )
type Styles ¶
type Styles struct {
// Layout
App lipgloss.Style
Header lipgloss.Style
// Search styles
SearchFocused lipgloss.Style
SearchUnfocused lipgloss.Style
// Table styles
TableFocused lipgloss.Style
TableUnfocused lipgloss.Style
Selected lipgloss.Style
// Info and help styles
SortInfo lipgloss.Style
HelpText lipgloss.Style
// Error and confirmation styles
Error lipgloss.Style
ErrorText lipgloss.Style
// Form styles (for add/edit forms)
FormTitle lipgloss.Style
FormField lipgloss.Style
FormHelp lipgloss.Style
FormContainer lipgloss.Style
Label lipgloss.Style
FocusedLabel lipgloss.Style
HelpSection lipgloss.Style
// Tab styles (for toggle buttons)
ActiveTab lipgloss.Style
InactiveTab lipgloss.Style
// File browser styles
DirStyle lipgloss.Style
// Theme picker styles
ThemeItem lipgloss.Style
ThemeItemSelected lipgloss.Style
ThemePreview lipgloss.Style
}
Styles struct centralizes all lipgloss styles
type Theme ¶ added in v1.0.2
type Theme struct {
Name string
Primary string
Secondary string
Accent string
Error string
Success string
Background string
Foreground string
SelectionBg string
SelectionFg string
Muted string
}
Theme represents a color theme for the application
func GetCurrentTheme ¶ added in v1.0.2
func GetCurrentTheme() Theme
GetCurrentTheme returns the current theme
type UploadType ¶
type UploadType int
UploadType determines whether to upload a file or folder
const ( UploadFile UploadType = iota UploadFolder )