@cmorales_/file-tree
v1.0.0
Published
If you need a tree of any dir, this is yout package
Downloads
97
Readme
@cmorales_/file-tree
If you need a tree of any dir, this is yout package
Instalation
pnpm install @cmorales_/file-treeUsage
| Command | Description | Example |
| -------------------- | ------------------------------------------------------ | ------------------------ |
| tree <dir> | Generate a tree structure for the specified directory. | tree documents |
| tree <dir> [flags] | Modify the output format using optional flags. | tree documents --icons |
Flags
| Flag | Short | Negative | Description | Default | Multiple |
| -------------------- | ----- | ----------------------- | -------------------------------------------------------- | ------------------ | -------- |
| --copy | -c | --no-copy | Automatically copy the generated tree to your clipboard. | true | No |
| --icons | — | --no-icons | Include folder and file icons (📁 / 📄) in the output. | false | No |
| --hidden-locations | — | --no-hidden-locations | Include hidden files and folders in the output. | false | No |
| --exclude <path> | -e | — | Exclude specific files or folders from the tree. | ['node_modules'] | Yes |
| --help | -h | — | Show this help message. | false | No |
Examples
# Generate a basic tree
tree documents
# Generate a tree with icons
tree documents --icons
# Exclude multiple directories
tree documents --exclude node_modules --exclude dist
# Include hidden files
tree documents --hidden-locations
# Copy the result to the clipboard
tree documents --copyAbout the Author
Created by Cristian Morales.
- GitHub: Cristian-F-M
- Twitter: @Morales_M20
Support
If you find this tool useful, you can support my work!
