Files
kport/app.go
Ona e39a595956 Initial commit: kport - SSH Port Forwarder TUI
- Interactive TUI for SSH port forwarding
- Reads from ~/.ssh/config for host selection
- Automatic port detection on remote hosts
- Manual port forwarding option
- Graceful error handling and connection timeouts
- Built with Bubble Tea framework

Co-authored-by: Ona <no-reply@ona.com>
2025-09-25 23:57:44 +00:00

32 lines
538 B
Go

package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
)
// App represents the main application
type App struct {
model *Model
}
// NewApp creates a new application instance
func NewApp() *App {
return &App{
model: NewModel(),
}
}
// Run starts the application
func (a *App) Run() error {
// Create the Bubble Tea program
p := tea.NewProgram(a.model, tea.WithAltScreen())
// Run the program
if _, err := p.Run(); err != nil {
return fmt.Errorf("failed to run TUI application: %w", err)
}
return nil
}