package common import ( "bufio" "fmt" "os" "strings" "github.com/charmbracelet/lipgloss" ) func AskUserBool(question string) bool { switch AskUserString(fmt.Sprintf("%s (Y/N): ", question)) { case "y", "Y", "yes": return true case "n", "N", "no": return false default: return false } } func AskUserString(question string) string { promptStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("6")).Bold(true) fmt.Printf("%s %s", promptStyle.Render(">"), question) reader := bufio.NewReader(os.Stdin) input, _, _ := reader.ReadLine() return strings.TrimSpace(string(input)) }