|0.3.1||Jun 24, 2018|
|0.3.0||Jun 23, 2018|
|0.2.2||Jun 13, 2018|
#346 in Data structures
26 downloads per month
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.
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 and supports folding, allowing you to focus on the files you're most interested in!
itree is available via Homebrew! Simply run:
$ brew install sashaweiss/projects/itree
itree is also available on crates.io! Simply run:
$ cargo install itree
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
itree will start an interactive CLI. Use
itree --help to see a full list of configurations and UI options!
- Use the arrow keys to move around, as makes sense visually:
Downmove between files in the same directory level, while
Rightmove one level higher and lower in the directory tree, respectively.
itreealso supports Vim keybindings -
lcan be used instead of the arrow keys.
fto fold/unfold a directory.
Below are tables comparing the performance of
itree to that of
tree as well as to
ripgrep (from which
itree gets its filesystem iterator).
I used hyperfine for benchmarking - specifically, the command:
$ hyperfine --warmup 2 <CMD> --show-output
<CMD> was filled in with the first column of the below tables.
--show-output was used to avoid suppressing the output of each command, since printing/rendering is an important part of what
--warmup 2 caused each command to run twice before being measured, to potentially warm up caches.
Results shown are the mean and standard deviation reported by
hyperfine. Each is the result of at least 10 measurements.
- The first row shows how long a user would wait for
itreeto display its UI.
- The second row shows how long
itreetakes to exactly emulate the behavior of
- The third row shows how long
treetakes to draw a directory structure.
- The final row shows how long
ripgreptakes to silently scan the directory structure. Since
itreeuse the same filesystem iterator, this represents a baseline for computing
|Command||μ ± σ (run from my
||μ ± σ (run in this repo)|
||2.953s ± 0.070s||0.012s ± 0.002s|
||3.511s ± 0.043s||0.031s ± 0.010s|
||15.005s ± 4.891s||0.043s ± 0.014s|
||1.373s ± 0.051s||0.010s ± 0.014s|
- Write more comprehensive documentation of source code.
- Implement functionality similar to
- Add commands for interacting with files under the cursor.
- Add command for
cd-ing to the folder the cursor is currently in.