Skip to content

Tree CLI is a command-line application written in Zig that recursively lists and displays the contents of a directory in a tree-like structure.

License

Notifications You must be signed in to change notification settings

raiesbo/tree-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tree-cli

tree is a simple and flexible command-line tool written in Zig that recursively lists and displays directory structure and files directly in the terminal, compatible with any operating system.

Example:

Command

tree ./some_directory -a -c

Output

·
├── build.zig.zon
├── build.zig
├── README.md
├── .gitignore
├── .git
└── src
    ├── main.zig
    ├── utils.zig
    └── tree.zig

2 directories, 8 files

Instalation

Currently, the recommended way to use the CLI is to build the project locally and add the binary to your system's PATH.

Steps:

  1. Install Zig locally.
  2. Run the following command to build the project: zig build
  3. Add the /zig-out/bin/tree directory to your system's PATH.

Usage

tree [path-to-directory] [flags]

If no path is provided, tree will use the current directory.

Arguments

Flag/Argument Description
Path (.) Selects the target directory if the provided path is valid.
Help (-h, --help) Displays the help message with usage information. Overwrites other flags.
Version (-v, --version) Shows the current version of the program. Overwrites other flags.
Show Hidden Directories (-a, -A) Includes hidden directories in the output.
Color Output (-c, -C) Enables colored output for better readability.

Contributing

Contributions are welcome! Feel free to open issues, suggest improvements or submit pull requests.

About

Tree CLI is a command-line application written in Zig that recursively lists and displays the contents of a directory in a tree-like structure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published