Gocliselect
Lightweight menu selection library for CLI choices
Install / Use
/learn @Nexidian/GocliselectREADME
Golang CLI Select
Lightweight interactive CLI selection library

Import the package
import "github.com/nexidian/gocliselect"
Usage
Create a new menu, supplying the question as a parameter
menu := gocliselect.NewMenu("Chose a colour")
Add any number of options by calling AddItem() supplying the display text of the option
as well as the id
menu.AddItem("Red", "red")
menu.AddItem("Blue", "blue")
menu.AddItem("Green", "green")
menu.AddItem("Yellow", "yellow")
menu.AddItem("Cyan", "cyan")
To display the menu and away the user choice call Display()
choice := menu.Display()
Example
package main
import (
"fmt"
"github.com/nexidian/gocliselect"
)
func main() {
menu := gocliselect.NewMenu("Chose a colour")
menu.AddItem("Red", "red")
menu.AddItem("Blue", "blue")
menu.AddItem("Green", "green")
menu.AddItem("Yellow", "yellow")
menu.AddItem("Cyan", "cyan")
choice, err := menu.Display()
if err != nil {
fmt.Printf("Error: %v\n", err)
}
fmt.Printf("Choice: %s\n", choice)
}
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
