gitmyhub

broot

Rust ★ 13k updated 4d ago

A new way to see and navigate directory trees : https://dystroy.org/broot

A terminal file browser that shows a smart collapsible tree view, lets you find files instantly with fuzzy search, jump into folders, manage files, and spot what's taking up disk space, all from the command line.

Rustsetup: easycomplexity 2/5

Broot is a command-line tool for browsing and navigating files and folders on your computer. It runs in the terminal and shows a tree view of your directory structure, similar to how a file manager displays folders, except it is designed to stay fast and usable even when a directory contains thousands of files. The old Unix command for showing a directory tree produces an overwhelming wall of text in large codebases. Broot solves that by intelligently collapsing parts of the tree and showing a manageable overview instead.

The most common use is finding a file or folder quickly. You type a few letters and broot filters the tree in real time using fuzzy matching, meaning you do not have to type the exact name. When you find the directory you want, pressing a keyboard shortcut drops you back into your terminal already inside that folder. You can also search by file contents rather than just names, which lets you find files containing a specific word or phrase without running a separate search command.

Broot can also replace the standard directory listing command. It shows file sizes, modification dates, and permissions in a compact format. A dedicated mode called whale-spotting sorts everything by size so you can quickly identify what is taking up disk space. Sorting by date helps you find recently changed files. Both sorting modes calculate sizes and dates in the background so you can keep navigating while the numbers fill in.

File operations like moving, copying, deleting, and creating folders are built in. You can open two panels side by side and drag files between them, similar to classic dual-pane file managers. A preview panel shows the contents of a selected file, including images in high resolution if your terminal supports it. Git integration shows which files have been modified, added, or deleted in a repository.

The tool is written in Rust, which gives it fast startup times and low memory use. It is available on Linux and macOS and can be installed through most package managers. Configuration is handled through a plain-text file where you can define custom commands and keyboard shortcuts.

Where it fits