LinuxCommandLibrary

broot

Navigate and explore directory trees

TLDR

Install or reinstall the br shell function

$ broot --install
copy

Start and navigate the current directory tree interactively
$ broot
copy

Start displaying the size of files and directories
$ broot [[-s|--sizes]]
copy

Start displaying permissions
$ broot [[-p|--permissions]]
copy

Start displaying directories only
$ broot [[-f|--only-folders]]
copy

Start displaying hidden files and directories
$ broot [[-h|--hidden]]
copy

SYNOPSIS

broot [OPTIONS] [<path>…]

PARAMETERS

-h, --help
    Print help information

-V, --version
    Print version information

-c, --cmd <CMD>
    Execute command then quit

-p, --print
    Print selected path(s) then quit

--only-folders
    Show only folders

--only-files
    Show only files

--outcmd <FILE>
    Save selected command to file

--watch
    Watch for file changes

--allow-zip-extraction
    Allow extraction from zip archives

--cfg-file <FILE>
    Use custom config file

--color <SCHEME>
    Set color scheme (dark, light)

--confirm-open
    Require confirmation to open files

--git-ignored
    Show git-ignored files

--install-easy-bindings
    Install shell bindings for cd

--no-git
    Disable git status

--no-preview
    Disable file previews

--size <SIZE>
    Set preview size

--theme <THEME>
    Load custom theme

--trim-first-level
    Trim first directory level

DESCRIPTION

Broot is a powerful command-line directory browser written in Rust, designed for fast navigation, searching, and file management. Unlike traditional ls or tree, it provides an interactive tree view where you can expand/collapse directories, preview file contents, launch external programs, and execute custom verbs (actions).

It supports fuzzy search across millions of files, git integration for status display, image thumbnails via ueberzug, and customizable themes. Broot emphasizes speed and extensibility, allowing user-defined commands and keybindings via a TOML config file.

Ideal for power users replacing tools like ranger or nnn, it runs in the terminal with low resource usage and supports launching from any directory.

CAVEATS

Requires preview dependencies like bat, exa for full features; terminal must support 256 colors. Config changes require restart.

INSTALLATION

Via Cargo: cargo install broot. AppImage/PPA available. Run broot --install-easy-bindings for shell integration.

CONFIGURATION

Edit ~/.config/Broot/config.hjson for verbs, keybindings, and skins. Default keys: enter to enter dir, space preview, / search.

VERBS

Custom actions like back, mkdir. Define in config: verbs: [{key: 'v', invoker: 'filter_from_input', cmd: 'open $()' }].

HISTORY

Developed by Philippe Anel (Canop) starting 2019. First stable release 0.10.0 in 2020. Actively maintained on GitHub with Rust rewrite for performance. Gained popularity for speed over alternatives.

SEE ALSO

tree(1), ranger(1), nnn(1), fd(1), bat(1)

Copied to clipboard