LogScope — Beautiful log viewer for the terminal
Project description
A modern CLI tool that turns boring text logs or messy JSON lines into stunning, structured, and colorful terminal outputs—complete with a live dashboard, smart highlighting, and HTML exporting.
Features that shine
- Fast & Lightweight: Tail files natively or stream huge data directly via pipes (
cat server.log | logscope). - Colored & Structured Logs: Automatically identifies
INFO,WARNING,ERROR,CRITICAL, andDEBUG, applying beautiful typography. - Universal Parser: Reads typical bracket logs (
[INFO]) and parses modern NDJSON / JSON logs out of the box (e.g., Kubernetes, Docker, OpenTelemetry). - Auto-Highlighting: Magically highlights
IPs,URLs,Dates/Timestamps,UUIDs, andE-Mailswith dynamic colors. - Custom Keyword Highlighting: Highlight specific keywords in log messages with
--highlightand customize colors with--highlight-color. - Live Dashboard: Watch logs stream in real-time alongside a live statistics panel keeping track of Error vs Info counts (
--dashboard). - HTML Export: Loved your console output so much you want to share it? Export the beautiful log structure directly to an HTML file to share with your team! (
--export-html results.html) - Filtering: Filter by one or more levels (
--level ERRORor--level ERROR,WARN,INFO). Search by substring (--search) or regular expression (--regex/-e), with optional case-sensitive matching and invert match (--invert-match/-v, grep-style) to hide matching lines. - Themes: Choose from 6 beautiful themes (
default,neon,ocean,forest,minimal,spectra) or create custom themes via config file. - Plain output: Use
--no-colorwhen you need unstyled text (e.g. piping to other tools or logs without ANSI codes). - Gzip logs: Read
.gzfiles directly—LogScope opens them as text without a manualzcatpipe.
Installation
Ensure you have Python 3.9+ and pip installed.
# Clone the repository
git clone https://github.com/vinnytherobot/logscope.git
cd logscope
# Install via Poetry
poetry install
poetry run logscope --help
# Or install globally via pip
pip install -e .
Usage & Examples
Using a File
# Basic colorized look
logscope /var/log/syslog
# Tailing a log in real-time (like tail -f)
logscope backend.log --follow
# Filter only errors
logscope production.log --level ERROR
# Multiple levels (comma-separated)
logscope production.log --level ERROR,WARN,INFO
# Search text dynamically
logscope server.log --search "Connection Timeout"
# Regex search (requires --search)
logscope server.log --search "timeout|refused|ECONNRESET" --regex
# Hide lines that match a pattern
logscope noisy.log --search "healthcheck" --invert-match
# Case-sensitive search
logscope app.log --search "UserID" --case-sensitive
# Highlight specific keywords
logscope server.log --highlight "timeout" --highlight-color "bold red"
# No colors (plain terminal output)
logscope app.log --no-color
# Compressed log file
logscope archive/app.log.gz
JSON logs can use common fields such as level, severity, severity_text, message, msg,
body, or Docker's log. LogScope also extracts observability context from fields such as
service.name, resource.attributes.service.name, trace_id, and span_id.
Piping from other commands (Stdin support)
LogScope acts as a brilliant text reformatter for other tools!
kubectl logs my-pod -f | logscope
docker logs api-gateway | logscope --level CRITICAL
cat nginx.log | grep -v GET | logscope --dashboard
The Live Dashboard Mode
Monitor your logs like a pro with a live dashboard tracking error occurrences.
logscope app.log --dashboard --follow
Exporting to HTML
Need to attach the logs to a Jira ticket or Slack message but want to keep the formatting?
logscope failed_job.log --export-html bug_report.html
Themes
Choose from 6 beautiful themes: default, neon, ocean, forest, minimal, spectra.
logscope app.log --theme neon
Create a .logscoperc file to set your preferred theme:
{
"theme": "neon",
"custom_themes": {
"my-theme": {
"levels": {
"ERROR": ("✖", "bold red")
}
}
}
}
Stack
- Rich -> UI Layouts, Colors, Highlighters, HTML Export.
- Typer -> Modern, fast, and robust CLI creation.
- typing-extensions -> Typed CLI annotations on Python 3.9.
- Pathlib / Sys / gzip -> File and standard input streaming; gzip text logs.
Contributing
Open an issue or submit a pull request! Tests are written using pytest.
# Running tests
pytest tests/
License
MIT License.
Made by vinnytherobot
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logscope_cli-0.4.7.tar.gz.
File metadata
- Download URL: logscope_cli-0.4.7.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb936108a15922fd2ed90ef5417ff7142f2e5efdef6a65b7542d3711cbea6f80
|
|
| MD5 |
60f22f3eb19aef1938fcb63fbf84a4b9
|
|
| BLAKE2b-256 |
2485c6c8627fd3f693ab108b7df00d5e650f3bec7a53175798a5920ae4b13387
|
Provenance
The following attestation bundles were made for logscope_cli-0.4.7.tar.gz:
Publisher:
publish.yml on vinnytherobot/logscope-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
logscope_cli-0.4.7.tar.gz -
Subject digest:
eb936108a15922fd2ed90ef5417ff7142f2e5efdef6a65b7542d3711cbea6f80 - Sigstore transparency entry: 1751141207
- Sigstore integration time:
-
Permalink:
vinnytherobot/logscope-cli@b82ea6470b0f2961a60a1bad0e894cd87cd5b736 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/vinnytherobot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b82ea6470b0f2961a60a1bad0e894cd87cd5b736 -
Trigger Event:
push
-
Statement type:
File details
Details for the file logscope_cli-0.4.7-py3-none-any.whl.
File metadata
- Download URL: logscope_cli-0.4.7-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7ad005006469c5d86b3aed2d60679ebb4bd91d36a989adee3fe15d41bbaef0e
|
|
| MD5 |
2b2dc1e5e3e6d62ed474cf57c089ce58
|
|
| BLAKE2b-256 |
699bf8c319f7fd22819512c0d587c8738ae740a43b000ef0b11250c23e2b641e
|
Provenance
The following attestation bundles were made for logscope_cli-0.4.7-py3-none-any.whl:
Publisher:
publish.yml on vinnytherobot/logscope-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
logscope_cli-0.4.7-py3-none-any.whl -
Subject digest:
b7ad005006469c5d86b3aed2d60679ebb4bd91d36a989adee3fe15d41bbaef0e - Sigstore transparency entry: 1751141523
- Sigstore integration time:
-
Permalink:
vinnytherobot/logscope-cli@b82ea6470b0f2961a60a1bad0e894cd87cd5b736 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/vinnytherobot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b82ea6470b0f2961a60a1bad0e894cd87cd5b736 -
Trigger Event:
push
-
Statement type: