lstr: A Fast, Minimalist Directory Tree Viewer Written in Rust

This repository profile is provided by osrepos.com, an open source repository discovery platform.

lstr: A Fast, Minimalist Directory Tree Viewer Written in Rust

Summary

lstr is a high-performance, minimalist command-line utility for viewing directory trees, built with Rust. It offers both a classic `tree`-like output and a powerful interactive Text User Interface (TUI) mode for fluid exploration. With features like Git integration, icon support, and smart filtering, lstr provides an efficient way to understand project structures.

Repository Information

Analyzed by OSRepos on February 27, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

lstr is a modern, fast, and minimalist directory tree viewer written in Rust. Inspired by the classic tree command, lstr enhances the experience with a powerful interactive mode and a focus on performance. It's designed to provide essential features without bloat, making it an ideal tool for developers and anyone needing to quickly visualize file system structures.

Key features include:

  • Classic and Interactive Modes: Choose between a traditional tree-like output or a fully interactive TUI for keyboard-driven exploration.
  • Theme-aware Coloring: Respects your system's LS_COLORS environment variable for customizable file and directory colors.
  • Rich Information Display: Optionally show file-specific icons (requires a Nerd Font), permissions, sizes, and Git statuses.
  • Smart Filtering: Integrates with .gitignore files and allows control over recursion depth.

Installation

Installing lstr is straightforward across various platforms.

With Homebrew (macOS)

For macOS users, Homebrew provides the easiest installation method:

brew install lstr

From Source (All Platforms)

If you have the Rust toolchain installed, you can build and install lstr from its source code:

  1. Clone the repository:

    git clone https://github.com/bgreenwell/lstr.git
    cd lstr
    
  2. Build and install using Cargo:

    cargo install --path .
    

NetBSD

NetBSD users can install lstr directly from official repositories:

pkgin install lstr

Examples

Here are a few examples demonstrating lstr's versatility:

1. Explore a project interactively, ignoring gitignored files and showing icons:

lstr interactive -g --icons

2. Display a directory with file sizes and permissions in classic view:

lstr -sp

3. See the Git status of all files in a project:

lstr -aG

4. Get a tree with clickable file links (in a supported terminal):

lstr --hyperlinks

5. Sort files naturally with directories first:

lstr --dirs-first --natural-sort

Why Use lstr?

lstr offers several compelling reasons to integrate it into your workflow:

  • Performance: Written in Rust, lstr is inherently fast and efficient, handling large directories with ease.
  • Interactivity: The optional TUI mode provides a dynamic, keyboard-driven way to navigate and explore your file system, a significant upgrade from static tree output.
  • Developer-Friendly: Features like Git status integration, .gitignore support, and customizable output make it an invaluable tool for managing codebases.
  • Customization: Full support for LS_COLORS ensures that lstr integrates seamlessly with your existing terminal theme and preferences.
  • Minimalist Design: It focuses on core functionality without unnecessary complexity, providing a clean and uncluttered user experience.

Links

Related repositories

Similar repositories that may be relevant next.

Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

June 21, 2026

Agent-Reach is a powerful GitHub repository that equips AI agents with the ability to access and search the entire internet, including platforms like Twitter, Reddit, YouTube, and Bilibili. It provides a streamlined CLI experience, eliminating the need for complex API configurations and associated fees. This project ensures your AI agent can "see" and interact with web content effortlessly.

ai-agentagent-infrastructureai-search
ascii-chat: Video Chat in Your Terminal with Audio, Encryption, and Media Support

ascii-chat: Video Chat in Your Terminal with Audio, Encryption, and Media Support

June 4, 2026

ascii-chat is a unique client-server application that enables video chat directly within your terminal, supporting color, audio, and encryption. It allows multiple clients to connect, offers media streaming from files or URLs, and features a robust discovery service for easy connection. Built in C, it's a powerful and versatile tool for terminal enthusiasts.

ascii-chatterminalvideo-chat
Task: A Modern, Cross-Platform Build Tool for Streamlined Workflows

Task: A Modern, Cross-Platform Build Tool for Streamlined Workflows

May 18, 2026

Task is an open-source, cross-platform build tool inspired by Make, designed to simplify and automate modern development workflows. It allows developers to define and run tasks using a simple YAML configuration, offering a powerful and intuitive alternative to traditional build systems. Written in Go, Task ensures fast execution and broad compatibility across various operating systems.

build-tooldevopsgo
GHunt: An Offensive Google Framework for OSINT and Data Collection

GHunt: An Offensive Google Framework for OSINT and Data Collection

May 16, 2026

GHunt is a powerful Python-based offensive Google framework primarily focused on Open-Source Intelligence (OSINT), designed for efficient evolution. It offers robust CLI usage, Python library integration, and fully asynchronous operations, making it a versatile tool for gathering information related to Google services. With features like JSON export and a companion browser extension for streamlined login, GHunt simplifies the process of digital data collection.

googleosintpython

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️