Menu CLI tool
A very simple tool that receives a given number of options, displays them in a TUI menu and enables the selection of one of them. The
user can choose between the options through vim keys (jk
) and finally select an option through Enter
. The selected option will then
be written to stdout
.
Serve can read a given string through the -o
or --options
flag and split it into options, which by default is separated through \n
characters. Different delimiters can be chosen through
the -d
option. Additionally, serve recognizes when it is used in command chaining or piping and then proceeds to read the options from stdin
. When
reading from stdin
however, serve can currently only delimit options through newlines.
Options:
usage: serve [options]
-m, --mode mode in which serve will execute, currently only one
-o, --options options to select from
-p, --prompt menu prompt
-d, --delimiter string or char used to separate options, default is '\n'
-h, --help print usage
Example:
serve --prompt PROMPT --options "foo\nbar\nbaz"
It simply uses Go's built in libraries and the amazing tcell library. So to be able to compile the project, it is only needed to have Go
installed on your system
sudo pacman -S go
sudo apt install go
make build
: pulls necessary dependencies and builds the binarymake install
: installs it onto your system such that it is visible in $PATH (not complete)
This project is released under the MIT license 3.0. See LICENSE.
Please follow the instructions in the contributions guide at CONTRIBUTING.md.
I have a ko-fi and a buy-me-a-coffee account, so if you found this repo useful and would like to show your appreciation, feel free to do so!