Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Textualize/toolong
A terminal application to view, tail, merge, and search log files (plus JSONL).
https://github.com/Textualize/toolong
jsonl rich terminal terminal-based textual tui
Last synced: 6 days ago
JSON representation
A terminal application to view, tail, merge, and search log files (plus JSONL).
- Host: GitHub
- URL: https://github.com/Textualize/toolong
- Owner: Textualize
- License: mit
- Created: 2024-01-07T17:22:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T19:29:28.000Z (3 months ago)
- Last Synced: 2024-10-29T15:04:55.517Z (6 days ago)
- Topics: jsonl, rich, terminal, terminal-based, textual, tui
- Language: Python
- Homepage: https://www.textualize.io/
- Size: 205 KB
- Stars: 3,171
- Watchers: 13
- Forks: 56
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesomeness - toolong - A terminal application to view, tail, merge, and search log files (plus JSONL) (OpsShit)
- awesome-textualize-projects - Toolong - A terminal application to view, tail, merge, and search log files (plus JSONL). (Community / Third Party Applications)
- my-awesome - Textualize/toolong - based,textual,tui pushed_at:2024-08 star:3.2k fork:0.1k A terminal application to view, tail, merge, and search log files (plus JSONL). (Python)
README
[![Discord](https://img.shields.io/discord/1026214085173461072)](https://discord.gg/Enf6Z3qhVr)
# Toolong
A terminal application to view, tail, merge, and search log files (plus JSONL).
🎬 Viewing a single file
Â
## Keep calm and log files
See [Toolong on Calmcode.io](https://calmcode.io/shorts/toolong.py) for a calming introduction to Toolong.
## What?
- Live tailing of log files.
- Syntax highlights common web server log formats.
- As fast to open a multiple-gigabyte file as it is to open a tiny text file.
- Support for JSONL files: lines are pretty printed.
- Opens .bz and .bz2 files automatically.
- Merges log files by auto detecting timestamps.
## Why?
I spent a lot of time in my past life as a web developer working with logs, typically on web servers via ssh.
I would use a variety of tools, but my goto method of analyzing logs was directly on the server with *nix tools like as `tail`, `less`, and `grep` etc.
As useful as these tools are, they are not without friction.I built `toolong` to be the tool I would have wanted back then.
It is snappy, straightforward to use, and does a lot of the *grunt work* for you.### Screenshots
### Videos
🎬 Merging multiple (compressed) files
Â
🎬 Viewing JSONL files
Â
🎬 Live Tailing a file
Â
## How?
Toolong is currently best installed with [pipx](https://github.com/pypa/pipx).
```bash
pipx install toolong
```You could also install Toolong with Pip:
```bash
pip install toolong
```> [!NOTE]
> If you use pip, you should ideally create a virtual environment to avoid potential dependancy conflicts.However you install Toolong, the `tl` command will be added to your path:
```bash
tl
```In the near future there will be more install methods, and hopefully your favorite package manager.
### Compatibility
Toolong works on Linux, macOS, and Windows.
### Opening files
To open a file with Toolong, add the file name(s) as arguments to the command:
```bash
tl mylogfile.log
```If you add multiple filenames, they will open in tabs.
Add the `--merge` switch to open multiple files and combine them in to a single view:
```bash
tl access.log* --merge
```In the app, press **f1** for additional help.
### Piping
In addition to specifying files, you can also pipe directly into `tl`.
This means that you can tail data that comes from another process, and not neccesarily a file.
Here's an example of piping output from the `tree` command in to Toolong:```bash
tree / | tl
```## Who?
This [guy](https://github.com/willmcgugan). An ex web developer who somehow makes a living writing terminal apps.
---## History
If you [follow me](https://twitter.com/willmcgugan) on Twitter, you may have seen me refer to this app as *Tailless*, because it was intended to be a replacement for a `tail` + `less` combo.
I settled on the name "Toolong" because it is a bit more apt, and still had the same initials.## Development
Toolong v1.0.0 has a solid feature set, which covers most of my requirements.
However, there is a tonne of features which could be added to something like this, and I will likely implement some of them in the future.If you want to talk about Toolong, find me on the [Textualize Discord Server](https://discord.gg/Enf6Z3qhVr).
## Thanks
I am grateful for the [LogMerger](https://github.com/ptmcg/logmerger) project which I referenced (and borrowed regexes from) when building Toolong.
## Alternatives
Toolong is not the first TUI for working with log files. See [lnav](https://lnav.org/) as a more mature alternative.