73 lines
5.8 KiB
Markdown
73 lines
5.8 KiB
Markdown
bash-tui-toolkit
|
|
===
|
|
[](https://pre-commit.com/)
|
|
[](https://dl.circleci.com/status-badge/redirect/gh/timo-reymann/bash-tui-toolkit/tree/main)
|
|
[](https://renovatebot.com)
|
|
|
|
Toolkit to create simple Terminal UIs using plain bash builtins
|
|
|
|
## Goals
|
|
- provide a simple and clear default set of elements to use creating an interactive terminal UI
|
|
- be clean and minimalistic
|
|
- zero dependencies to be installed
|
|
- parts can be used separately
|
|
|
|
## Install
|
|
1. Download the bundle (entire lib) or single compoennt from [releases](https://github.com/timo-reymann/bash-tui-toolkit/releases)
|
|
2. Source the bundle in your script or embed
|
|
|
|
## Documentation
|
|
For a list of available modules and their documentation please check the [docs/modules](./docs/modules) folder
|
|
|
|
## Tested with
|
|
|
|
> Since there are some weird combinations/side effects based on the platform you might use there are different side effects that might occur
|
|
>
|
|
> If you use it on a different platform successfully please create a PR to add a item here :)
|
|
|
|
| OS | Version of OS | Terminal emulator | Bash Major Version | Works
|
|
| :------ | :------------ | :---------------- | :----------------- | :-----
|
|
| Ubuntu | 20 | Tilix | 4 | ✔️
|
|
| Ubuntu | 20 | xterm | 4 | ✔️
|
|
| Ubuntu | 22 | Tilix | 5 | ✔️
|
|
| Alpine | 3 | n/a | 5 | ✔️
|
|
| MacOS | Monterey | iTerm | 3 | ✔️
|
|
| MacOS | Monterey | iTerm2 | 3 | ✔️
|
|
| Windows | 10 | Windows Terminal | 4 | ✔️
|
|
| Windows | 10 | Git Bash | 4 | ✔️
|
|
|
|
<!--
|
|
if you encounter a platform where there are problems feel free to add works with ❌
|
|
-->
|
|
|
|
## Development
|
|
|
|
### Requirements
|
|
- bash 3+
|
|
- docker 19+
|
|
- GNU make
|
|
|
|
## Generate documentation
|
|
To update the module documentation you just need to run
|
|
|
|
```sh
|
|
make generate-docs
|
|
```
|
|
|
|
This builds the documentation inside a docker container and updates the
|
|
repo locally. Afterwards just commit the docs with your code changes
|
|
|
|
## Build
|
|
To combine the script(s) you just need to run
|
|
|
|
```sh
|
|
make build
|
|
```
|
|
|
|
The combined artifacts can be found in `dist/`
|
|
|
|
## Alternatives
|
|
- [kahkhang/Inquirer.sh](https://github.com/kahkhang/Inquirer.sh) - List, Checkbox and Text Input with more advanced
|
|
validation
|
|
|