Skip to content

Install ​

You install LogLens from its source code with pip, Python's package installer. It takes about a minute and gives you the loglens command.

Good to know

LogLens is not published on the Python Package Index (PyPI) yet, so pip install loglens on its own does not find it. Install from the GitHub repository as shown below. The releases page lists the released versions; the latest is v0.2.0.

What you need ​

  • Linux or macOS
  • Python 3.10 or newer. Check with python3 --version.
  • Git, to download the source
  • A terminal that shows colours (almost every modern terminal does)

LogLens pulls in three libraries during the install: Textual (the terminal interface), watchdog (file change events) and Click (the command line).

Install from source ​

  1. Download the source and switch to the latest release:

    bash
    git clone https://github.com/Dhiva-Labs/loglens.git
    cd loglens
    git checkout v0.2.0

    Skip git checkout if you want the newest, unreleased code on the main branch.

  2. Create a virtual environment, so LogLens and its libraries stay separate from your system's Python:

    bash
    python3 -m venv .venv
    source .venv/bin/activate

    Your prompt now starts with (.venv). Run source .venv/bin/activate again in each new terminal before you use LogLens.

  3. Install LogLens:

    bash
    pip install -e .

    The -e flag installs it in "editable" mode: the loglens command runs the code in this folder, so a later git pull updates it.

  4. Check that it works:

    bash
    loglens --version

    It prints loglens, version 0.2.0.

TIP

Keep the cloned folder. It also holds scripts/genlog.py, a small script that writes sample log lines. The beginner guide uses it.

Linux distribution packages ​

The project has packaging for Fedora, RHEL-family systems, openSUSE and Arch Linux (a noarch .rpm, an Arch package and an AUR build file). These packages are attached only to releases made after v0.2.0, so v0.2.0 itself has none. When a release lists them on its page, install the file with your package manager, for example:

bash
sudo dnf install ./loglens-<version>-1.noarch.rpm

On Arch, use sudo pacman -U ./loglens-<version>-1-any.pkg.tar.zst. For background on installing package files, see Installing apps.

Update or remove ​

To update, go to the cloned folder, run git pull (or git checkout a newer tag), and run pip install -e . again inside the virtual environment.

To remove LogLens, delete the cloned folder. That also deletes its .venv.

Next steps ​