Brot It is an interactive command line tool written in Rust for navigating directories using tree view and fuzzy search. It also contains a Nandu For example, disk usage patterns.
The tool is inspired by
tree Command (although it cannot be searched interactively and cannot be used as a launcher) and excellent fzf The command line fuzzy finder allows users to navigate to directories and find specific files with the least number of keystrokes.
It can run on Linux, macOS and Windows. Something rough on Windows-something needs to be done fixing, It is still very slow on Windows. It works well and runs very fast on Linux (and I assume macOS, although I don’t have a Mac, so I haven’t tried it).
|broot fuzzy search|
To start using broot, enter
br You will get a tree overview of the directory. Some items are displayed under “Not Listed,” so the output is short and easy to navigate. Start typing the name of the directory you want to navigate to-Fuzzy search will filter the available directories and only list directories that match what you type (including those that were originally located under the “unlisted” directory). If you want to search using regular expressions, add one
/ Before or after the mode.
Down Arrow keys to select a directory. Press
Enter Navigate to the selected directory while keeping broot open,
Esc Go back to the previous state or clear the search, or
Alt + Enter Back to the shell
cd You might like: Starship is the smallest and fast Shell prompt written in Rust
|Use broot to manipulate files/folders|
By default, broot will try to select the most relevant file based on what you type. After selecting the file in broot, press
Enter Open it in the default program of the system,
Alt + Enter Open it and close broot, or enter a verb to manipulate it, for example
:e Open it with the default editor. You can also use
:rm (Delete) and use
:mkdir. You can also add your own shortcuts.
|Enable display: disk usage, permissions, last modified date|
|Fuzzy search in broot, showing permissions and last modified date|
broot supports various options for displaying file permissions, date, disk space used, and displaying or hiding hidden files:
SpaceKey and type
:s(No space in front) to view the size of each file and folder in the directory. The size is cached, but you can click
:dToggle display of the last modified date of each file and directory in the tree
:peSwitch display permissions
:hToggle show hidden files
You can call up broot help at any time by pressing the following button
Shift + ?). You might also like: forgit: Interactive Git command with preview supported by fzf Fuzzy Finder
Broot also has gitignore support, with 3 modes: No (.gitignore files are not applied), Yes (the .gitignore rules will be applied when they are found; if the root contains several git projects, it means that different visible subtrees follow different Collection rules) and automatic (if the current root directory is a git directory or in a git directory, the rules are applied; otherwise, it does not work). You can switch between these modes by
:gi.Edit: In the latest 0.13.0 version, broot added support for displaying git status. use
:gf broot will display the status of the file (new, modified, etc.), current branch name and change statistics.
It is important to note that when you use broot search on a very large/slow disk, the tool will stop if it finds enough matches with your search pattern. If you want to search all existing files in more depth, you need to enable
Ctrl + sFor more information about broot, check out its excellent documentation on: https://dystroy.org/broot/
The broot installation page has multiple options. You can use goods from crates.io or goods from Homebrew or MacPorts to install broot. You too Find Pre-compiled binaries for Linux (x86_64 and armv7 for Raspberry Pi) and Windows 10.
E.g. On Linux, you can install broot by downloading the binary file and putting it in your computer
/usr/local/bin For example (this command assumes you are in the download folder of the broot binary):
sudo install broot /usr/local/bin
Once you put the broot binary in your somewhere
--install Option to install the br shell function (this will automatically add a line to your computer
~/.zshrc Source br function file):
After that, you can enter the following to start using broot