lima-vm / lima

Linux virtual machines, with a focus on running containers
https://lima-vm.io/
Apache License 2.0
15.09k stars 590 forks source link

User interface library "survey" has been archived #1881

Open afbjorklund opened 1 year ago

afbjorklund commented 1 year ago

Description

This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

https://github.com/AlecAivazis/survey/commit/160123ed7175f77bc8625b59c44b8dc03f5333e3

Might want to look for a replacement, or use a different / maintained fork of the library.

If someone else wants to take over maintainence, please reach out


https://github.com/AlecAivazis/survey/network

    github.com/AlecAivazis/survey/v2 v2.3.7

https://github.com/AlecAivazis/survey#readme

⚠️ This project is no longer maintained. For an alternative, please check out: https://github.com/charmbracelet/bubbletea ⚠️

afbjorklund commented 9 months ago

Here is a small test program, to compare the text user interface frameworks:

package main

import (
    "fmt"

    "github.com/lima-vm/lima/pkg/uiutil"
)

func main() {
    ok, err := uiutil.Confirm("Everything ok?", true)
    if err != nil {
        panic("error")
    }
    fmt.Printf("%v\n", ok)

    options := []string{"one", "two", "three"}
    ans, err := uiutil.Select("Favorite number?", options)
    if err != nil {
        panic("error")
    }
    fmt.Printf("%v\n", ans)
}

survey

https://github.com/AlecAivazis/survey

35 lines of code (d1f546cfb12e6de71f13ca9de3d72b031a1de1fc)

lima-uiutil-survey

bubbletea (+bubbles)

https://github.com/charmbracelet/bubbletea

158 lines of code (76b4d9a9cb607a97c17c41f0e6092fbe4cd20268)

lima-uiutil-bubbletea

afbjorklund commented 5 months ago

New library in 2023: https://github.com/charmbracelet/huh

Slightly more suitable interface elements, compared with above:

huh-confirm

huh-select