package tui import ( "github.com/rivo/tview" ) func StartTUI() { app := tview.NewApplication() form := tview.NewForm(). AddInputField("User", "", 20, nil, nil). AddInputField("Host", "", 20, nil, nil). AddInputField("Port", "22", 5, nil, nil). AddPasswordField("Password", "", 20, '*', nil). AddInputField("Private Key", "", 20, nil, nil). AddButton("Connect", func() { // Handle SSH connection logic }). AddButton("Quit", func() { app.Stop() }) form.SetBorder(true).SetTitle("SSH Connection").SetTitleAlign(tview.AlignLeft) if err := app.SetRoot(form, true).Run(); err != nil { panic(err) } }