ScriptsApr 14, 2026·3 min read

broot — A Better Way to Navigate Directories

broot gives you a tree view of your filesystem with fuzzy search, built-in file operations, git status, and previews — all in the terminal. It replaces the clunky `tree | less` workflow with an interactive alternative.

TL;DR
broot gives you an interactive tree view of your filesystem with fuzzy search, git status, previews, and built-in file operations.
§01

What it is

broot is a terminal-based file manager and directory navigator written in Rust. It displays your filesystem as an interactive tree with fuzzy search, built-in file operations (copy, move, delete), git status integration, and file previews. It replaces the tree | less and find | grep workflows with a single interactive tool.

It targets developers and power users who spend significant time navigating codebases and file systems from the command line and want a faster, more visual approach.

§02

How it saves time or tokens

Finding a file in a large codebase typically involves multiple find or fd commands, piping to grep, and manually cd-ing through directories. broot lets you type a partial filename and instantly see matching files across the entire tree, with the directory structure preserved for context. Navigation and file operations happen in place without switching tools.

§03

How to use

  1. Install broot: brew install broot (macOS), cargo install broot (from source), or download from the releases page.
  2. Run broot in any directory to open the interactive tree view.
  3. Start typing to fuzzy-search. Use arrow keys to navigate. Press Enter to cd into a directory or open a file.
§04

Example

# Launch broot in the current directory
broot

# Launch with git status shown
broot --git-status

# Search for a file pattern
broot -f '*.rs'

# Use broot as a replacement for cd
# Add to shell config: alias br='broot'
br /path/to/project
# Navigate, then press alt+enter to cd into selected directory
§05

Related on TokRepo

§06

Common pitfalls

  • broot needs a shell function (installed on first run) to support cd-ing into directories. Without it, pressing Enter opens files but does not change your working directory.
  • Very large directories (100K+ files) may have slower initial scans. Use .gitignore-aware mode or file filters to limit scope.
  • Terminal color and font rendering varies. broot works best with a terminal that supports 256 colors and a nerd font for icons.

Frequently Asked Questions

How does broot compare to ranger or lf?+

Ranger and lf are full terminal file managers with column-based navigation (Miller columns). broot focuses on tree-based navigation with fuzzy search. broot is faster for finding and jumping to files; ranger is better for detailed file management with previews and bulk operations.

Can broot replace the tree command?+

Yes, for interactive use. broot shows a tree view that you can search, filter, and navigate. For scripted output (piping tree structure to a file), the traditional tree command is still more appropriate since broot is designed for interactive use.

Does broot support custom keyboard shortcuts?+

Yes. broot's configuration file (conf.hjson or conf.toml) lets you define custom verbs, key bindings, and shell commands. You can map any key combination to file operations, external commands, or navigation actions.

How does git integration work?+

Running broot with --git-status shows git status icons next to files and directories. Modified, staged, untracked, and ignored files are visually distinguished. This makes it easy to spot changes across a large repository without running git status separately.

Can broot preview file contents?+

Yes. broot can display file previews in a side panel. Text files show content, and image files show metadata. The preview updates as you navigate through the tree, similar to a file manager's preview pane.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets