broot
An interactive terminal navigator for directory trees with filtering, previews, file operations, and shell integration.
Why consider broot?
A tree-oriented terminal file manager that provides deep hierarchical overviews while respecting ignore files and enabling immediate directory navigation.
Learn broot by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide4 sections
Broot addresses the common pain point of navigating deeply nested directory structures in the terminal. When using the standard tree command on large projects, the output often spans multiple terminal pages, making it difficult to locate specific files. Broot tackles this by intelligently filtering the view based on .gitignore and .ignore files. This ensures that only relevant paths remain visible, drastically reducing terminal clutter and allowing developers to focus on the structure that matters most.
Interactive Directory Navigation
Traditional terminal navigation requires repeatedly chaining cd and ls commands to traverse deep hierarchies. Broot replaces this blind navigation approach by keeping the overall file structure visible while you search. As you type a few characters of a target directory, Broot instantly filters the tree to match your input using fuzzy search matching. Once the desired location is highlighted, users can instantly jump into a selected directory using Alt+Enter. This single interaction effectively replaces long chains of commands with an immediate, visual context switch.
For a complete overview of the current directory, you can invoke the tool with the size toggle to inspect the layout before committing to an action:
br -sThis command provides a condensed directory overview where you can still spot your hidden or ignored files if needed. Keyboard shortcuts like Alt+H or Alt+I offer quick toggles to temporarily surface excluded files, making it highly adaptable for administrative workflows.
Identifying Disk Space Usage
A frequent administrative task is locating large, unnecessary files that consume disk space over time. Broot includes a specialized toolset tailored for this exact scenario. By passing the specific size, date, and permission flags, you instruct the utility to evaluate the full content of directories dynamically:
br -sdpThe br -sdp command is particularly useful as it functions as a drop-in replacement for ls to display sizes, modification dates, and permissions directly in the tree interface. Because size and file count computations happen asynchronously in the background, you do not have to wait for them to finish before continuing your navigation or executing further commands.
File Operations and Workflows
Working with files directly from the search interface eliminates the cognitive overhead needed to recall exact absolute paths. It allows operations like move, copy, and remove directly within the file hierarchy. By keeping the visual tree intact, you are less likely to misplace assets or run destructive commands on the wrong targets. If you need to manipulate a specific file, you can type :e to launch it in your preferred system editor. A dedicated staging area is also available, empowering you to queue multiple files and apply a single bulk command across them simultaneously.
If you maintain complex local Git repositories, checking file statuses often means cross-referencing standard output with your project tree. Invoking :gf within Broot displays new, modified, or untracked files alongside branch statistics. This integrates repository awareness straight into the standard navigation pane.
Installation and Supported Platforms
The tool supports macOS, Windows 10+, and Linux environments. This broad ecosystem compatibility ensures that teams can standardize their command-line navigation tools regardless of their host operating systems. Rust developers can compile and install the binary directly through Cargo:
cargo install --locked brootThird-party package managers such as Homebrew for macOS or Scoop for Windows also host maintained packages. After installation, the official installation documentation highly recommends installing the br shell wrapper function. This wrapper script acts as the crucial bridge that allows the utility to successfully modify the directory context of the parent shell. Additional configuration examples can be reviewed in the primary GitHub repository.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.