# tree_gen `tree_gen` is a command-line tool designed to generate visual representations of directory structures in both ASCII and JSON formats. This tool provides an easy way to visualize and explore file hierarchies directly in the terminal. It also supports comparing two directories, filtering files, and customizing the output to suit various needs. ## Features - Generate tree views of directory structures in ASCII or JSON formats. - Compare two directories to show differences. - Customize output depth and filter files by extension, size, or date. - Write output to a file or display in the terminal. - Show file sizes, icons, and even preview lines of file content. ## Installation ### Install Globally To install `tree_gen` globally, you can use `cargo`. Just run `cargo install tree_gen` in your favorite terminal. ```bash cargo install tree_gen ``` ### Install local To use `tree_gen`, clone the repository and build the binary using Rust's package manager, Cargo: ```bash cargo build --release ``` Then you can run `tree_gen` from the `target/release` directory or add it to your PATH for easy access. ## Usage ```bash tree_gen [OPTIONS] ``` ### Positional Argument - `PATH`: The path of the directory you wish to display or compare. ### Options - `--compare `: Compare the specified directory (``) with another directory at ``. - `-d, --depth `: Set the maximum depth of the directory tree (default is 10). - `-e, --extension `: Filter output to show only files with the specified file extension. - `-o, --output `: Write the output to a specified file instead of printing to the terminal. - `--branch-style