Skip to main content

Multi-tile tail viewer for terminal

Project description

 ┌──────┬──────┬──────┐
 │ tail │ tail │ tail │   ████████╗ █████╗ ██╗██╗      ██████╗ ██████╗ ██╗██████╗
 ├──────┼──────┼──────┤   ╚══██╔══╝██╔══██╗██║██║     ██╔════╝ ██╔══██╗██║██╔══██╗
 │ tail │ tail │ tail │      ██║   ███████║██║██║     ██║  ███╗██████╔╝██║██║  ██║
 ├──────┼──────┼──────┤      ██║   ██╔══██║██║██║     ██║   ██║██╔══██╗██║██║  ██║
 │ tail │ tail │ tail │      ██║   ██║  ██║██║███████╗╚██████╔╝██║  ██║██║██████╔╝
 └──────┴──────┴──────┘      ╚═╝   ╚═╝  ╚═╝╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚═╝╚═════╝

                           watch multiple files · grid-view · one terminal · zero deps

CI PyPI Downloads

tailgrid screenshot

A minimal, dependency-free Python tool to monitor multiple log files simultaneously in a single terminal window. Like tail -f, but for up to 9 files at once in a clean tiled layout. ~250 lines of code. Tested on Ubuntu and macOS.

Quick start

From PyPI:

pip install tailgrid
tailgrid

From source:

git clone https://github.com/ferreirafabio/tailgrid.git
cd tailgrid
python -m tailgrid

That's it. The interactive menu guides you through selecting files.

Main menu

No Enter key needed - just press the number:

  tailgrid - Multi-file tail viewer

    1) Browse directory
    2) Add paths manually
    3) Resume session
    q) Quit

  Select [1-3]:

Browse directory

Select 1 to browse a directory and pick files interactively:

  Directory path: /var/log/

The file picker lets you select multiple files:

 Select files from: /var/log/
 ─────────────────────────────────────
 [x] auth.log
 [ ] boot.log
 [x] syslog
 [ ] kern.log
 [x] dpkg.log

 3/9 selected │ ↑↓/jk nav │ SPACE sel │ a all │ ENTER ok │ q quit

File picker controls:

Key Action
/ or j/k Navigate
Space Select/deselect file (moves to next)
a Select/deselect all
Enter Confirm selection
q Cancel

Layout is auto-selected based on file count:

  • 1 file → Single
  • 2 files → Choose vertical or horizontal
  • 3-4 files → 2×2 grid
  • 5-9 files → 3×3 grid

Session restore

Select 3 from main menu to restore one of the last 10 sessions:

  Recent sessions:

    0) 2 file(s), 10 lines
       • /var/log/syslog
       • /var/log/auth.log
    1) 4 file(s), 10 lines
       • ~/app/logs/error.log
       • ~/app/logs/access.log
       • ~/app/logs/debug.log
       • ~/app/logs/info.log

  Select [0-1]:

Sessions are stored in ~/.config/tailgrid/sessions.json.

Manual layout selection

Select 2 to manually enter paths and pick a layout:

  Select layout:

    1) Single        2) Vertical      3) Horizontal    4) Grid
       ┌─────┐          ┌──┬──┐          ┌─────┐          ┌──┬──┐
       │  1  │          │ 1│ 2│          │  1  │          │ 1│ 2│
       └─────┘          └──┴──┘          ├─────┤          ├──┼──┤
                                         │  2  │          │ 3│ 4│
                                         └─────┘          └──┴──┘

  Layout [1-4]: 4

  Enter 4 file path(s):

    [1] /var/log/syslog
    [2] /var/log/auth.log
    [3] ~/app/logs/error.log
    [4] ~/app/logs/access.log

  Starting with 4 file(s)...

Viewer controls

Key Action
+ / = Show more lines
- / _ Show fewer lines
r Force refresh
q Quit

Features

  • Zero dependencies - Uses only Python 3.10+ standard library (curses, readline)
  • Interactive file picker - Browse directories and select files with spacebar
  • Up to 9 tiles - Support for 3×3 grid layout
  • Auto-layout - Automatically picks best layout based on file count
  • Session history - Saves and restores last 10 sessions
  • Instant menus - No Enter key needed for menu selections
  • Tab completion - Auto-complete file paths when entering manually
  • Live updates - Polls files for changes (100ms interval)
  • Terminal resizing - Automatically adapts to window size changes
  • Clean UI - Minimalistic curses interface with unicode box-drawing

Tests

pip install -e ".[dev]"
python -m pytest tests/ -v

File structure

.
├── LICENSE
├── README.md
├── pyproject.toml
├── tailgrid
│   ├── __init__.py         # Package exports
│   └── __main__.py         # All the code (~244 lines)
└── tests
    ├── __init__.py
    └── test_tailgrid.py    # 21 tests

Requirements

  • Python 3.10+
  • Linux or macOS (curses is not available on Windows)

License

Apache-2.0

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

tailgrid-0.3.1.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

tailgrid-0.3.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file tailgrid-0.3.1.tar.gz.

File metadata

  • Download URL: tailgrid-0.3.1.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tailgrid-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8a85ce57b92036564a3746437312853ebac2326128e3a88296ffae817cb13b94
MD5 e57f21573ca0e8412b79df761418ac1b
BLAKE2b-256 eab7f59f01af8738c07bc64266857cb6d635ddb505e744155cd75701a6b404df

See more details on using hashes here.

File details

Details for the file tailgrid-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: tailgrid-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tailgrid-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 147e789bb37e05bec8b6e17ec0f1f47d8364ad4dc9194130b5a6337a78724671
MD5 510524a645121a26c57370a159648c23
BLAKE2b-256 5d2f169ae4361e321040e48327a29ac2f68ea6f2706d2a854090c22fb563d46d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page