itree
itree
is an interactively navigable version of the Linux utility tree
, built in Rust. It aims to extend the functionality of tree
, providing an intuitive view of a directory's structure in a manageable, interactively navigable command-line interface.
Whereas tree
can be overwhelming to use on large directories, itree
allows you to inspect a filesystem in an intuitive fashion, at your own pace. It also respects gitignore rules, allowing you to focus on the files you're most interested in!
itree
relies on the FS walker used by ripgrep, bringing you the usefulness of tree
with as little overhead/slowdown as possible!
tree |
itree |
---|---|
Installation
Using brew
itree
is available via Homebrew! Simply run:
$ brew install sashaweiss/projects/itree
From source
To build from source, first make sure you have Rust and cargo
installed! (If not, then install via Rustup.) Then:
$ git clone https://github.com/sashaweiss/itree
$ cd itree
$ cargo install
Usage
Running itree
will start an interactive CLI. Use itree -h
to see a full list of configurations and UI options!
- Use the arrow keys to move around, as makes sense visually:
Up
andDown
move between files in the same directory level, whileLeft
andRight
move one level higher and lower in the directory tree, respectively. - Use
f
to fold/unfold a directory. - Use
q
,Ctrl-C
, orEsc
to exit.
More commands to come! (E.g. deleting, moving, renaming files.)
My to-do list
High priority
- Benchmark running from
~
, vs.tree
andrg --files
- Write more comprehensive documentation of source code
Medium priority
- Implement optional information displays that
tree
offers, e.g.tree -h
- Add commands for interacting with files under the cursor
- Add command for
cd
-ing to the folder the cursor is currently in - Figure out why
parse_args
panics when given stdin input
Low priority
- Integration tests for command-line args
Known bugs (need more research)
- Sometimes (no pattern identifiable yet) it acts as if the terminal window were 4-5 lines shorter than it is, and leaves a blank space at the bottom of the screen.
- When run from a root that contains folders that may have restricted permissions (e.g.
/
), not all subdirectories that I expected appear.