timo-reymann / bash-tui-toolkit

Toolkit to create simple Terminal UIs using plain bash builtins
Apache License 2.0
41 stars 3 forks source link
bash tui

Bash TUI Toolkit

LICENSE CircleCI GitHub Release Renovate pre-commit GitHub Downloads (all assets, all releases)


Toolkit to create interactive and shiny terminal UIs using plain bash builtins

Features

Requirements

Installation

Download and include in your scripts

  1. Download the bundle (entire lib) or single compoennt from releases
  2. Source the bundle in your script or embed, e.g.
    source ./lib/bundle.bash

    or simply copy it into your script.

Source directly from release

Note that this is not a recommended approach and only intended for quick testing or trying out another version.

  1. Choose the bundle in the version you want to use from the available releases on the gh-pages branch.
  2. Source it to your script on runtime:
    1. Using wget
      source <(wget -qO- https://bash-tui-toolkit.timo-reymann.de/latest/bundle.bash)
    2. Using curl
      source <(curl -qsS https://bash-tui-toolkit.timo-reymann.de/latest/bundle.bash)

Usage

For a list of available modules and their documentation please check the docs/modules folder

For a complete playground demo check test.sh.

Motivation

Providing a clean bash UI sometimes becomes a mess and interactivity is hard to achieve especially when it should be portable.

The target is to provide a simple-to-use toolkit that can be dropped into any bash script and is compatible no matter the target system.

Documentation

Contributing

I love your input! I want to make contributing to this project as easy and transparent as possible, whether it's:

To get started please read the Contribution Guidelines.

Development

Requirements

Build

make build

Update documentation

To update the module documentation you just need to run

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

Credits

Alternatives