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.

goose: Your Native Open Source AI Agent for Code and Workflows

goose: Your Native Open Source AI Agent for Code and Workflows

August 9, 2026

goose is an open source, extensible AI agent designed to run natively on your machine, offering capabilities beyond simple code suggestions. It supports installation, execution, editing, and testing with a wide range of Large Language Models. Built in Rust, goose provides a desktop app, CLI, and API, making it a versatile tool for various tasks from coding to data analysis.

ai-agentsrustdeveloper-tools
Destructive Command Guard (dcg): Protecting AI Agents from Dangerous Commands

Destructive Command Guard (dcg): Protecting AI Agents from Dangerous Commands

July 11, 2026

The Destructive Command Guard (dcg) is a high-performance hook designed to prevent AI coding agents from executing dangerous git and shell commands. Built in Rust, dcg intercepts and blocks catastrophic operations like `git reset --hard` or `rm -rf`, offering clear explanations and safer alternatives. It provides a crucial safety layer for developers working with tools like Claude Code, Codex CLI, and GitHub Copilot.

ai-agentsclideveloper-tools
Awesome Shell: A Curated List of Command-Line Tools and Resources

Awesome Shell: A Curated List of Command-Line Tools and Resources

July 11, 2026

Awesome Shell is an extensive, curated list of essential command-line frameworks, toolkits, guides, and gizmos. It serves as a comprehensive resource for anyone looking to enhance their terminal experience, offering tools for productivity, customization, development, and system management.

awesome-listshellcli
Zero: The AI Coding Agent for Your Local Terminal

Zero: The AI Coding Agent for Your Local Terminal

July 6, 2026

Zero is an innovative AI coding agent designed for your local terminal, offering powerful capabilities to inspect repositories, edit files, run commands, and utilize browser/terminal helpers. It provides durable local sessions while giving users full control over the AI model and permission levels. This tool empowers developers with a customizable and secure AI assistant directly within their development environment.

aiai-agentcli

Source repository

Open the original repository on GitHub.

12 counted GitHub visits

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 ❤️