T3(1)

πŸ“¦
version 1.1.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… T3(1) β€” the gen z tee glow-up

ok so this is the manual page for t3, a User Command, and bestie it is not your average tee. it's the next generation tee with colorized output streams and precise time stamping. buckle up πŸŽ€


✨ NAME ✨

t3 β€” next generation tee with colorized output streams and precise time stamping. literally tee but make it iconic πŸ’…


🌸 SYNOPSIS 🌸

t3 [OPTION] FILE -- COMMAND ARGS ...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe: t3 parses the stdout and stderr streams of a command, and writes colorized, precisely time-stamped versions of both streams to the calling process's own stdout and stderr streams, and to the filename you gave it. so in that respect, tee is to t3 what perl's IPC::Open2() function is to IPC::Open3() β€” it keeps distinct handles for each of the stdout and stderr streams. no merging, no mashup, they stay separate, periodt πŸ‘‘

how does it actually do it? it creates pipes for parsing the stdout and stderr streams before invoking the provided command with its output redirected to these pipes. then it forks independent processes that work in parallel to timestamp the lines of output coming from both streams, while the parent process reassembles and writes colorized + timestamped renditions both to the provided filename and to its own stdout and stderr streams. it's giving main character energy with a whole little team behind it 🫢


πŸ’– OPTIONS πŸ’–

invoke provided command and write its colorized, precise time-stamped output both to the provided file and to stdout/err.

  • -l, --light β€” use color scheme suitable for light backgrounds β˜€οΈ
  • -d, --dark β€” use color scheme suitable for dark backgrounds πŸŒ™
  • -b, --bold β€” highlight stderr in bold text (with no color)
  • -p, --plain β€” disable all timestamps, ANSI color and highlighting. just raw vibes, ngl
  • -f, --forcecolor β€” enforce the use of color when not writing to a TTY (yes, even into a file, she commits)
  • -o, --outcolor C β€” set the ANSI escape sequence used to color stdout
  • -e, --errcolor C β€” set the ANSI escape sequence used to color stderr
  • -t, --ts β€” enable timestamps in all outputs ⏰
  • -r, --relative β€” display timestamps as relative offsets from start time (implies --ts)
  • -a, --append β€” append to the log file instead of overwriting it
  • -i, --ignore-interrupts β€” ignore interrupt signals (finish flushing output on Ctrl+C)
  • --output-error[=MODE] β€” set behavior on a write error. MODE is one of: warn, warn-nopipe, exit, exit-nopipe. a bare --output-error means warn; with no --output-error, t3 exits on a broken pipe and warns on other write errors.
  • -h, --help β€” print this help message
  • -v, --version β€” print version string
  • --debug β€” enable debugging πŸ”

🧚 TEE COMPATIBILITY 🧚

the --append, --ignore-interrupts, and --output-error options take their names and broad meaning from tee(1). respectful queen behaviour, honestly 🌈

  • --append opens the log file for appending instead of truncating it, so output accumulates across successive invocations against the same file.
  • --ignore-interrupts makes t3 and its timestamp worker processes ignore SIGINT; the wrapped command keeps the default disposition, so a SIGINT (e.g. Ctrl+C) still interrupts the command while t3 drains and flushes its final output before exiting, rather than being torn down mid-flush. she finishes her sentence before she leaves, always πŸŽ€
⚠️ note that t3's -p is --plain, not tee's pipe-mode flag; the pipe-aware write-error behavior is reached through --output-error=...-nopipe. don't get it twisted bestie

πŸ”₯ WRITE ERRORS πŸ”₯

the --output-error option mirrors tee(1) and controls what t3 does when a write to one of its outputs fails.

  • warn diagnoses every write error and continues
  • warn-nopipe diagnoses errors except on broken pipes
  • exit exits on any write error
  • exit-nopipe exits on any write error except a broken pipe

when --output-error is not given, the default is to exit immediately on a broken-pipe error and to diagnose other write errors.

once a particular output has failed, t3 stops writing to it but keeps writing to the remaining outputs β€” so --output-error=warn-nopipe preserves the complete log file even when a downstream consumer of t3's own stdout or stderr closes early. she's resilient like that πŸ’œ

when a write error is fatal (the exit or exit-nopipe modes, or the default broken-pipe case), t3 closes the log file cleanly and exits with a failure status. that failure status replaces the wrapped command's own exit status, so a non-zero exit from t3 may indicate either that the command failed or that writing its output did. yes, both things. rude but true 😭


πŸ’€ BUGS πŸ’€

lines are reassembled in full regardless of length, growing the internal buffer as needed up to a generous cap (16 MiB). a single line longer than that cap is forwarded in cap-sized pieces. no data is lost, but each piece is emitted as its own output line β€” with its own newline, timestamp, and color reset β€” so one input line longer than the cap appears as several lines in the output. not me splitting your line into a whole thread πŸ™ˆ

this program is specifically designed for processing line-buffered text terminal output, so unlike tee it is not suitable for processing binary data streams. fr fr keep your binaries away from her πŸ“


πŸ‘‘ AUTHOR πŸ‘‘

written by Michael Brantley. we stan 🫢


⭐ SEE ALSO ⭐

tee(1)


ok that's the whole page, bestie β€” you're basically a t3 expert now, iykyk 🌸 and for the record: this is t3 version 1.1.0, dated January 1980 (yes really), and it's the T3(1) User Commands manual, so go forth and timestamp everything βœ¨πŸ’–

πŸ“¦ where this page comes from