Broot

Broot is a powerful tool designed to improve the way you navigate directories in your terminal. Unlike the traditional tree command, Broot provides a clean, concise view of directory structures, effectively managing even large directories by smartly hiding unnecessary files and focusing on what you need.

Overview

One of the standout features of Broot is its ability to give you a comprehensive overview of a directory with a simple br -s command. This functionality is enhanced by respecting .gitignore rules, ensuring that unwanted files are kept out of sight unless explicitly requested. Broot allows you to toggle the visibility of hidden or gitignored files with intuitive shortcuts like alth and alti.

Efficient Directory Navigation

Broot excels at helping users find directories and quickly navigate to them. Typing a few letters can narrow down your search, and with a quick altenter, you can cd to the desired directory without leaving the terminal. This makes navigation fast and efficient, minimizing the number of keystrokes needed even when you're unsure of the exact directory name.

Persistent File Hierarchy

When searching for files, Broot maintains the file hierarchy, ensuring you don't lose track of where you are within your directories. You can perform searches with regular expressions by prefixing your search pattern with a /. This is complemented by logical operators and combination patterns, enhancing the search functionality to meet complex needs.

File Manipulation

Broot isn't just for navigation; it also integrates file manipulation capabilities. You can move, copy, delete, and create directories all while maintaining a clear view of your file hierarchy. This visual approach reduces the chances of errors and improves workflow efficiency. Actions like chmod are also built-in, and users can define their own shortcuts for repetitive tasks.

Multi-panel Management

Managing files across different directories is streamlined with Broot's panel feature. By selecting a directory and pressing ctrl, you can open another panel. This allows for easy copying and moving of files between panels, mimicking the classic Norton Commander style if you bind :copy_to_panel and :move_to_panel to function keys like F5 and F6.

File Previews

Previewing files is straightforward with Broot. By hitting ctrl, a preview panel opens, displaying the contents of the selected file. This feature supports high-resolution images in compatible terminals like Kitty and WezTerm, making it easier to work with graphical data directly from the terminal.

Commands and Shortcuts

Broot allows you to apply standard or custom commands to files. For example, typing :e followed by enter opens the selected file in your preferred editor. Users can configure verbs and shortcuts to tailor Broot to their workflow, enhancing productivity.

Batch Operations

You can stage multiple files for batch operations, executing commands on all selected files simultaneously. This staging area is particularly useful for large-scale file management tasks, ensuring efficiency and accuracy.

Replacing ls

Broot can effectively replace ls and its clones by displaying sizes, dates, and permissions with the br -sdp command. This feature, combined with in-tool toggling options, provides a robust alternative to traditional directory listing commands.

Sorting and Space Management

Sorting files by size or date is simple with Broot. You can launch it with specific sorting options or toggle sorting modes on the fly. The --whale-spotting mode helps identify large files or folders, making space management straightforward. This mode computes directory contents in the background, ensuring smooth navigation without delays.

Git Integration

Broot integrates seamlessly with Git, displaying file statuses, branch names, and change statistics. Commands like :gf and :gs allow for focused Git operations, making it easier to manage version control tasks directly from the terminal.

For more details on installation and usage, visit Broot's website.

Similar Projects