Skip to content

luislve17/scrollti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

scrollti

A small CLI tool that takes piped output and displays it in a fixed scrolling window, showing only the last N lines in-place instead of flooding your terminal.

output

Usage

some-command | scrollti -n 10

Build

gcc -Wall -o scrollti scrollti.c

Install

sudo mv scrollti /usr/local/bin/scrollti

Options

Flag Default Description
-n, --lines 10 Number of lines to show in the window
-highlight <regex> Highlight matching text using a regex
-hcolor <color> green Highlight color (green, red, yellow)

Examples

Basic scrolling

make | scrollti -n 15

Highlight matches

make | scrollti -n 15 -highlight "error"

Highlight with color

make | scrollti -n 15 -highlight "warning|error" -hcolor yellow

Demo

for i in $(seq 1 100); do
  echo "STEP $i processing..."
  sleep 0.02
done | scrollti -n 10 -highlight "STEP [0-9]+" -hcolor green

Notes

  • Designed for streaming logs and command output
  • Works best with line-buffered input
  • Output from parallel processes (e.g. Docker/Podman builds) may appear interleaved
  • Keeps memory bounded by a fixed internal limit

License

MIT

About

Tiny tool to make stdout scroll

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages