pure-folder-three
v0.7.1
Published
A customizable directory tree generator for CLI
Maintainers
Readme
pure-folder-three 🌳
A customizable directory tree generator for command line interface.
Installation
npm install -g pure-folder-threeUsage
# Basic usage
folder-tree .
# With options
folder-tree ./src --depth 2 --format markdown --ignore node_modules,dist
# Show file sizes
folder-tree . --size
# Export to file
folder-tree . --format json --output tree.jsonExamples
📁 project
(/Users/me/project)
├── src/
│ ├── index.js (1.2 KB)
│ └── utils.js [.js]
└── README.mdAPI
You can also use it programmatically:
const DirectoryTree = require('dir-tree-cli');
const tree = new DirectoryTree({
maxDepth: 3,
showSize: true
});
tree.generate('./src').then(console.log);