structure-maker
Version:
Generate a folder structure with tech-specific icons
148 lines (108 loc) ⢠4.12 kB
Markdown
# structure-maker
[](https://www.npmjs.com/package/structure-maker)
[](https://opensource.org/licenses/ISC)
> Keywords: `directory-tree`, `folder-structure`, `file-explorer`, `project-visualization`, `markdown-generator`, `documentation-tool`, `dev-utility`, `file-system-scanner`
Generate beautiful folder structure visualizations with tech-specific icons for documentation, sharing, or analysis.

## Features
- š Creates clear, readable folder structure visualizations
- š¼ļø Tech-specific icons for different file types
- š Summary statistics of files and folders
- āļø Customizable depth and ignore patterns
- š¾ Saves output as a Markdown file
- šØ Colorized terminal output
## Installation
### Global Installation (Recommended)
```bash
npm install -g structure-maker
```
### Local Installation
```bash
npm install structure-maker
```
## Usage
Navigate to the directory you want to visualize and run:
```bash
structure-maker
```
This will:
1. Generate a tree visualization of your current directory
2. Create a `folder-structure.md` file with detailed documentation
3. Display a colorized version of the tree in your terminal
### Command Line Options
| Option | Description |
|--------|-------------|
| `--depth` | Maximum depth to traverse (default: infinite) |
| `--ignore` | Comma-separated patterns to ignore |
### Examples
**Limit directory depth:**
```bash
structure-maker --depth 2
```
**Ignore specific folders or files:**
```bash
structure-maker --ignore dist,build,temp
```
**Combine options:**
```bash
structure-maker --depth 3 --ignore logs,temp
```
## Output Example
The tool generates a Markdown file (`folder-structure.md`) with:
- Directory statistics (files and folders count)
- Breakdown of file types
- Complete directory tree with file sizes
Example terminal output:
```
project-root/
āā š src
ā āā š components
ā ā āā š» Button.js (2.3 KB)
ā ā āā š» Header.js (1.7 KB)
ā āā š» index.js (0.5 KB)
āā š docs
ā āā š README.md (3.2 KB)
āā š package.json (1.1 KB)
```
## File Type Icons
| Extension | Icon | Description |
|-----------|------|-------------|
| `.js`, `.ts`, `.py`, `.java` | š» | Code files |
| `.md`, `.txt` | š | Text documents |
| `.json` | š | Data files |
| `.jpg`, `.png`, `.gif` | š¼ļø | Image files |
| `.mp4`, `.avi` | š„ | Video files |
| `.mp3`, `.wav` | šµ | Audio files |
| `.pdf`, `.docx` | š | Document files |
| Other | š | Generic files |
## Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
### Bug Reports & Feature Requests
- Use the GitHub Issues tab to report bugs or suggest features
- Clearly describe the issue including steps to reproduce when it is a bug
- Make sure to include your environment details (OS, Node.js version)
### Development Process
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests if available
5. Commit your changes (`git commit -m 'Add some amazing feature'`)
6. Push to the branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request
### Ideas for Contributions
- Add more file type icons
- Improve the markdown output formatting
- Add export options for different formats (JSON, HTML, etc.)
- Create a web UI version
- Add stats visualization
- Improve performance for large directories
### Code Style
- Maintain the existing code style
- Add comments for complex logic
- Update documentation as needed
## License
This project is licensed under the ISC License - see the LICENSE file for details.
## Author
Chauhan Yuvraj
---
Made with ā¤ļø for developers who love clean documentation