Skip to content
tt

v0.2.1

Colored output on a terminal: bordered tables with colored headers and colorized JSON, plain when piped.

tt now prints in color when it writes to a terminal. A table comes out inside a rounded border with colored headers, and JSON output has its keys and values colorized. Pipe the output into a file or another command and it stays plain, so nothing downstream sees escape codes.

This comes from upgrading the any-cli/kit framework, whose renderer now draws tables with lipgloss. There is no change to what tt reads or to any record; only how a terminal shows it.

Control the color

Color follows the terminal by default. The --color flag overrides it:

tt user tiktok                  # colored table on a terminal
tt user tiktok --color never    # force plain
tt user tiktok --color always   # force color even through a pipe
tt user tiktok | less -R        # less shows the color with -R

A wide table now also shrinks to fit the terminal width instead of wrapping.

Install

go install github.com/tamnd/tiktok-cli/cmd/tt@latest
docker run --rm ghcr.io/tamnd/tiktok:0.2.1 --help

Every tagged version builds archives for Linux, macOS, Windows, and FreeBSD, Linux packages (deb, rpm, apk), a multi-arch GHCR image, checksums, SBOMs, and a cosign signature. The binary is pure Go, so there is nothing to install alongside it.