toolong


Nametoolong JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/textualize/toolong
SummaryA terminal log file viewer / tailer / analyzer
upload_time2024-04-28 16:31:07
maintainerNone
docs_urlNone
authorWill McGugan
requires_python<4.0,>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<p align="center">
    <img src="https://github.com/Textualize/toolong/assets/554369/07f286c9-ac8d-44cd-905a-062a26060821" alt="A Kookaburra sitting on a scroll" width="300" >
</p>


[![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).

<details>  
  <summary> 🎬 Viewing a single file </summary>
    
&nbsp;

<div align="center">
  <video src="https://github.com/Textualize/tailless/assets/554369/a434d427-fa9a-44bf-bafb-1cfef32d65b9" width="400" />
</div>

</details>

## Keep calm and log files

See [Toolong on Calmcode.io](https://calmcode.io/shorts/toolong.py) for a calming introduction to Toolong.

## What?

<img width="40%" align="right" alt="Screenshot 2024-02-08 at 13 47 28" src="https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1">


- 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

<table>
    <tr>
        <td>
            <img width="100%" alt="Screenshot 2024-02-08 at 13 47 28" src="https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1">
        </td>
        <td>
            <img width="100%" alt="Screenshot 2024-02-08 at 13 48 04" src="https://github.com/Textualize/toolong/assets/554369/c95f0cf4-426d-4d25-b270-eec0f4cfc86f">
        </td>
    </tr>
    <tr>
        <td>
            <img width="100%" alt="Screenshot 2024-02-08 at 13 49 22" src="https://github.com/Textualize/toolong/assets/554369/45e7509c-ffed-44cc-b3e6-f2a7a276bbe5">
        </td>
        <td>
            <img width="100%" alt="Screenshot 2024-02-08 at 13 50 04" src="https://github.com/Textualize/toolong/assets/554369/6840b626-539f-4ef9-88d9-25e0b96036b7">
        </td>
    </tr>
</table>


### Videos

<details>  
  <summary> 🎬 Merging multiple (compressed) files </summary>
&nbsp;

<div align="center">
  <video src="https://github.com/Textualize/tailless/assets/554369/efbbde11-bebf-44ff-8d2b-72a84b542b75" />
</div>
    

</details>

<details>  
  <summary> 🎬 Viewing JSONL files </summary>
&nbsp;

<div align="center">
  <video src="https://github.com/Textualize/tailless/assets/554369/38936600-34ee-4fe1-9fd3-b1581fc3fa37"  />
</div>
    
    

</details>

<details>  
  <summary> 🎬 Live Tailing a file </summary>
&nbsp;

<div align="center">
  <video src="https://github.com/Textualize/tailless/assets/554369/7eea6a0e-b30d-4a94-bb45-c5bff0e329ca" />
</div>


</details>

## 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/textualize/toolong",
    "name": "toolong",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Will McGugan",
    "author_email": "will@textualize.io",
    "download_url": "https://files.pythonhosted.org/packages/45/02/2a412839be723f58bd45c23c3fc89ea18c3bb76d5a3688c23c8e4f8c0734/toolong-1.5.0.tar.gz",
    "platform": null,
    "description": "\n<p align=\"center\">\n    <img src=\"https://github.com/Textualize/toolong/assets/554369/07f286c9-ac8d-44cd-905a-062a26060821\" alt=\"A Kookaburra sitting on a scroll\" width=\"300\" >\n</p>\n\n\n[![Discord](https://img.shields.io/discord/1026214085173461072)](https://discord.gg/Enf6Z3qhVr)\n\n# Toolong\n\nA terminal application to view, tail, merge, and search log files (plus JSONL).\n\n<details>  \n  <summary> \ud83c\udfac Viewing a single file </summary>\n    \n&nbsp;\n\n<div align=\"center\">\n  <video src=\"https://github.com/Textualize/tailless/assets/554369/a434d427-fa9a-44bf-bafb-1cfef32d65b9\" width=\"400\" />\n</div>\n\n</details>\n\n## Keep calm and log files\n\nSee [Toolong on Calmcode.io](https://calmcode.io/shorts/toolong.py) for a calming introduction to Toolong.\n\n## What?\n\n<img width=\"40%\" align=\"right\" alt=\"Screenshot 2024-02-08 at 13 47 28\" src=\"https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1\">\n\n\n- Live tailing of log files.\n- Syntax highlights common web server log formats.\n- As fast to open a multiple-gigabyte file as it is to open a tiny text file.\n- Support for JSONL files: lines are pretty printed.\n- Opens .bz and .bz2 files automatically.\n- Merges log files by auto detecting timestamps.\n  \n\n## Why?\n\nI spent a lot of time in my past life as a web developer working with logs, typically on web servers via ssh.\nI 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.\nAs useful as these tools are, they are not without friction.\n\nI built `toolong` to be the tool I would have wanted back then.\nIt is snappy, straightforward to use, and does a lot of the *grunt work* for you.\n\n\n### Screenshots\n\n<table>\n    <tr>\n        <td>\n            <img width=\"100%\" alt=\"Screenshot 2024-02-08 at 13 47 28\" src=\"https://github.com/Textualize/toolong/assets/554369/1595e8e0-f5bf-428b-9b84-f0b5c7f506a1\">\n        </td>\n        <td>\n            <img width=\"100%\" alt=\"Screenshot 2024-02-08 at 13 48 04\" src=\"https://github.com/Textualize/toolong/assets/554369/c95f0cf4-426d-4d25-b270-eec0f4cfc86f\">\n        </td>\n    </tr>\n    <tr>\n        <td>\n            <img width=\"100%\" alt=\"Screenshot 2024-02-08 at 13 49 22\" src=\"https://github.com/Textualize/toolong/assets/554369/45e7509c-ffed-44cc-b3e6-f2a7a276bbe5\">\n        </td>\n        <td>\n            <img width=\"100%\" alt=\"Screenshot 2024-02-08 at 13 50 04\" src=\"https://github.com/Textualize/toolong/assets/554369/6840b626-539f-4ef9-88d9-25e0b96036b7\">\n        </td>\n    </tr>\n</table>\n\n\n### Videos\n\n<details>  \n  <summary> \ud83c\udfac Merging multiple (compressed) files </summary>\n&nbsp;\n\n<div align=\"center\">\n  <video src=\"https://github.com/Textualize/tailless/assets/554369/efbbde11-bebf-44ff-8d2b-72a84b542b75\" />\n</div>\n    \n\n</details>\n\n<details>  \n  <summary> \ud83c\udfac Viewing JSONL files </summary>\n&nbsp;\n\n<div align=\"center\">\n  <video src=\"https://github.com/Textualize/tailless/assets/554369/38936600-34ee-4fe1-9fd3-b1581fc3fa37\"  />\n</div>\n    \n    \n\n</details>\n\n<details>  \n  <summary> \ud83c\udfac Live Tailing a file </summary>\n&nbsp;\n\n<div align=\"center\">\n  <video src=\"https://github.com/Textualize/tailless/assets/554369/7eea6a0e-b30d-4a94-bb45-c5bff0e329ca\" />\n</div>\n\n\n</details>\n\n## How?\n\nToolong is currently best installed with [pipx](https://github.com/pypa/pipx).\n\n```bash\npipx install toolong\n```\n\nYou could also install Toolong with Pip:\n\n```bash\npip install toolong\n```\n\n> [!NOTE] \n> If you use pip, you should ideally create a virtual environment to avoid potential dependancy conflicts.\n\nHowever you install Toolong, the `tl` command will be added to your path:\n\n```bash\ntl\n```\n\nIn the near future there will be more install methods, and hopefully your favorite package manager.\n\n### Compatibility\n\nToolong works on Linux, macOS, and Windows.\n\n### Opening files\n\nTo open a file with Toolong, add the file name(s) as arguments to the command:\n\n```bash\ntl mylogfile.log\n```\n\nIf you add multiple filenames, they will open in tabs.\n\nAdd the `--merge` switch to open multiple files and combine them in to a single view:\n\n```bash\ntl access.log* --merge\n```\n\nIn the app, press **f1** for additional help.\n\n### Piping\n\nIn addition to specifying files, you can also pipe directly into `tl`.\nThis means that you can tail data that comes from another process, and not neccesarily a file.\nHere's an example of piping output from the `tree` command in to Toolong:\n\n```bash\ntree / | tl\n```\n\n## Who?\n\nThis [guy](https://github.com/willmcgugan). An ex web developer who somehow makes a living writing terminal apps.\n\n    \n---\n\n## History\n\nIf 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.\nI settled on the name \"Toolong\" because it is a bit more apt, and still had the same initials.\n\n## Development\n\nToolong v1.0.0 has a solid feature set, which covers most of my requirements.\nHowever, 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.\n\nIf you want to talk about Toolong, find me on the [Textualize Discord Server](https://discord.gg/Enf6Z3qhVr).\n\n\n## Thanks\n\nI am grateful for the [LogMerger](https://github.com/ptmcg/logmerger) project which I referenced (and borrowed regexes from) when building Toolong.\n\n## Alternatives\n\nToolong is not the first TUI for working with log files. See [lnav](https://lnav.org/) as a more mature alternative.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A terminal log file viewer / tailer / analyzer",
    "version": "1.5.0",
    "project_urls": {
        "Documentation": "https://github.com/textualize/toolong",
        "Homepage": "https://github.com/textualize/toolong",
        "Repository": "https://github.com/textualize/toolong"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7a36d414636ed190b5d3a74cbc3e2a0d34674166314f2cb9eae2e25a2a2d52f",
                "md5": "97fed6ba2bad5db620933320a60bec65",
                "sha256": "bc8e12b1937b3e6fd6b0e8ff924c0a9b1c3ad6171951655571f17d8ac2ca48ce"
            },
            "downloads": -1,
            "filename": "toolong-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97fed6ba2bad5db620933320a60bec65",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 35011,
            "upload_time": "2024-04-28T16:31:06",
            "upload_time_iso_8601": "2024-04-28T16:31:06.229089Z",
            "url": "https://files.pythonhosted.org/packages/a7/a3/6d414636ed190b5d3a74cbc3e2a0d34674166314f2cb9eae2e25a2a2d52f/toolong-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45022a412839be723f58bd45c23c3fc89ea18c3bb76d5a3688c23c8e4f8c0734",
                "md5": "119d73e148c4392bdfa99bb7027023d2",
                "sha256": "49934701f954f9701d37381bed6e0f3dfbea0abe1065fcf1ff35de9eef3bbcf3"
            },
            "downloads": -1,
            "filename": "toolong-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "119d73e148c4392bdfa99bb7027023d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 30549,
            "upload_time": "2024-04-28T16:31:07",
            "upload_time_iso_8601": "2024-04-28T16:31:07.575098Z",
            "url": "https://files.pythonhosted.org/packages/45/02/2a412839be723f58bd45c23c3fc89ea18c3bb76d5a3688c23c8e4f8c0734/toolong-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-28 16:31:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "textualize",
    "github_project": "toolong",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "toolong"
}
        
Elapsed time: 0.26996s