treescribe
v1.0.3
Published
A simple utility to generate directory tree from your file system which just works.
Maintainers
Readme
Treescribe
A simple utility to generate directory tree from your file system which just works.
What is Treescribe?
Treescribe creates a visual representation of your folders and files in a tree-like structure, making it easy to:
- Document your project structure
- Share your folder organization with others
- Understand complex directory hierarchies at a glance
Example Output
my-project
├── index.js
├── package.json
├── README.md
├── src
│ ├── components
│ │ ├── Button.js
│ │ └── Header.js
│ └── utils
│ └── helpers.js
└── tests
└── unit
└── helpers.test.jsAdvantages
- Simple to use: Run it in any directory to get a well-formatted tree of that directory
- Customizable: Ignore specific folders or limit the depth of traversal
- Cross-platform: Works on Windows, macOS, and Linux with consistent output
- Organized output: Directories are listed first, followed by files in alphabetical order
Usage
Quick One-Time Use (Recommended)
The easiest way to use Treescribe is with npx - no installation needed:
npx treescribeThis downloads and runs Treescribe on the spot without installing anything permanently.
Installation (Optional)
If you plan to use Treescribe regularly, you can install it globally:
npm install -g treescribeAfter installation, you can run:
treescribeOptions
All options work with both installation methods (with npx treescribe or just treescribe if installed globally).
Ignore specific directories (separated with |):
treescribe --ignore 'node_modules | .git | dist'Limit the depth of directories to traverse:
treescribe --level 3Save the output to a file:
treescribe --output 'tree.txt'You can use multiple options in any combination:
treescribe --level 2 --ignore 'node_modules' --output 'tree.txt'And a compact way to write options:
treescribe -l 2 -i 'node_modules' -o 'tree.txt'