List contents of directories in tree-like 🌳 format with Emojis 📁📄🖼️
Tree-emoji-cli is a recursive directory listing program that produces a depth indented listing of files. With no arguments, tree lists the files in the current directory. When directory arguments are given, tree lists all the files and/or directories found in the given directories each in turn with emojis. Upon completion of listing all files/directories found, tree returns the total number of files and/or directories listed.
Command:
tree -l 2 -o output.txt
Result:
D:\Sandoche\00 - Projects\Producthunt-floating-prompt
├── 📁 lib
| ├── 📄 producthunt-floating-prompt.js
| └── 📄 producthunt-floating-prompt.min.js
├── 📄 LICENSE
├── 🖼️ logo.gif
├── 📄 package-lock.json
├── 📄 package.json
├── 📄 README.md
├── 📁 src
| ├── 📄 floatingPrompt.js
| └── 📄 index.js
├── 📁 test
| ├── 📄 index.html
| ├── 📄 index.spec.js
| └── 📄 mocha.opts
├── 📄 webpack.config.js
└── 📄 yarn.lock
directory: 636 file: 14
npm install -g tree-emoji-cli
use the command tree
or treee
(to avoid confliction with system command)
NOTE: use treee
instead of tree
on windows system.
tree/treee
tree --help
use -l levelNumber
to specify the path level.
tree -l 2
use -o outputFilePath
to specify the output file.
tree -l 2 -o out.txt
use -d
to show directories only.
tree -l 2 -o out.txt -d
see Options.
you should just use the treee
command as tree
has been already taken by windows system.
treee -l 2 -o out.txt -d
'node_modules/, .git/, .gitignore'
This library has been forked from https://github.com/MrRaindrop/tree-cli
Please ⭐️ this repository if this project helped you!
[](https://www.patreon.com/sandoche)
If you like this project, feel free to donate:
Version | Tag | Published |
---|---|---|
1.0.2 | latest | 1yr ago |