Crates.io | dirt-r-ee |
lib.rs | dirt-r-ee |
version | 0.2.2 |
source | src |
created_at | 2023-11-25 15:54:46.995491 |
updated_at | 2023-12-03 14:35:24.089413 |
description | A CLI tool for printing the structure of a given directory in a tree. |
homepage | https://github.com/calthejuggler/dirt-r-ee |
repository | https://github.com/calthejuggler/dirt-r-ee |
max_upload_size | |
id | 1048383 |
size | 854,947 |
A CLI tool for printing the structure of a given directory in a tree.
Dirt(r)ee is a command-line interface (CLI) tool built in Rust that generates a tree representation of a directory
structure. It's designed to provide a clear view of file and directory arrangements, supporting various features like
including hidden files, respecting .gitignore
rules, customizable spacing, and output customization.
.gitignore
files to exclude certain files and directories.rayon
crate for efficient directory traversal.You can compile dirt(r)ee on your own architecture using cargo install
, or with Homebrew on an M1 Macbook (Intel based
Macs might work - I haven't tried. Let me know if you do!)
More installation options coming soon!
brew tap calthejuggler/dirtee
brew install dirtee
To install Dirt-r-ee, you need Rust and Cargo installed on your system. If you don't have them installed, you can follow the instructions here to install them.
Once you have Rust and Cargo installed, you can install Dirt-r-ee using Cargo:
cargo install dirt-r-ee
Run Dirt-r-ee from the command line. The basic command structure is as follows:
dirtee [OPTIONS] [PATH] # PATH defaults to the current directory
-d
, --dir <DIRECTORY>
: Specify the directory to print. Defaults to the current directory.-s
, --spacer <SPACER>
: Custom spacer for indentation. Default is four spaces.-i
, --include-hidden
: Include hidden files and directories in the output.-g
, --git-ignored
: Include files and directories specified in .gitignore
.-c
, --copy
: Copy the output to the clipboard instead of printing it.-p
, --prefix <PREFIX>
: Add a prefix to each line of the output. Default is "- ".-o
, --out-file <FILE>
: Write the output to the specified file.-V
, --version
: Show version information.-h
, --help
: Show help information.dirtee
dirtee -d /path/to/dir
dirtee -i
dirtee -c
dirtee -p "-> " -o tree.txt
Contributions are welcome! Feel free to open issues or submit pull requests.
Distributed under the MIT License. See LICENSE
for more information.