Skip to main content

🎨 tailr

Colorized live log viewer for your terminal.

Tail files or piped stdin with automatic log-level and keyword highlighting. Zero dependencies. Works in Python 3.8+.

PyPI Python License Docker


Why tailr?

Logs are noisy. tailr makes them readable at a glance:

  • Level highlightingINFO, WARN, ERROR, FATAL, DEBUG, TRACE get distinct colors.
  • Keyword highlightingerror, failed, exception, traceback, panic pop in bright red.
  • Timestamp coloring — dates and times are dimmed so the signal stands out.
  • Live follow — watch logs grow in real time, just like tail -f.
  • Filter on the fly — regex grep, or filter by log level.
  • Zero dependencies — pure Python stdlib. No install drama, no bloat.

Install

pip install tailr

Or run without installing:

pipx run tailr --help

Via Docker:

docker run --rm ghcr.io/dsk-dev-ai/tailr --help

Usage

# Colorize a log file (last 10 lines)
tailr app.log

# Follow a growing log live
tailr -f app.log

# Follow with more history
tailr -f -n 200 app.log

# Filter by log level
tailr -l ERROR app.log

# Grep with a regex, live
tailr -f -g "kafka|redis" app.log

# Pipe anything in
docker logs -f app | tailr
kubectl logs -f pod | tailr
journalctl -f | tailr -l WARN

Options

Flag Description
-f, --follow Keep tailing appended lines (like tail -f)
-n, --lines N Show N lines from the end (default 10)
-g, --grep REGEX Only show lines matching a regex
-l, --level LVL Only show lines with this level (ERROR, WARN, …)
--version Print version

Colors

INFO      -> blue
DEBUG     -> gray
WARN      -> orange
ERROR     -> red
FATAL     -> magenta
TRACE     -> gray
keywords  -> bright red + bold
timestamps-> dim

Set NO_COLOR=1 to disable colorization, or FORCE_COLOR=1 to force it.

How it works

tailr streams lines and applies a lightweight ANSI colorizer powered by a few small regexes — no external parsing libs, no heuristics beyond the log shape. It respects isatty() to avoid spewing escape codes into pipelines.

Tests

python -m pytest

Tested on Python 3.8–3.12 via GitHub Actions.

Sponsor

Enjoy tailr? Keep it free and dependency-free by becoming a sponsor on GitHub 💜.


tailr · Colorized logs you can actually read.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tailr-1.0.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tailr-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file tailr-1.0.0.tar.gz.

File metadata

  • Download URL: tailr-1.0.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for tailr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 35c734f2a11c63e5994ac9c3d11fd90b0541657783be50ea966badc7e5b04e34
MD5 4555eab899f3b2111d4f7880f75b6a79
BLAKE2b-256 9c5087fd5bbb09fce9ec033ee5c3b677fff490dacd4f2301e7f662ffc3e995b4

See more details on using hashes here.

File details

Details for the file tailr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tailr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for tailr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c672d5888cd5a58fa7a8e6b982a4c1cfaaad211395aeaa969c38801772965b1a
MD5 d2b65cda328d9c129cf4babba7e9cb83
BLAKE2b-256 72f0b7385122aa6b125b7e30b3e7d0ab33249e074a72a5a2b20c30a010ccde97

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page