Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port

Tabouli

Information

Tabouli is a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port. It supports command history, shortcuts, and Test Automation that allows you to automatically send commands defined in your test file.

Tabouli, written in Go, is also a delicious Mediterranean dish (properly spelled Tabbouleh) and it contains the letters T, U, and I: (T)abo(U)l(I)

Made @ Ovyl ovyl

Screenshot

Installation

First, enable golang plugin:
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git

Next, install latest:
asdf install golang latest

Lastly, Reshim:
asdf reshim golang

Note: We use asdf to manage golang installations below, but feel free to use whatever method you like.

Running From Source

Start by installing dependencies:
go get

Then run the TUI from Source:
go run main.go tui /dev/tty.usbserial-2111430

Running A Binary

Create the binary:
go build -o bin/tabouli main.go

Run the binary:
tabouli tui /dev/tty.usbserial-2111430
If you are running from a binary, make sure that you place your test files and the default file in /bin folder along with your binary.

Example

Usage

Command History

The TUI supports a command history. Simply hit the up arrow just like a normal terminal.

Shortcuts

Currently the Commands and Test Files are invokable via auto-assigned shortcut. Simply make sure that the appropriate window has focus for the shortcut to work.
The shortcut is designated in yellow next to a command or automated test like this: (1)

Test Automation Files

The application will look resursively for test files starting with the current executable diretory. Test files must start with test_ and be of file type .yaml. For instance: test_my_quick_test.yaml will be picked up. The contents of the file should look something like this:

commands:
  - help
  - comm_test
  - gpio_set -pin 3 -level 1
  - ble_start_scan -whitelist 0
  - led -which 1 -color red

The software will parse the file and send each line (without the "-", that is for YAML file syntax).

Defaults File

Please update the defaults.yaml file to adjust your serial port connection settings and terminators/delimiters:

  • Baud Rate
  • Data Bits
  • Stop Bits
  • Parity
  • RX Terminator (indicates the end of a response from the device)
  • TX Terminator (added to the end of a commands to the device)

The terminators MUST be in double quotes in the defaults.yaml file like this: "\r\n".

Firmware Requirements

Currently in order to be able to populate the "Commands" window automatically, there is an expected format that the firmware should send back the "help" response, here is how we handle it in our firmware:

cli_lib.println("`help`                 Get help/usage for commands\n");
cli_lib.println("`comm_test`            Request communications test\n");
cli_lib.println("`switch_settings`      Get the user settings\r\n");  // Notice the last command ends in \r\n

Each command has backticks around the command, and the description is outside of the command. This is not required, it just fills out the "Commands" column. Typing in commands and Test Automation will still work just fine.

Future Work

  • Support a "wait" or "sleep" command in the Test Automation file syntax
  • Support a "headless mode" for just invoking test automation - not everyone wants a TUI.
Owner
Ovyl
Product development firm located in Nashville
Ovyl
Comments
  • Release a precompiled version

    Release a precompiled version

    I think that it would be great to have a precompiled version of this app, either available via the release page of github or in some main distro repositories (but that has some work to it). In my use case I don't intend to install the go toolchain on my system and it would be great to have a precompiled package that I can just move in my bin folder.

  • Make the TUI interactive from the beginning to list available com ports, pick serial settings, then open.

    Make the TUI interactive from the beginning to list available com ports, pick serial settings, then open.

    UI should come up with list of available com ports for a CLI, and for Logs, you can select and pick for each, or both.
    UI should read the default serial settings from the file, but also allow user to adjust if needed. If changes are made the defaults file is written to for next time. Once user makes selections the UI transitions to logs, or cli or both.

  • App does not exit gracefully when device is unplugged when logging is enabled

    App does not exit gracefully when device is unplugged when logging is enabled

    When --logs is passed in and device com port for logging is connected, unplug the device. This disconnect is not handled properly and the app does not even respond to ctrl+c to kill it. I have to kill the terminal.

  • expect and test scripts additional features

    expect and test scripts additional features

    Could also add expect functionality, where the script checks back if it received a valid response. IMO, support for "test scripts" would provide a good basis for automated on-device tests that could be performed by the CI server.

    Best, Voja

  • Support detecting Automation File changes while app is running.

    Support detecting Automation File changes while app is running.

    Currently the app loads the Automation Files on load. If you change one or add a new one, you have to re-load the app. It would be nice to detect file changes and reload them and detect new files added.

Related tags
Light weight Terminal User Interface (TUI) to pick material colors written by Go.
Light weight Terminal User Interface (TUI) to pick material colors written by Go.

mcpick Light weight Terminal User Interface (TUI) to pick material colors. You do NOT need to take your hands off the keyboard to pick colors. Getting

Dec 27, 2022
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)

podman-tui podman-tui is a Terminal User Interface to interact with the podman (

Dec 23, 2022
💼 CLI / TUI for Pocket
💼 CLI / TUI for Pocket

gocket A simple CLI (or TUI) for Pocket. Read your Pocket goodies from your comfy shell. Archive or delete multiple entries easily. Use a TUI or pipe

Aug 9, 2022
A CLI / TUI for Microsoft Teams
A CLI / TUI for Microsoft Teams

teams-cli A Command Line Interface (or TUI) to interact with Microsoft Teams Status The CLI only let you log-in and fetches your user and conversation

Dec 22, 2022
Simple command line serial terminal for the Zolatron 64

ZolaTerm Simple command line serial terminal for the Zolatron 64. Written in Go. I'm using Go routines for receiving text (so that it can be displayed

Nov 7, 2021
Handy little CLI for interacting with OCI data

oci-tool Handy little CLI for interacting with OCI data Installation go get github.com/csweichel/oci-tool I use Gitpod for developing this tool; you s

May 17, 2022
a lightweight CLI client for interacting with the Akash Network

Akash Command Center A lite weight client for communicating with the Akash Network. There are no provider, or validator bits in this project. Install

Feb 12, 2022
Buildkite-cli - Command line tool for interacting with Buildkite pipelines, builds, and more

Buildkite CLI Command line tool for interacting with Buildkite pipelines, builds

Jan 7, 2022
CLI tool for interacting with Nostr-based wikis

nwiki Command line client for the Nostr wiki. Run in container, without installation If you don't have go installed or don't like installing stuff jus

Dec 18, 2022
Lightweight CLI tool to programmatically rescale your Hetzner virtual server daily to optimize your budget spending

Lightweight CLI tool to programmatically rescale your Hetzner virtual server daily to optimize your budget spending

Nov 28, 2022
TUI process monitor written in Go
TUI process monitor written in Go

pst This is TUI process monitor written in Go. Features Monitor process's list, info, tree, open files, Kill process Support OS Mac Linux Requirements

Nov 25, 2022
a TUI for signal messenger, written in Go
a TUI for signal messenger, written in Go

siggo A terminal ui for signal-cli, written in Go. Features vim-style ux useful for quick messages or use $EDITOR to compose fancy ones emoji support,

Jan 2, 2023
A powerful little TUI framework 🏗
A powerful little TUI framework 🏗

Bubble Tea The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for si

Dec 27, 2022
Canard. A command line TUI client for the journalist RSS aggregator.
Canard. A command line TUI client for the journalist RSS aggregator.

Canard Canard. A command line TUI client for the Journalist RSS aggregator. Installation Download a binary from the releases page. Or build it yoursel

Jan 6, 2023
🧭 TUI for command navigation
🧭 TUI for command navigation

devgo a command-line launcher Install latest version curl -o- https://raw.githubusercontent.com/TheWinds/devgo/main/install.sh | bash special version

Apr 19, 2022
A terminal UI (TUI) for HashiCorp Nomad
A terminal UI (TUI) for HashiCorp Nomad

Damon - A terminal Dashboard for HashiCorp Nomad Damon is a terminal user interface (TUI) for Nomad. It provides functionality to observe and interact

Jan 6, 2023
A TUI multitool for day-to-day operations for software applications.

Bench (WIP) A TUI multitool for day-to-day operations for software applications. Lets you do common operations needed during IT work that are common e

Dec 5, 2021
🦜 Navigate github repos in a tui

goh Navigate github repos in a tui Why I am constantly refering to my github repos and repos from others for code snippets that are relevant to what I

Dec 10, 2021
A tui for playing media from a caddy fileserver

kwatch a little tui interface to play media from a caddy fileserver. options: -a: server address -u: server http username -p: server http password -o:

Aug 9, 2022