🎨 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+.
Why tailr?
Logs are noisy. tailr makes them readable at a glance:
- Level highlighting —
INFO,WARN,ERROR,FATAL,DEBUG,TRACEget distinct colors. - Keyword highlighting —
error,failed,exception,traceback,panicpop 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.
Metadata
Release files for tailr 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tailr-1.0.1.tar.gz | 7.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tailr-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / tailr-1.0.1.tar.gz
| Download URL | tailr-1.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b277b895d870bd1ac259f977f2876425d17e2572bf45b33ea556bcc9bbddfe7
|
|
BLAKE2b-256 checksum How to use checksums |
1b944c86d81652244f82c2f410b2881cbb18aae9c61f7c2f1bc53a7ff72acfc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tailr-1.0.1-py3-none-any.whl
| Download URL | tailr-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fb9134142e07921e0b00923d10d19b4ec724c89bca850e45d2477b595847b45
|
|
BLAKE2b-256 checksum How to use checksums |
b56d205b35a0e7730f898736ff330121b0feb8cd344a3589bd840ef43d3952d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for tailr 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.