Skip to content

zcag/tali

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tali

tali is a small CLI tool for live frequency tallies on a stream of lines.

Think:

any | sort | uniq -c

…but updated live as stdin comes in.

asciicast


Installation

go install github.com/zcag/tali@latest

Make sure $GOPATH/bin (or $GOBIN) is in your PATH.


Features

  • Live tally of stdin lines
  • Adapts automatically to terminal height
  • Shows only what fits on screen
  • Aggregates hidden entries as <others>
  • When the stream stops (EOF / Ctrl-C), tali prints the full, final tally.

Usage

Basic:

some_stream | tali

See most outbound connection by ip:

ss -tun \
  | awk 'NR>1 {print $5}' \
  | sed 's/:.*//' \
  | tali

See file types counted live:

find ~ -type f -name '*.*' 2>/dev/null \
  | sed 's/.*\.//' \
  | tr A-Z a-z \
  | tali

Output semantics

  • Live view

    • Small counts at the top
    • Large counts sink to the bottom
    • Hidden entries are grouped as <others>
  • Final output (on EOF / Ctrl-C)

    • Full list
    • Sorted the same way (small → large)
    • Suitable for piping or saving

Todo

  • Detect non-TTY output and skip live redraw
  • Sort options
  • Variable sample frequency
  • Limit uniq keys to keep

About

cli tool to display live tally from stdin (sort | uniq -c)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages