Skip to content

Visually represent your file structure in tree view from the command line!

License

Notifications You must be signed in to change notification settings

Alex0Blackwell/tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree

Overview    |    Examples    |    Technologies    |    Installation    |    Usage

Overview

Visualize the current working directory's file structure. Hidden files are not shown by default, however, hidden files can be shown if specified via the -a flag.

Examples

A portion of the file structure of this repository, including hidden files

Technologies

  • Python
  • Termcolor and Colorama
    • For adding colored text to the terminal

Installation

# clone the repo
$ git clone https://github.com/Alex0Blackwell/tree.git

# change the working directory to tree
$ cd tree

# install python3 and python3-pip if they are not installed

# install the requirements
$ python3 -m pip install -r requirements.txt

Run the script from any directory (in Linux)

This script needs to be able to run from any directory. Otherwise it will only be able to display the file structure of the repository itself.

Step 1: Make the Python file executable

chmod +x tree.py

Step 2: Move the file to bin

cp tree.py /bin/tree

That's it!

Now you can use the program in any directory!

Usage

$ tree
usage: tree

tree: displays file structure (Version 0.0.1)

arguments:
  -h, --help            Show this help message and exit
  -a, --all             Include hidden files in tree visualization

To display the file structure, including hidden files, in the current directory:

tree -a

License

Licensed under the MIT License.

About

Visually represent your file structure in tree view from the command line!

Topics

Resources

License

Stars

Watchers

Forks

Languages