{"name":"lstr: A Fast, Minimalist Directory Tree Viewer Written in Rust","description":"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.","github":"https://github.com/bgreenwell/lstr","url":"https://osrepos.com/repo/bgreenwell-lstr","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/bgreenwell-lstr","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/bgreenwell-lstr.md","json":"https://osrepos.com/repo/bgreenwell-lstr.json","topics":["cli","rust","directory-viewer","tree-command","developer-tools","filesystem","tui","command-line"],"keywords":["cli","rust","directory-viewer","tree-command","developer-tools","filesystem","tui","command-line"],"stars":null,"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.","content":"## Introduction\n\nlstr 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.\n\nKey features include:\n\n*   **Classic and Interactive Modes:** Choose between a traditional `tree`-like output or a fully interactive TUI for keyboard-driven exploration.\n*   **Theme-aware Coloring:** Respects your system's `LS_COLORS` environment variable for customizable file and directory colors.\n*   **Rich Information Display:** Optionally show file-specific icons (requires a Nerd Font), permissions, sizes, and Git statuses.\n*   **Smart Filtering:** Integrates with `.gitignore` files and allows control over recursion depth.\n\n## Installation\n\nInstalling lstr is straightforward across various platforms.\n\n### With Homebrew (macOS)\n\nFor macOS users, Homebrew provides the easiest installation method:\n\nzsh\nbrew install lstr\n\n\n### From Source (All Platforms)\n\nIf you have the Rust toolchain installed, you can build and install lstr from its source code:\n\n1.  **Clone the repository:**\n    bash\ngit clone https://github.com/bgreenwell/lstr.git\ncd lstr\n    \n2.  **Build and install using Cargo:**\n    bash\ncargo install --path .\n    \n\n### NetBSD\n\nNetBSD users can install lstr directly from official repositories:\n\nbash\npkgin install lstr\n\n\n## Examples\n\nHere are a few examples demonstrating lstr's versatility:\n\n**1. Explore a project interactively, ignoring gitignored files and showing icons:**\n\nbash\nlstr interactive -g --icons\n\n\n**2. Display a directory with file sizes and permissions in classic view:**\n\nbash\nlstr -sp\n\n\n**3. See the Git status of all files in a project:**\n\nbash\nlstr -aG\n\n\n**4. Get a tree with clickable file links (in a supported terminal):**\n\nbash\nlstr --hyperlinks\n\n\n**5. Sort files naturally with directories first:**\n\nbash\nlstr --dirs-first --natural-sort\n\n\n## Why Use lstr?\n\nlstr offers several compelling reasons to integrate it into your workflow:\n\n*   **Performance:** Written in Rust, lstr is inherently fast and efficient, handling large directories with ease.\n*   **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.\n*   **Developer-Friendly:** Features like Git status integration, `.gitignore` support, and customizable output make it an invaluable tool for managing codebases.\n*   **Customization:** Full support for `LS_COLORS` ensures that lstr integrates seamlessly with your existing terminal theme and preferences.\n*   **Minimalist Design:** It focuses on core functionality without unnecessary complexity, providing a clean and uncluttered user experience.\n\n## Links\n\n*   **GitHub Repository:** [https://github.com/bgreenwell/lstr](https://github.com/bgreenwell/lstr \"lstr GitHub Repository\" target=\"_blank\")\n*   **Crates.io:** [https://crates.io/crates/lstr](https://crates.io/crates/lstr \"lstr on Crates.io\" target=\"_blank\")","metrics":{"detailViews":4,"githubClicks":2},"dates":{"published":null,"modified":"2026-02-27T17:40:11.000Z"}}