tui-tools

tui-template

A working skeleton for a new tui-tools tool

unreleasedtemplateMIT
The list: the four bands every tool in the family draws
The list: the four bands every tool in the family draws

The starting point for a new tool in the family. Press Use this template, rename it, replace one package, and you have a tool that looks and behaves like the rest.

It is not a pile of TODOs: it is a working tool. It lists the files in a directory and can update a file's timestamp, which is deliberately trivial — what matters is the shape around it, and that shape is already correct: the action table that generates the key map, the help screen and the confirm dialog; the backend interface with a real and a fake implementation; --demo; CI; and GoReleaser.

This tool.json is itself the example. It is a valid manifest, validated against the schema on every CI run, and the values are the ones you replace.

Keys

KeyAction
tTouch the selected file
/Filter the list
r / ctrl+rRe-read the directory
?Help
qQuit

Press ? inside the tool for the full help screen, which is generated from the same action table as the key map.

Compatibility

This tool is a face on the program below, so its version matters.Tested is not a claim: a version lands there only after the tool's own suite passed against it on a real machine in the lab, and the run is kept as evidence in the repository. At startup the tool probes the backend once and says what it found in its header — a version nobody has run against is shown as(untested) in the warning colour, one older than the minimum as (below minimum) in the error colour. Neither stops it: the backend still refuses what it cannot do, in its own words.

coreutils

touch ≥ 8.0
Binary
touch
Minimum
8.0
Probed with
touch --version
Tested
No recorded run yet. The tool still runs and reports the version it found as untested.

Needs a version this new

  • no-dereferencesince 8.1

What changes on older versions

  • coreutils <8.1

    touch -h is missing, so the timestamp of a symlink is set on its target instead of on the link

Install

From source · tui-template
$ git clone https://github.com/tui-tools/tui-template
  cd tui-template && make demo

Or press "Use this template" on GitHub, which is the point of it.

What it can do to your machine

  • Preview, then confirm

    Every change is shown as an exact command line and confirmed before it runs. The dialog and the runner receive the same value, so the preview cannot drift from what executes.

  • Escalates for actions

    Only the touch action escalates, and only when the configured prefix is non-empty. Listing a directory is an ordinary read. Replace this sentence with what your own tool escalates for.

  • No daemon, no state of its own

    Nothing keeps running after you quit, and nothing is installed to run later. The system is the source of truth; the tool re-reads it after every change.

  • No network access

    The tool opens no network connection of its own. No telemetry, no update check, no phone home.

  • Static binary

    Released statically linked, with no runtime dependencies to install.

  • Releases are not signed yet

    Releases carry SHA-256 checksums but no signature. Verify the checksum, and read this as the open item it is.

Reporting

Report a security issue privately, through GitHub's private vulnerability reporting on the repository's Security tab. The family-wide policy, and what counts as in scope, is on the security page.