rel is a tool designed to visualize directory structures and the relationships between specific subdirectories and files. It acts as a wrapper around the tree command, enhancing its functionality and user experience. Here’s how you can install and start using rel:
We recommend installing the rel
CLI tool via Homebrew for easier management, updates, and removals. You can also install it directly using a script if you prefer. Here are the steps for both methods:
-
Tap the repository:
brew tap Yamayamaaya/homebrew-rel
-
tool:
brew install rel
Installing via Homebrew allows for easier management of the rel
tool as a Homebrew formula, enabling straightforward updates and removals using Homebrew commands.
If you prefer not to use Homebrew, you can install the CLI tool directly using a script:
-
Download and execute the installation script:
curl -sSL https://raw.githubusercontent.com/Yamayamaaya/Rel/main/install.sh | zsh
For bash users:
curl -sSL https://raw.githubusercontent.com/Yamayamaaya/Rel/main/install.sh | bash
This command will download the install.sh
script and execute it, downloading the actual CLI tool, making it executable, and moving it to a directory in your PATH, allowing you to run the tool from anywhere.
rel [-all] [-dir] <target1> <target2> ...
rel <GitHub_Repository_URL> [-all] [-dir] <target1> <target2> ...
- -all : Display the entire directory tree.
- -dir : Focus on directories; only specified files and directories will be displayed.
- <GitHub_Repository_URL> : (Optional) The URL of a public GitHub repository to clone and visualize.
- ... : Names of the files or directories to focus on. Both file and directory names can be specified.
-
Visualizing Specific Files and Directories in a Local Directory:
rel fileA.js directoryA
This command will display the directory structure, focusing on
fileA.js
anddirectoryA
, marking them with<<-
. -
Option:
rel -dir directoryA fileB.html
This command focuses on
directoryA
andfileB.html
, displaying them along with their hierarchical structures. -
Option with Specific Files:
rel -all fileC.txt
This command displays the entire directory tree and marks
fileC.txt
with<<-
. -
Cloning and Visualizing a GitHub Repository:
rel https://github.com/user/repository -all
This command clones the specified GitHub repository, displays its entire directory structure, and then removes the cloned repository.
This project is licensed under the MIT License - see the LICENSE.md file for details
Yamayamaaya ( yugo139013@gmail.com )