Skip to content
/ Dree Public

One single package for visualization, debugging, and exploration of folder hierarchies

Notifications You must be signed in to change notification settings

ujjwall-R/Dree

Repository files navigation

Dree

One single package for visualization, debugging, and exploration of folder hierarchies.

Say no to bulky file managers with Dree.

Preview

Blog : Link

Dree presents the folders in a tree-like format, with the main folder at the top and its subfolders branching out below it. This makes it easier for you to see how the folders are organized and navigate through them.

One cool thing about Dree is that you can decide how many levels of folders you want to see at a time. For example, if you only want to see the main folder and its immediate subfolders, you can set the depth to 1. If you want to see more levels of folders, you can increase the depth accordingly. This allows you to focus on the specific parts of the folder structure that are most relevant to you.

image

In addition to displaying the directory structure, Dree offers a powerful search feature within the directory tree. Users can search for specific files or folders within the entire directory structure. Furthermore, Dree allows users to manually adjust their search space by setting the depth level.

image

The recommendation feature proves to be particularly helpful when users are unsure about the exact spelling or naming of a file or folder.

image

Disclaimer

Important: This project is undergoing active development, and changes, improvements, and bug fixes are being made frequently.

Installation

To run the Directory Tree Visualizer project, follow these steps:

  1. Ensure you have C++17 compiler and development environment set up on your linux or mac system
  2. Clone the project repository to your local machine.
git clone https://github.com/ujjwall-R/Dree
cd Dree
if [ ! -d "compile" ]; then mkdir compile; fi && make clean

Add path to dree.sh in ~/.bashrc. If you use zsh add the path in ~/.zshrc.

# Add the following line at the end of the ~/.bashrc file
alias dree='. path/to/project/dree.sh'

Restart terminal or run:

source ~/.bashrc

Usage

Print Dree (Directory tree)

Run dree followed by number of nested levels you want to visualise:

dree 3

Run Dree TUI File Navigator

Use the flag -n.

dree 2 -n

Nav-Demo

Search file or folder in a directory upto certain depth

#eg. search a folder in current directory upto 3 depth
dree 3 -f "directory_name"
#eg. search a file in current directory upto 5 depth
dree 5 -f "file_name"

Show files currently being ignored

Dree includes a .dreeignore file that enlists some commonly ignored files and directories. This can be overriden be the use of the -a flag.

image

image

As you can see, directories like node_modules and files like .gitignore are included when the -a flag is issued.

Development

How to Run [Development]

To run the Directory Tree Visualizer project, follow these steps:

  1. Ensure you have C++17 compiler and development environment set up on your linux or mac system
  2. Clone the project repository to your local machine.
cd Dree

Build

if [ ! -d "compile" ]; then mkdir compile; fi && make clean

Run

make run

Compile the changes

make all

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT