lstr: A Fast, Minimalist Directory Tree Viewer Written in Rust
This repository profile is provided by osrepos.com, an open source repository discovery platform.
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
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_COLORSenvironment 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
.gitignorefiles 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:
Clone the repository:
git clone https://github.com/bgreenwell/lstr.git cd lstrBuild 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
treeoutput. - Developer-Friendly: Features like Git status integration,
.gitignoresupport, and customizable output make it an invaluable tool for managing codebases. - Customization: Full support for
LS_COLORSensures 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
- GitHub Repository: https://github.com/bgreenwell/lstr
- Crates.io: https://crates.io/crates/lstr
Related repositories
Similar repositories that may be relevant next.

Agent Factory: Generate AI Agents with Natural Language Descriptions
September 3, 2026
Agent Factory, developed by Mozilla-AI, is a powerful tool designed to generate AI agents and workflows. It allows users to describe tasks in natural language, which it then transforms into executable Python code for agentic workflows. Leveraging the Model Context Protocol (MCP) and the any-agent library, it simplifies the creation of complex AI solutions.

DeepSeek-Reasonix: Your AI Coding Agent for the Terminal
August 26, 2026
DeepSeek-Reasonix is an AI coding agent designed for your terminal, offering a stable and persistent environment for development tasks. Engineered with prefix-cache stability, it allows you to leave it running for continuous autonomous operation. This tool integrates seamlessly into various workflows, from CLI to VS Code, enhancing productivity with AI assistance.

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.
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.
Source repository
Open the original repository on GitHub.
19 counted GitHub visits