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.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 8eeab944-3814-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
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.
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.
How to use
- Install broot:
brew install broot(macOS),cargo install broot(from source), or download from the releases page. - Run
brootin any directory to open the interactive tree view. - Start typing to fuzzy-search. Use arrow keys to navigate. Press Enter to cd into a directory or open a file.
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
Related on TokRepo
- Automation tools — Tools that streamline developer workflows
- Coding tools — Development environment and editor tools
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.
常见问题
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.
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.
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.
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.
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.
引用来源 (3)
- broot GitHub Repository— broot is an interactive tree view file navigator
- broot Official Site— broot documentation and configuration
- ranger GitHub Repository— Terminal file manager comparison
讨论
相关资产
Better Auth — Framework-Agnostic Authentication for TypeScript
Better Auth is a comprehensive TypeScript authentication library that provides email/password, OAuth, multi-factor, and session management out of the box. It works with any framework and any database, offering a plugin system for extending authentication flows without vendor lock-in.
Lazydocker — The Lazier Way to Manage Everything Docker
Lazydocker is a simple terminal UI for managing Docker and Docker Compose. See containers, images, volumes, logs, and stats in a single dashboard. Stop, restart, remove, prune, view logs — all without memorizing docker commands.
zx — Write Better Shell Scripts in JavaScript
A tool by Google for writing shell scripts using JavaScript with built-in support for command execution, pipes, and popular CLI utilities like cd, fetch, and chalk.
Operator SDK — Build Kubernetes Operators the Easy Way
The Operator SDK provides scaffolding, code generation, and lifecycle management tools for building Kubernetes operators in Go, Ansible, or Helm with best-practice patterns built in.